Changeset 14002
- Timestamp:
- 04/05/2010 02:58:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/header.php
r13885 r14002 45 45 <?php if ( is_home() || is_front_page() ) { ?> 46 46 <h1 id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> 47 <?php } else { ?> 47 <?php } else { ?> 48 48 <div id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div> 49 49 <?php } ?> … … 52 52 53 53 <?php 54 // Retrieve the dimensions of the current post thumbnail -- no teensy header images for us!55 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail');56 list($src, $width, $height) = $image;57 58 54 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 59 if ( is_singular() && has_post_thumbnail( $post->ID ) && $width >= HEADER_IMAGE_WIDTH ) : 55 if ( is_singular() && 56 has_post_thumbnail( $post->ID ) && 57 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail') ) && 58 $image[1] >= HEADER_IMAGE_WIDTH ) : 60 59 // Houston, we have a new header image! 61 60 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
Note: See TracChangeset
for help on using the changeset viewer.