WordPress.org

Make WordPress Core

Ticket #17262: post.2.diff

File post.2.diff, 726 bytes (added by JoshuaAbenazer, 17 months ago)

This one first checks for the "fall back to the old thumbnail" and if that returns false then goes ahead and checks according to the revised array

  • post.php

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