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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-01-14 19:16:21 +00:00
parent ccc6cfaafd
commit 82f597e296

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 ) :