WordPress.org

Make WordPress Core

Ticket #25400: 25400.diff

File 25400.diff, 1.8 KB (added by obenland, 7 years ago)
  • wp-content/themes/twentyfourteen/header.php

     
    2626<div id="page" class="hfeed site">
    2727        <?php do_action( 'before' ); ?>
    2828
    29         <?php $header_image = get_header_image();
    30         if ( ! empty( $header_image ) ) : ?>
     29        <?php if ( get_header_image() ) : ?>
    3130        <div id="site-header">
    3231                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    3332                        <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
  • wp-content/themes/twentytwelve/header.php

     
    4545                        <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    4646                </nav><!-- #site-navigation -->
    4747
    48                 <?php $header_image = get_header_image();
    49                 if ( ! empty( $header_image ) ) : ?>
    50                         <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
     48                <?php if ( get_header_image() ) : ?>
     49                <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    5150                <?php endif; ?>
    5251        </header><!-- #masthead -->
    5352