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

Merges [42878] to the 5.0 branch.
See #43624.
Built from https://develop.svn.wordpress.org/branches/5.0@43749


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-10-18 04:14:25 +00:00
parent 7a47da86e0
commit b6e0d06fff
2 changed files with 10 additions and 8 deletions

View File

@ -343,7 +343,7 @@ function wp_read_image_metadata( $file ) {
if ( ! file_exists( $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
@ -427,7 +427,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'] ) ) {
@ -506,12 +508,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-43748';
$wp_version = '5.0-alpha-43749';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.