Make WordPress Core

Changeset 48430


Ignore:
Timestamp:
07/10/2020 11:04:08 PM (4 years ago)
Author:
azaozz
Message:

Media: Tiny logic fix in wp_image_file_matches_image_meta() after [48329]. No need to look in sizes if the full size image path/URL matches.

See #50543.

File:
1 edited

Legend:

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

    r48352 r48430  
    15231523        if ( strrpos( $image_location, $image_meta['file'] ) === strlen( $image_location ) - strlen( $image_meta['file'] ) ) {
    15241524            $match = true;
    1525         }
    1526 
    1527         if ( ! empty( $image_meta['sizes'] ) ) {
     1525        } elseif ( ! empty( $image_meta['sizes'] ) ) {
    15281526            // Retrieve the uploads sub-directory from the full size image.
    15291527            $dirname = _wp_get_attachment_relative_path( $image_meta['file'] );
Note: See TracChangeset for help on using the changeset viewer.