Changeset 20470 for trunk/wp-content/themes/twentyeleven/header.php
- Timestamp:
- 04/15/2012 07:53:10 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/header.php
r20465 r20470 80 80 $header_image = get_header_image(); 81 81 if ( $header_image ) : 82 $header_image_width = get_theme_support( 'custom-header', 'width' ); 83 $header_image_height = get_theme_support( 'custom-header', 'height' ); 82 $header_image_width = get_custom_header()->width; 84 83 ?> 85 84 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> … … 87 86 // The header image 88 87 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 89 if ( is_singular() && 90 has_post_thumbnail( $post->ID ) && 88 if ( is_singular() && has_post_thumbnail( $post->ID ) && 91 89 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && 92 90 $image[1] >= $header_image_width ) : … … 94 92 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 95 93 else : ?> 96 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />94 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> 97 95 <?php endif; // end check for featured image or standard header ?> 98 96 </a>
Note: See TracChangeset
for help on using the changeset viewer.