diff --git src/wp-content/themes/twentyseventeen/functions.php src/wp-content/themes/twentyseventeen/functions.php
index a41d317e4..c7902dbcb 100644
|
|
function twentyseventeen_front_page_template( $template ) { |
502 | 502 | add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' ); |
503 | 503 | |
504 | 504 | /** |
| 505 | * Whether the featured image should be shown. |
| 506 | * |
| 507 | * @since Twenty Seventeen 1.1 |
| 508 | * |
| 509 | * @return bool Whether the post thumbnail should be shown. |
| 510 | */ |
| 511 | function twentyseventeen_should_show_featured_image() { |
| 512 | $show = has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ); |
| 513 | |
| 514 | /** |
| 515 | * Filter whether the featured image should be shown. |
| 516 | * |
| 517 | * @param bool $show Whether to show the featured image. |
| 518 | */ |
| 519 | return apply_filters( 'twentyseventeen_should_show_featured_image', $show ); |
| 520 | } |
| 521 | |
| 522 | /** |
505 | 523 | * Implement the Custom Header feature. |
506 | 524 | */ |
507 | 525 | require get_parent_theme_file_path( '/inc/custom-header.php' ); |
diff --git src/wp-content/themes/twentyseventeen/header.php src/wp-content/themes/twentyseventeen/header.php
index 30d7d2a7c..ba989feec 100644
|
|
|
42 | 42 | |
43 | 43 | <?php |
44 | 44 | // If a regular post or page, and not the front page, show the featured image. |
45 | | if ( has_post_thumbnail() && ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) ) : |
| 45 | if ( twentyseventeen_should_show_featured_image() ) : |
46 | 46 | echo '<div class="single-featured-image-header">'; |
47 | 47 | the_post_thumbnail( 'twentyseventeen-featured-image' ); |
48 | 48 | echo '</div><!-- .single-featured-image-header -->'; |