Changeset 50360
- Timestamp:
- 02/16/2021 07:24:40 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/header.php
r48290 r50360 104 104 * Check if this is a post or page, if it has a thumbnail, and if it's a big one 105 105 */ 106 $image = false; 106 107 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 107 108 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ); 108 if ( $image && $image[1] >= $header_image_width ) {109 // Houston, we have a new header image!110 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );111 }109 } 110 if ( $image && $image[1] >= $header_image_width ) { 111 // Houston, we have a new header image! 112 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 112 113 } else { 113 114 // Compatibility with versions of WordPress prior to 3.4.
Note: See TracChangeset
for help on using the changeset viewer.