From f38ec10f21401f74ffe5f8dc8c19bb568c4e4cb2 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Sun, 12 May 2024 09:29:09 +0000 Subject: [PATCH] Twenty Seventeen: Resolves Header Image Quality Issue The heading image had quality issues on iOS Safari in portrait and landscape modes. This resolves it through adding 200cv for smaller screens so less than full size. Props poena, richardevs, laurelfulford, davidakennedy, joemcgill, SergeyBiryukov, ianbelanger, sabernhardt, shailu25, robertghetau. Fixes #39253. Built from https://develop.svn.wordpress.org/trunk@58135 git-svn-id: http://core.svn.wordpress.org/trunk@57600 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyseventeen/functions.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyseventeen/functions.php b/wp-content/themes/twentyseventeen/functions.php index b84da6875c..b4b03ed6c7 100644 --- a/wp-content/themes/twentyseventeen/functions.php +++ b/wp-content/themes/twentyseventeen/functions.php @@ -580,6 +580,7 @@ add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_att * Filters the `sizes` value in the header image markup. * * @since Twenty Seventeen 1.0 + * @since Twenty Seventeen 3.7 Added larger image size for small screens. * * @param string $html The HTML image tag markup being filtered. * @param object $header The custom header object returned by 'get_custom_header()'. @@ -588,7 +589,7 @@ add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_att */ function twentyseventeen_header_image_tag( $html, $header, $attr ) { if ( isset( $attr['sizes'] ) ) { - $html = str_replace( $attr['sizes'], '100vw', $html ); + $html = str_replace( $attr['sizes'], '(max-width: 767px) 200vw, 100vw', $html ); } return $html; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8b59ad54ae..ecfbf10d16 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58134'; +$wp_version = '6.6-alpha-58135'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.