REST API, Media: Fix/improve the inline docs and name of the new `wp_edited_image_metadata` filter.

Props desrosj, azaozz.

See #44405.

git-svn-id: https://develop.svn.wordpress.org/trunk@48518 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2020-07-20 21:02:13 +00:00
parent 83e78d8cdd
commit 8406d5104c
1 changed files with 5 additions and 5 deletions

View File

@ -607,15 +607,15 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
); );
/** /**
* Filters the updated attachment meta data. * Filters the meta data for the new image created by editing an existing image.
* *
* @since 5.5.0 * @since 5.5.0
* *
* @param array $data Array of updated attachment meta data. * @param array $new_image_meta Meta data for the new image.
* @param int $new_attachment_id Attachment post ID. * @param int $new_attachment_id Attachment post ID for the new image.
* @param int $attachment_id Original Attachment post ID. * @param int $attachment_id Attachment post ID for the edited (parent) image.
*/ */
$new_image_meta = apply_filters( 'wp_edited_attachment_metadata', $new_image_meta, $new_attachment_id, $attachment_id ); $new_image_meta = apply_filters( 'wp_edited_image_metadata', $new_image_meta, $new_attachment_id, $attachment_id );
wp_update_attachment_metadata( $new_attachment_id, $new_image_meta ); wp_update_attachment_metadata( $new_attachment_id, $new_image_meta );