diff --git a/src/wp-content/themes/twentyseventeen/functions.php b/src/wp-content/themes/twentyseventeen/functions.php index 63d40647f3..ae0f8f064c 100644 --- a/src/wp-content/themes/twentyseventeen/functions.php +++ b/src/wp-content/themes/twentyseventeen/functions.php @@ -342,11 +342,13 @@ add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' ); function twentyseventeen_content_image_sizes_attr( $sizes, $size ) { $width = $size[0]; - 740 <= $width && $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px'; + if ( 740 <= $width ) { + $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px'; + } if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) { - if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) ) { - 767 <= $width && $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; + if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) { + $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; } }