Check for theme support before calling has_post_thumbnail for child theme compatibility. see #14903.

git-svn-id: https://develop.svn.wordpress.org/trunk@17300 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-01-14 19:16:21 +00:00
parent fe7705a8cb
commit 5670ad00c6
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@
<?php
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() &&
if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :