Make WordPress Core

Changeset 42878


Ignore:
Timestamp:
03/25/2018 08:40:03 PM (7 years ago)
Author:
SergeyBiryukov
Message:

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

See #43624.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r42792 r42878  
    358358    }
    359359
    360     list( , , $sourceImageType ) = @getimagesize( $file );
     360    list( , , $image_type ) = @getimagesize( $file );
    361361
    362362    /*
     
    445445     * @param array $image_types Image types to check for exif data.
    446446     */
    447     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 ) ) ) ) {
     447    $exif_image_types = apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) );
     448
     449    if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types ) ) {
    448450        $exif = @exif_read_data( $file );
    449451
     
    524526     * @since 4.4.0 The `$iptc` parameter was added.
    525527     *
    526      * @param array  $meta            Image meta data.
    527      * @param string $file            Path to image file.
    528      * @param int    $sourceImageType Type of image.
    529      * @param array  $iptc            IPTC data.
     528     * @param array  $meta       Image meta data.
     529     * @param string $file       Path to image file.
     530     * @param int    $image_type Type of image, one of the `IMAGETYPE_XXX` constants.
     531     * @param array  $iptc       IPTC data.
    530532     */
    531     return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType, $iptc );
     533    return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc );
    532534
    533535}
Note: See TracChangeset for help on using the changeset viewer.