From 8406d5104c085eec6d51c4b38bcf6d244740d76d Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 20 Jul 2020 21:02:13 +0000 Subject: [PATCH] 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 --- .../endpoints/class-wp-rest-attachments-controller.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php index 9ab1daaa5e..e8f2b9a739 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php @@ -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 * - * @param array $data Array of updated attachment meta data. - * @param int $new_attachment_id Attachment post ID. - * @param int $attachment_id Original Attachment post ID. + * @param array $new_image_meta Meta data for the new image. + * @param int $new_attachment_id Attachment post ID for the new image. + * @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 );