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
This commit is contained in:
Sergey Biryukov 2018-03-25 20:44:16 +00:00
parent 0c2bbd4441
commit f44423cfb9
1 changed files with 5 additions and 1 deletions

View File

@ -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 );
}