WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php

    r47550 r47808  
    419419    $color_scheme = $options['color_scheme'];
    420420
    421     if ( 'dark' == $color_scheme ) {
     421    if ( 'dark' === $color_scheme ) {
    422422        wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), '20190404' );
    423423    }
     
    500500    }
    501501
    502     if ( 'content-sidebar' == $current_layout ) {
     502    if ( 'content-sidebar' === $current_layout ) {
    503503        $classes[] = 'right-sidebar';
    504     } elseif ( 'sidebar-content' == $current_layout ) {
     504    } elseif ( 'sidebar-content' === $current_layout ) {
    505505        $classes[] = 'left-sidebar';
    506506    } else {
Note: See TracChangeset for help on using the changeset viewer.