From 9aae3d92680cf447ccec66f86d4e4406325d77fc Mon Sep 17 00:00:00 2001
From: "David A. Kennedy" <davidakennedy@git.wordpress.org>
Date: Thu, 20 Oct 2016 22:17:35 +0000
Subject: [PATCH] Twenty Seventeen: Replace inline control structure to improve
 code readability

Props vrundakansara, aaroncampbell.

Fixes #38384.


git-svn-id: https://develop.svn.wordpress.org/trunk@38847 602fd350-edb4-49c9-b593-d223f7449a82
---
 src/wp-content/themes/twentyseventeen/functions.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

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';
 		}
 	}