Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/header.php

    r16628 r17300  
    6868                <?php
    6969                    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    70                     if ( is_singular() &&
     70                    if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
    7171                            has_post_thumbnail( $post->ID ) &&
    7272                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    7373                            $image[1] >= HEADER_IMAGE_WIDTH ) :
    7474                        // Houston, we have a new header image!
    75                         echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    76                     else : ?>
     75                        echo get_the_post_thumbnail( $post->ID );
     76                    elseif ( get_header_image() ) : ?>
    7777                        <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    7878                    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.