From 11bad65695238d2ab91aa42a5e5a5f49850c2b47 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 7 Mar 2023 13:11:32 +0000 Subject: [PATCH] Media: Revert `wp_ajax_save_attachment_updated` hook. This changeset removes the `wp_ajax_save_attachment_updated` hook by reverting [55106], [55111], and [55450], to give it more time for further discussions as there are still concerns about whether this hook is necessary. Follow-up to [55106], [55111], [55450]. Props costdev, SergeyBiryukov, peterwilsoncc, azaozz. See #23148. git-svn-id: https://develop.svn.wordpress.org/trunk@55474 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 5353a8ca05..48e69fe0ac 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -3144,20 +3144,6 @@ function wp_ajax_save_attachment() { wp_delete_post( $id ); } else { wp_update_post( $post ); - - /** - * Fires after an attachment has been updated via the Ajax handler - * and before the JSON response is sent. - * - * When checking if an action is being done, `doing_action( 'wp_ajax_save-attachment' )` - * may be used if that is more convenient. - * - * @since 6.2.0 - * - * @param array $post The attachment data. - * @param array $changes An array containing the updated attachment attributes. - */ - do_action( 'wp_ajax_save_attachment_updated', $post, $changes ); } wp_send_json_success();