From f3f1d14879399a36ecf085201dbfd32e6c35a7c4 Mon Sep 17 00:00:00 2001 From: Scott Kingsley Clark Date: Tue, 12 Sep 2023 09:59:58 -0500 Subject: [PATCH] Fix attachment fields saving when media modal fields are disabled Fixes #7158 --- includes/general.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/general.php b/includes/general.php index 917768956e..674a71da2d 100644 --- a/includes/general.php +++ b/includes/general.php @@ -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 ];