Make WordPress Core

Changeset 14979


Ignore:
Timestamp:
05/27/2010 04:40:14 AM (14 years ago)
Author:
markjaquith
Message:

Use the correct array members of image_resize_dimensions() result when calculating best match for dynamic HTML image resize. fixes #13556

File:
1 edited

Legend:

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

    r14360 r14979  
    517517                    $maybe_cropped = image_resize_dimensions($imagedata['width'], $imagedata['height'], $data['width'], $data['height'], false );
    518518                    // If the size doesn't match exactly, then it is of a different aspect ratio, so we skip it, unless it's the thumbnail size
    519                     if ( 'thumbnail' != $_size && ( !$maybe_cropped || $maybe_cropped[0] != $data['width'] || $maybe_cropped[1] != $data['height'] ) )
     519                    if ( 'thumbnail' != $_size && ( !$maybe_cropped || $maybe_cropped[4] != $data['width'] || $maybe_cropped[5] != $data['height'] ) )
    520520                        continue;
    521521                    // If we're still here, then we're going to use this size
Note: See TracChangeset for help on using the changeset viewer.