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.

Built from https://develop.svn.wordpress.org/trunk@55474


git-svn-id: http://core.svn.wordpress.org/trunk@55007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-03-07 13:13:22 +00:00
parent 3958c2b23b
commit c41d5e69d3
2 changed files with 1 additions and 15 deletions

View File

@ -3144,20 +3144,6 @@ function wp_ajax_save_attachment() {
wp_delete_post( $id ); wp_delete_post( $id );
} else { } else {
wp_update_post( $post ); 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(); wp_send_json_success();

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.2-beta4-55473'; $wp_version = '6.2-beta4-55474';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.