Make WordPress Core

Ticket #10492: wp_get_attachment_thumb_file.diff

File wp_get_attachment_thumb_file.diff, 811 bytes (added by simonwheatley, 15 years ago)

Corrects indexes to access thumbnail metadata in wp_get_thumbnail_file

  • Users/simon/Projects/StephenFry/site/wordpress/wp-includes/post.php

     
    27212721
    27222722        $file = get_attached_file( $post->ID );
    27232723
    2724         if ( !empty($imagedata['thumb']) && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) && file_exists($thumbfile) )
     2724        if ( !empty($imagedata['sizes']['thumbnail']['file']) && ($thumbfile = str_replace(basename($file), $imagedata['sizes']['thumbnail']['file'], $file)) && file_exists($thumbfile) )
    27252725                return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
    27262726        return false;
    27272727}