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/twentyfourteen/functions.php

    r47550 r47808  
    341341    }
    342342
    343     if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
     343    if ( is_front_page() && 'slider' === get_theme_mod( 'featured_content_layout' ) ) {
    344344        wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20150120', true );
    345345        wp_localize_script(
     
    568568    }
    569569
    570     if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {
     570    if ( is_front_page() && 'slider' === get_theme_mod( 'featured_content_layout' ) ) {
    571571        $classes[] = 'slider';
    572572    } elseif ( is_front_page() ) {
Note: See TracChangeset for help on using the changeset viewer.