WordPress.org

Make WordPress Core

Changeset 38847


Ignore:
Timestamp:
10/20/2016 10:17:35 PM (4 years ago)
Author:
davidakennedy
Message:

Twenty Seventeen: Replace inline control structure to improve code readability

Props vrundakansara, aaroncampbell.

Fixes #38384.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r38846 r38847  
    343343    $width = $size[0];
    344344
    345     740 <= $width && $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px';
     345    if ( 740 <= $width ) {
     346        $sizes = '(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px';
     347    }
    346348
    347349    if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) {
    348         if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) ) {
    349             767 <= $width && $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
     350        if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) {
     351            $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px';
    350352        }
    351353    }
Note: See TracChangeset for help on using the changeset viewer.