Changeset 20983 for trunk/wp-content/themes/twentyeleven/header.php
- Timestamp:
- 06/04/2012 02:43:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/header.php
r20470 r20983 80 80 $header_image = get_header_image(); 81 81 if ( $header_image ) : 82 $header_image_width = get_custom_header()->width; 83 ?> 82 // Compatibility with versions of WordPress prior to 3.4. 83 if ( function_exists( 'get_custom_header' ) ) { 84 // We need to figure out what the minimum width should be for our featured image. 85 // This result would be the suggested width if the theme were to implement flexible widths. 86 $header_image_width = get_theme_support( 'custom-header', 'width' ); 87 } else { 88 $header_image_width = HEADER_IMAGE_WIDTH; 89 } 90 ?> 84 91 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> 85 92 <?php … … 91 98 // Houston, we have a new header image! 92 99 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 93 else : ?> 94 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> 100 else : 101 // Compatibility with versions of WordPress prior to 3.4. 102 if ( function_exists( 'get_custom_header' ) ) { 103 $header_image_width = get_custom_header()->width; 104 $header_image_height = get_custom_header()->height; 105 } else { 106 $header_image_width = HEADER_IMAGE_WIDTH; 107 $header_image_height = HEADER_IMAGE_HEIGHT; 108 } 109 ?> 110 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" /> 95 111 <?php endif; // end check for featured image or standard header ?> 96 112 </a>
Note: See TracChangeset
for help on using the changeset viewer.