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
This commit is contained in:
Jb Audras
2023-03-07 13:11:32 +00:00
parent 4e795c423f
commit 11bad65695

View File

@@ -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();