Make WordPress Core


Ignore:
Timestamp:
05/05/2021 06:46:10 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Media: Move retrieving WebP image size information into wp_getimagesize().

Remove _wp_get_image_size().

Follow-up to [50146], [50810], [50814].

Props johnjamesjacoby.
See #35725.

File:
1 edited

Legend:

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

    r50810 r50815  
    724724
    725725                if ( ! empty( $info['APP13'] ) ) {
    726                         if (
    727                                 // Skip when running unit tests.
    728                                 ! defined( 'WP_RUN_CORE_TESTS' )
    729                                 &&
    730                                 // Process without silencing errors when in debug mode.
    731                                 defined( 'WP_DEBUG' ) && WP_DEBUG
     726                        // Don't silence errors when in debug mode, unless running unit tests.
     727                        if ( defined( 'WP_DEBUG' ) && WP_DEBUG
     728                                && ! defined( 'WP_RUN_CORE_TESTS' )
    732729                        ) {
    733730                                $iptc = iptcparse( $info['APP13'] );
     
    795792
    796793        if ( is_callable( 'exif_read_data' ) && in_array( $image_type, $exif_image_types, true ) ) {
    797                 if (
    798                         // Skip when running unit tests.
    799                         ! defined( 'WP_RUN_CORE_TESTS' )
    800                         &&
    801                         // Process without silencing errors when in debug mode.
    802                         defined( 'WP_DEBUG' ) && WP_DEBUG
     794                // Don't silence errors when in debug mode, unless running unit tests.
     795                if ( defined( 'WP_DEBUG' ) && WP_DEBUG
     796                        && ! defined( 'WP_RUN_CORE_TESTS' )
    803797                ) {
    804798                        $exif = exif_read_data( $file );
Note: See TracChangeset for help on using the changeset viewer.