Make WordPress Core

Ticket #13556: 13556.diff

File 13556.diff, 980 bytes (added by markjaquith, 15 years ago)
  • wp-includes/media.php

     
    516516                                        // First, we calculate what size the original image would be if constrained to a box the size of the current image in the loop
    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
    522522                                        $file = $data['file'];