Make WordPress Core


Ignore:
Timestamp:
09/11/2025 03:24:43 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct indentation for a multi-line comment.

Includes reformatting a long conditional for better readability.

Follow-up to [38086], [42343].

Props mukesh27, SergeyBiryukov.
See #63166.

File:
1 edited

Legend:

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

    r60681 r60730  
    825825
    826826                        $data = array_shift( $candidates );
     827                } elseif ( ! empty( $imagedata['sizes']['thumbnail'] )
     828                        && $size[0] <= $imagedata['sizes']['thumbnail']['width']
     829                        && $size[1] <= $imagedata['sizes']['thumbnail']['width']
     830                ) {
    827831                        /*
    828                         * When the size requested is smaller than the thumbnail dimensions, we
    829                         * fall back to the thumbnail size to maintain backward compatibility with
    830                         * pre 4.6 versions of WordPress.
    831                         */
    832                 } elseif ( ! empty( $imagedata['sizes']['thumbnail'] ) && $imagedata['sizes']['thumbnail']['width'] >= $size[0] && $imagedata['sizes']['thumbnail']['width'] >= $size[1] ) {
     832                         * When the size requested is smaller than the thumbnail dimensions, we
     833                         * fall back to the thumbnail size to maintain backward compatibility with
     834                         * pre-4.6 versions of WordPress.
     835                         */
    833836                        $data = $imagedata['sizes']['thumbnail'];
    834837                } else {
Note: See TracChangeset for help on using the changeset viewer.