WordPress.org

Make WordPress Core

Ticket #23556: post.diff

File post.diff, 907 bytes (added by JoshuaAbenazer, 8 years ago)

post.php

  • post.php

     
    43484348
    43494349        $file = get_attached_file( $post->ID );
    43504350
    4351         if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) )
     4351        if ( isset($imagedata['sizes]['thumbnail']['file']) && !empty($imagedata['sizes]['thumbnail']['file']) && ($thumbfile = str_replace(basename($file), $imagedata['sizes']['thumbnail']['file], $file)) && file_exists($thumbfile) )
    43524352                return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
     4353        elseif ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) )
     4354                return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
    43534355        return false;
    43544356}
    43554357