Media: In `wp_read_image_metadata()`, rename `$sourceImageType` variable to `$image_type` to match coding standards.
See #43624. git-svn-id: https://develop.svn.wordpress.org/trunk@42878 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cf400b9bc4
commit
0c2bbd4441
|
@ -357,7 +357,7 @@ function wp_read_image_metadata( $file ) {
|
|||
return false;
|
||||
}
|
||||
|
||||
list( , , $sourceImageType ) = @getimagesize( $file );
|
||||
list( , , $image_type ) = @getimagesize( $file );
|
||||
|
||||
/*
|
||||
* EXIF contains a bunch of data we'll probably never need formatted in ways
|
||||
|
@ -444,7 +444,9 @@ function wp_read_image_metadata( $file ) {
|
|||
*
|
||||
* @param array $image_types Image types to check for exif data.
|
||||
*/
|
||||
if ( is_callable( 'exif_read_data' ) && in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) ) {
|
||||
$exif_image_types = apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) );
|
||||
|
||||
if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types ) ) {
|
||||
$exif = @exif_read_data( $file );
|
||||
|
||||
if ( ! empty( $exif['ImageDescription'] ) ) {
|
||||
|
@ -525,10 +527,10 @@ function wp_read_image_metadata( $file ) {
|
|||
*
|
||||
* @param array $meta Image meta data.
|
||||
* @param string $file Path to image file.
|
||||
* @param int $sourceImageType Type of image.
|
||||
* @param int $image_type Type of image, one of the `IMAGETYPE_XXX` constants.
|
||||
* @param array $iptc IPTC data.
|
||||
*/
|
||||
return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType, $iptc );
|
||||
return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc );
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue