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
This commit is contained in:
parent
4e786dcead
commit
9aae3d9268
@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user