Make WordPress Core


Ignore:
Timestamp:
03/20/2012 09:32:42 PM (13 years ago)
Author:
nacin
Message:

Move Twenty Ten and the rest of Twenty Eleven to add_theme_support() for headers and backgrounds. props sabreuse for initial patch. fixes #20265. see #20249.

File:
1 edited

Legend:

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

    r19599 r20225  
    7171                            has_post_thumbnail( $post->ID ) &&
    7272                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    73                             $image[1] >= HEADER_IMAGE_WIDTH ) :
     73                            $image[1] >= get_theme_support( 'custom-header', 'width' ) ) :
    7474                        // Houston, we have a new header image!
    7575                        echo get_the_post_thumbnail( $post->ID );
    7676                    elseif ( get_header_image() ) : ?>
    77                         <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
     77                        <img src="<?php header_image(); ?>" width="<?php echo get_theme_support( 'custom-header', 'width' ); ?>" height="<?php echo get_theme_support( 'custom-header', 'height' ); ?>" alt="" />
    7878                    <?php endif; ?>
    7979            </div><!-- #branding -->
Note: See TracChangeset for help on using the changeset viewer.