Twenty Twelve: simplify header image check, props obenland. Closes #25400.

git-svn-id: https://develop.svn.wordpress.org/trunk@25626 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2013-09-25 16:58:43 +00:00
parent bd150bd8d6
commit 4a8bf29102

View File

@ -45,9 +45,8 @@
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
</nav><!-- #site-navigation --> </nav><!-- #site-navigation -->
<?php $header_image = get_header_image(); <?php if ( get_header_image() ) : ?>
if ( ! empty( $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>
<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 endif; ?> <?php endif; ?>
</header><!-- #masthead --> </header><!-- #masthead -->