From f44423cfb907e61cf739e2654ddcf9fe73294e6d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 25 Mar 2018 20:44:16 +0000 Subject: [PATCH] Media: Pass EXIF data to the `wp_read_image_metadata` filter. Props desrosj. Fixes #43624. git-svn-id: https://develop.svn.wordpress.org/trunk@42879 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/image.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php index 56dd5510dd..3bd7059b30 100644 --- a/src/wp-admin/includes/image.php +++ b/src/wp-admin/includes/image.php @@ -437,6 +437,8 @@ function wp_read_image_metadata( $file ) { } } + $exif = array(); + /** * Filters the image types to check for exif data. * @@ -524,13 +526,15 @@ function wp_read_image_metadata( $file ) { * * @since 2.5.0 * @since 4.4.0 The `$iptc` parameter was added. + * @since 5.0.0 The `$exif` parameter was added. * * @param array $meta Image meta data. * @param string $file Path to image file. * @param int $image_type Type of image, one of the `IMAGETYPE_XXX` constants. * @param array $iptc IPTC data. + * @param array $exif EXIF data. */ - return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc ); + return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc, $exif ); }