Media: In wp_read_image_metadata(), rename $sourceImageType variable to $image_type to match coding standards.

See #43624.
Built from https://develop.svn.wordpress.org/trunk@42878


git-svn-id: http://core.svn.wordpress.org/trunk@42708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-03-25 20:41:29 +00:00
parent bbcb4300a3
commit 079cfd60a9
2 changed files with 10 additions and 8 deletions

View File

@ -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'] ) ) {
@ -523,12 +525,12 @@ function wp_read_image_metadata( $file ) {
* @since 2.5.0
* @since 4.4.0 The `$iptc` parameter was added.
*
* @param array $meta Image meta data.
* @param string $file Path to image file.
* @param int $sourceImageType Type of image.
* @param array $iptc IPTC data.
* @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.
*/
return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType, $iptc );
return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc );
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42877';
$wp_version = '5.0-alpha-42878';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.