Skip to content

Commit

Permalink
Merge pull request #427 from adammacias/master
Browse files Browse the repository at this point in the history
Fix warning custom image header #426
  • Loading branch information
adammacias authored Oct 7, 2016
2 parents 2594665 + 1171277 commit c055303
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
</div>
<?php endif ?>

<?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 ); ?>" height="<?php esc_attr_e( $header_image->height ); ?>" width="<?php esc_attr_e( $header_image->width ); ?>" alt="" />
</a>
<?php if ( get_header_image() ) : ?>
<div class="custom-header">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
</a>
</div>
<?php endif; ?>
</div><!-- .site-header-->

</div><!-- .page-header-->

<div id="main-navigation" class="navbar navbar-default">
<div class="navbar-header">
Expand Down

0 comments on commit c055303

Please sign in to comment.