Make WordPress Core


Ignore:
Timestamp:
04/15/2012 08:51:24 PM (12 years ago)
Author:
nacin
Message:

Flexible heights for Twenty Ten's custom headers. see #20448.

File:
1 edited

Legend:

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

    r20225 r20474  
    7474                        // Houston, we have a new header image!
    7575                        echo get_the_post_thumbnail( $post->ID );
    76                     elseif ( get_header_image() ) : ?>
    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="" />
     76                    elseif ( get_header_image() ) :
     77                        if ( function_exists( 'get_custom_header' ) ) {
     78                            $header_width  = get_custom_header()->width;
     79                            $header_height = get_custom_header()->height;
     80                        } else {
     81                            $header_height = $header_width = '';
     82                        }
     83                        ?>
     84                        <img src="<?php header_image(); ?>" width="<?php echo $header_width; ?>" height="<?php echo $header_height; ?>" alt="" />
    7885                    <?php endif; ?>
    7986            </div><!-- #branding -->
Note: See TracChangeset for help on using the changeset viewer.