WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/29/2011 10:22:19 PM (10 years ago)
Author:
lancewillett
Message:

Twenty Eleven: improve calls to get_header_image() - see #17240 and #17198

File:
1 edited

Legend:

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

    r17718 r17775  
    6262            <?php
    6363                // Check to see if the header image has been removed
    64                 if ( get_header_image() != '' ) :
     64                $header_image = get_header_image();
     65                if ( ! empty( $header_image ) ) :
    6566            ?>
    6667            <a href="<?php echo home_url( '/' ); ?>">
     
    8485                if ( 'blank' == get_header_textcolor() ) :
    8586            ?>
    86                 <div class="only-search<?php if ( get_header_image() != '' ) : ?> with-image<?php endif; ?>">
     87                <div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
    8788                <?php get_search_form(); ?>
    8889                </div>
Note: See TracChangeset for help on using the changeset viewer.