Twenty Seventeen: Replace inline control structure to improve code readability

Props vrundakansara, aaroncampbell.

Fixes #38384.

Built from https://develop.svn.wordpress.org/trunk@38847


git-svn-id: http://core.svn.wordpress.org/trunk@38790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
David A. Kennedy 2016-10-20 22:18:29 +00:00
parent 89b20fcf8f
commit 8cfe2973d3
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38846';
$wp_version = '4.7-alpha-38847';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.