diff --git a/wp-content/themes/twentyseventeen/components/header/header-image.php b/wp-content/themes/twentyseventeen/components/header/header-image.php index c4437d2be8..102456ddcc 100644 --- a/wp-content/themes/twentyseventeen/components/header/header-image.php +++ b/wp-content/themes/twentyseventeen/components/header/header-image.php @@ -19,15 +19,6 @@
- ID ); - $thumbnail_attributes = wp_get_attachment_image_src( $post_thumbnail_id, 'twentyseventeen-featured-image' ); - ?> - -
- -
diff --git a/wp-content/themes/twentyseventeen/components/page/content-front-page.php b/wp-content/themes/twentyseventeen/components/page/content-front-page.php index cb0ab7d649..38fa0f77e9 100644 --- a/wp-content/themes/twentyseventeen/components/page/content-front-page.php +++ b/wp-content/themes/twentyseventeen/components/page/content-front-page.php @@ -11,6 +11,23 @@ ?>
> + ID ), 'twentyseventeen-featured-image' ); + + $post_thumbnail_id = get_post_thumbnail_id( $post->ID ); + + $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); + + // Calculate aspect ratio: h / w * 100%. + $ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100; + ?> + +
+
+
+ + +
diff --git a/wp-content/themes/twentyseventeen/inc/template-functions.php b/wp-content/themes/twentyseventeen/inc/template-functions.php index 8e6da7992a..5ea106b70b 100644 --- a/wp-content/themes/twentyseventeen/inc/template-functions.php +++ b/wp-content/themes/twentyseventeen/inc/template-functions.php @@ -34,8 +34,8 @@ function twentyseventeen_body_classes( $classes ) { $classes[] = 'twentyseventeen-front-page'; } - // Add a class if there is a featured image or custom header. - if ( has_header_image() || ( has_post_thumbnail() && twentyseventeen_is_frontpage() ) ) { + // Add a class if there is a custom header. + if ( has_header_image() ) { $classes[] = 'has-header-image'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 051e2c1064..5499bc5d09 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38867'; +$wp_version = '4.7-alpha-38868'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.