mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-03 19:41:39 +00:00
Media: Pass the attachment ID to the wp_image_file_matches_image_meta filter.
Props spacedmonkey. Fixes #50722. git-svn-id: https://develop.svn.wordpress.org/trunk@48547 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -424,7 +424,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||
if (
|
||||
! $image_meta ||
|
||||
! $image_file ||
|
||||
! wp_image_file_matches_image_meta( $request['src'], $image_meta )
|
||||
! wp_image_file_matches_image_meta( $request['src'], $image_meta, $attachment_id )
|
||||
) {
|
||||
return new WP_Error(
|
||||
'rest_unknown_attachment',
|
||||
|
||||
Reference in New Issue
Block a user