Wordpress 3.7
[autoinstalls/wordpress.git] / wp-content / themes / twentytwelve / header.php
index 2d3dfa630f9a78f82c227ea496a914cbee28ba28..eb64b68d56a3cc632ef0b08a13a80af7de8cfa77 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * The Header for our theme.
+ * The Header template for our theme
  *
  * Displays all of the <head> section and everything up till <div id="main">
  *
@@ -45,9 +45,8 @@
                        <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
                </nav><!-- #site-navigation -->
 
-               <?php $header_image = get_header_image();
-               if ( ! empty( $header_image ) ) : ?>
-                       <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>
+               <?php if ( get_header_image() ) : ?>
+               <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>
                <?php endif; ?>
        </header><!-- #masthead -->