Skip to content

Commit

Permalink
Media: Pass EXIF data to the wp_read_image_metadata filter.
Browse files Browse the repository at this point in the history
Props desrosj.
Merges [42879] to the 5.0 branch.
Fixes #43624.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43750 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Oct 18, 2018
1 parent f74570d commit 56b7476
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wp-admin/includes/image.php
Expand Up @@ -420,6 +420,8 @@ function wp_read_image_metadata( $file ) {
}
}

$exif = array();

/**
* Filters the image types to check for exif data.
*
Expand Down Expand Up @@ -507,13 +509,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 );

}

Expand Down

0 comments on commit 56b7476

Please sign in to comment.