Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (6 years 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/inc/featured-content.php

    r47550 r47808  
    303303
    304304                // Bail if term objects are unavailable.
    305                 if ( 'all' != $args['fields'] ) {
     305                if ( 'all' !== $args['fields'] ) {
    306306                        return $terms;
    307307                }
     
    340340
    341341                // Make sure we are in the correct taxonomy.
    342                 if ( 'post_tag' != $taxonomy ) {
     342                if ( 'post_tag' !== $taxonomy ) {
    343343                        return $terms;
    344344                }
     
    467467                $options = array_intersect_key( $options, $defaults );
    468468
    469                 if ( 'all' != $key ) {
     469                if ( 'all' !== $key ) {
    470470                        return isset( $options[ $key ] ) ? $options[ $key ] : false;
    471471                }
Note: See TracChangeset for help on using the changeset viewer.