mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-02 11:21:57 +01:00
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:
parent
89b20fcf8f
commit
8cfe2973d3
@ -342,11 +342,13 @@ add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' );
|
|||||||
function twentyseventeen_content_image_sizes_attr( $sizes, $size ) {
|
function twentyseventeen_content_image_sizes_attr( $sizes, $size ) {
|
||||||
$width = $size[0];
|
$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_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) {
|
||||||
if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) ) {
|
if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) {
|
||||||
767 <= $width && $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
|
$sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user