mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 23:27:39 +02:00
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:
parent
ccc6cfaafd
commit
82f597e296
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
|
// 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 ) &&
|
has_post_thumbnail( $post->ID ) &&
|
||||||
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
|
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
|
||||||
$image[1] >= HEADER_IMAGE_WIDTH ) :
|
$image[1] >= HEADER_IMAGE_WIDTH ) :
|
||||||
|
Loading…
Reference in New Issue
Block a user