Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/showcase.php

    r19379 r20983  
    6767                                        $counter_slider = 0;
    6868
    69                                         ?>
     69                                        // Compatibility with versions of WordPress prior to 3.4.
     70                                        if ( function_exists( 'get_custom_header' ) )
     71                                                $header_image_width = get_theme_support( 'custom-header', 'width' );
     72                                        else
     73                                                $header_image_width = HEADER_IMAGE_WIDTH;
     74                                ?>
    7075
    7176                                <div class="featured-posts">
    … …  
    9095
    9196                                                // 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 ) );
     97                                                $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
    9398
    9499                                                // Is it bigger than or equal to our header?
    95                                                 if ( $image[1] >= HEADER_IMAGE_WIDTH ) {
     100                                                if ( $image[1] >= $header_image_width ) {
    96101                                                        // If bigger, let's add a BIGGER class. It's EXTRA classy now.
    97102                                                        $feature_class = 'feature-image large';
    … …  
    108113                                                         */
    109114                                                        if ( has_post_thumbnail() ) {
    110                                                                 if ( $image[1] >= HEADER_IMAGE_WIDTH )
     115                                                                if ( $image[1] >= $header_image_width )
    111116                                                                        $thumbnail_size = 'large-feature';
    112117                                                                else
Note: See TracChangeset for help on using the changeset viewer.