Make WordPress Core


Ignore:
Timestamp:
03/20/2012 09:32:42 PM (12 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/twentyeleven/showcase.php

    r19379 r20225  
    6767                    $counter_slider = 0;
    6868
     69                    $header_image_width  = get_theme_support( 'custom-header', 'width' );
     70                    $header_image_height = get_theme_support( 'custom-header', 'height' );
    6971                    ?>
    7072
     
    9092
    9193                        // Hang on. Let's check this here image out.
    92                         $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) );
     94                        $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
    9395
    9496                        // Is it bigger than or equal to our header?
    95                         if ( $image[1] >= HEADER_IMAGE_WIDTH ) {
     97                        if ( $image[1] >= $header_image_width ) {
    9698                            // If bigger, let's add a BIGGER class. It's EXTRA classy now.
    9799                            $feature_class = 'feature-image large';
     
    108110                             */
    109111                            if ( has_post_thumbnail() ) {
    110                                 if ( $image[1] >= HEADER_IMAGE_WIDTH )
     112                                if ( $image[1] >= $header_image_width )
    111113                                    $thumbnail_size = 'large-feature';
    112114                                else
Note: See TracChangeset for help on using the changeset viewer.