Make WordPress Core

Changeset 43749


Ignore:
Timestamp:
10/18/2018 04:13:36 AM (7 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0

  • branches/5.0/src/wp-admin/includes/image.php

    r42813 r43749  
    344344        return false;
    345345
    346     list( , , $sourceImageType ) = @getimagesize( $file );
     346    list( , , $image_type ) = @getimagesize( $file );
    347347
    348348    /*
     
    428428     * @param array $image_types Image types to check for exif data.
    429429     */
    430     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 ) ) ) ) {
     430    $exif_image_types = apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) );
     431
     432    if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types ) ) {
    431433        $exif = @exif_read_data( $file );
    432434
     
    507509     * @since 4.4.0 The `$iptc` parameter was added.
    508510     *
    509      * @param array  $meta            Image meta data.
    510      * @param string $file            Path to image file.
    511      * @param int    $sourceImageType Type of image.
    512      * @param array  $iptc            IPTC data.
     511     * @param array  $meta       Image meta data.
     512     * @param string $file       Path to image file.
     513     * @param int    $image_type Type of image, one of the `IMAGETYPE_XXX` constants.
     514     * @param array  $iptc       IPTC data.
    513515     */
    514     return apply_filters( 'wp_read_image_metadata', $meta, $file, $sourceImageType, $iptc );
     516    return apply_filters( 'wp_read_image_metadata', $meta, $file, $image_type, $iptc );
    515517
    516518}
Note: See TracChangeset for help on using the changeset viewer.