WordPress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php
Tammie Lister dc35c19f60 Twenty Seventeen: Renaming of directory structure
This changes components directory to be called template-parts. Changes reflected in all files that call those sections.

Props bronsonquick, dd32

Fixes #38375

Built from https://develop.svn.wordpress.org/trunk@38875


git-svn-id: http://core.svn.wordpress.org/trunk@38818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 12:29:30 +00:00

31 lines
742 B
PHP

<?php
/**
* Displays header image
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
*/
?>
<div class="custom-header">
<?php
$header_image = get_header_image();
// Check if Custom Header image has been added.
if ( ! empty( $header_image ) ) : ?>
<div class="custom-header-image" style="background-image: url(<?php echo esc_url( $header_image ); ?>)"></div>
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
<?php else : ?>
<?php // Otherwise, show a blank header. ?>
<div class="custom-header-simple">
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
</div><!-- .custom-header-simple -->
<?php endif; ?>
</div><!-- .custom-header -->