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
This commit is contained in:
parent
079cfd60a9
commit
ff314fd156
|
@ -437,6 +437,8 @@ function wp_read_image_metadata( $file ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$exif = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters the image types to check for exif data.
|
* Filters the image types to check for exif data.
|
||||||
*
|
*
|
||||||
|
@ -524,13 +526,15 @@ function wp_read_image_metadata( $file ) {
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
* @since 4.4.0 The `$iptc` parameter was added.
|
* @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 array $meta Image meta data.
|
||||||
* @param string $file Path to image file.
|
* @param string $file Path to image file.
|
||||||
* @param int $image_type Type of image, one of the `IMAGETYPE_XXX` constants.
|
* @param int $image_type Type of image, one of the `IMAGETYPE_XXX` constants.
|
||||||
* @param array $iptc IPTC data.
|
* @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
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue