mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-27 02:31:40 +01:00
Media: Pass EXIF data to the wp_read_image_metadata
filter.
Props desrosj. Merges [42879] to the 5.0 branch. Fixes #43624. Built from https://develop.svn.wordpress.org/branches/5.0@43750 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b6e0d06fff
commit
591a09dea0
@ -420,6 +420,8 @@ function wp_read_image_metadata( $file ) {
|
||||
}
|
||||
}
|
||||
|
||||
$exif = array();
|
||||
|
||||
/**
|
||||
* Filters the image types to check for exif data.
|
||||
*
|
||||
@ -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 );
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43749';
|
||||
$wp_version = '5.0-alpha-43750';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user