Changeset 20223 for trunk/wp-content/themes/twentyeleven/header.php
- Timestamp:
- 03/20/2012 08:46:46 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentyeleven/header.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/header.php
r19599 r20223 79 79 // Check to see if the header image has been removed 80 80 $header_image = get_header_image(); 81 if ( ! empty( $header_image ) ) : 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 84 ?> 83 85 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> … … 87 89 if ( is_singular() && 88 90 has_post_thumbnail( $post->ID ) && 89 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH) ) ) &&90 $image[1] >= HEADER_IMAGE_WIDTH) :91 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && 92 $image[1] >= $header_image_width ) : 91 93 // Houston, we have a new header image! 92 94 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 93 95 else : ?> 94 <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />96 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" /> 95 97 <?php endif; // end check for featured image or standard header ?> 96 98 </a> … … 101 103 if ( 'blank' == get_header_textcolor() ) : 102 104 ?> 103 <div class="only-search<?php if ( ! empty( $header_image )) : ?> with-image<?php endif; ?>">105 <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>"> 104 106 <?php get_search_form(); ?> 105 107 </div>
Note: See TracChangeset
for help on using the changeset viewer.