Skip to content

Commit

Permalink
Fix attachment fields saving when media modal fields are disabled
Browse files Browse the repository at this point in the history
Fixes #7158
  • Loading branch information
sc0ttkclark committed Sep 12, 2023
1 parent 5424765 commit f3f1d14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -3474,11 +3474,11 @@ function pods_meta_hook_list( $object_type = 'post', $object = null ) {
if ( $media_modal_fields ) {
// Handle showing meta fields in modal.
$hooks['filter'][] = [ 'attachment_fields_to_edit', [ PodsInit::$meta, 'meta_media' ], 10, 2 ];

// Handle saving meta fields from modal.
$hooks['filter'][] = [ 'attachment_fields_to_save', [ PodsInit::$meta, 'save_media' ], 10, 2 ];
}

// Handle saving meta fields from modal.
$hooks['filter'][] = [ 'attachment_fields_to_save', [ PodsInit::$meta, 'save_media' ], 10, 2 ];

// Handle saving attachment metadata.
$hooks['filter'][] = [ 'wp_update_attachment_metadata', [ PodsInit::$meta, 'save_media' ], 10, 2 ];

Expand Down

0 comments on commit f3f1d14

Please sign in to comment.