From ff314fd156e14999091a4a9fc8ed48eb7f662438 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 25 Mar 2018 20:45:29 +0000 Subject: [PATCH] Media: Pass EXIF data to the `wp_read_image_metadata` filter. Props desrosj. Fixes #43624. Built from https://develop.svn.wordpress.org/trunk@42879 git-svn-id: http://core.svn.wordpress.org/trunk@42709 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/image.php | 6 +++++- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 56dd5510dd..3bd7059b30 100644 --- a/wp-admin/includes/image.php +++ b/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 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index ebcbc13258..f7885d8a42 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42878'; +$wp_version = '5.0-alpha-42879'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.