diff --git a/wp-content/themes/twentyseventeen/functions.php b/wp-content/themes/twentyseventeen/functions.php index b4b03ed6c7..fcc9f78ebd 100644 --- a/wp-content/themes/twentyseventeen/functions.php +++ b/wp-content/themes/twentyseventeen/functions.php @@ -689,6 +689,19 @@ if ( ! function_exists( 'wp_get_list_item_separator' ) ) : } endif; +/** + * If a regular post or page, and not the front page, show the featured image below the header. + * Using get_queried_object_id() here since the $post global may not be set before a call to the_post(). + * + * @since Twenty Seventeen 3.7 + * + * @return bool Whether the post thumbnail should be shown. + */ +function twentyseventeen_should_show_featured_image() { + $show_featured_image = ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ); + return apply_filters( 'twentyseventeen_should_show_featured_image', $show_featured_image ); +} + /** * Implement the Custom Header feature. */ diff --git a/wp-content/themes/twentyseventeen/header.php b/wp-content/themes/twentyseventeen/header.php index 2fd53739a6..9ff5c9d415 100644 --- a/wp-content/themes/twentyseventeen/header.php +++ b/wp-content/themes/twentyseventeen/header.php @@ -47,12 +47,7 @@ '; echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' ); echo ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index 4b77420c46..3f0ade7568 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58205'; +$wp_version = '6.6-alpha-58206'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.