Changeset 50361
- Timestamp:
- 02/16/2021 07:25:26 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyten/header.php
r48290 r50361 88 88 89 89 // Check if this is a post or page, if it has a thumbnail, and if it's a big one. 90 $image = false; 90 91 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 91 92 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ); 92 if ( $image && $image[1] >= $header_image_width ) {93 // Houston, we have a new header image!94 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );95 }93 } 94 if ( $image && $image[1] >= $header_image_width ) { 95 // Houston, we have a new header image! 96 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 96 97 } else { 97 98 // Compatibility with versions of WordPress prior to 3.4.
Note: See TracChangeset
for help on using the changeset viewer.