Remove use of HEADER_IMAGE_WIDTH and HEADER_IMAGE_HEIGHT from twentyeleven/header.php. see #20265.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2b4051299e
commit
e708aa28b2
|
@ -78,7 +78,9 @@
|
|||
<?php
|
||||
// Check to see if the header image has been removed
|
||||
$header_image = get_header_image();
|
||||
if ( ! empty( $header_image ) ) :
|
||||
if ( $header_image ) :
|
||||
$header_image_width = get_theme_support( 'custom-header', 'width' );
|
||||
$header_image_height = get_theme_support( 'custom-header', 'height' );
|
||||
?>
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<?php
|
||||
|
@ -86,12 +88,12 @@
|
|||
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
|
||||
if ( is_singular() &&
|
||||
has_post_thumbnail( $post->ID ) &&
|
||||
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
|
||||
$image[1] >= HEADER_IMAGE_WIDTH ) :
|
||||
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
|
||||
$image[1] >= $header_image_width ) :
|
||||
// Houston, we have a new header image!
|
||||
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
|
||||
else : ?>
|
||||
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
|
||||
<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />
|
||||
<?php endif; // end check for featured image or standard header ?>
|
||||
</a>
|
||||
<?php endif; // end check for removed header image ?>
|
||||
|
@ -100,7 +102,7 @@
|
|||
// Has the text been hidden?
|
||||
if ( 'blank' == get_header_textcolor() ) :
|
||||
?>
|
||||
<div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
|
||||
<div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
|
||||
<?php get_search_form(); ?>
|
||||
</div>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue