Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (5 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-admin/includes/theme.php

    r47797 r47808  
    472472    }
    473473
    474     if ( 'query_themes' == $action ) {
     474    if ( 'query_themes' === $action ) {
    475475        if ( ! isset( $args->per_page ) ) {
    476476            $args->per_page = 24;
     
    584584
    585585        // Back-compat for info/1.2 API, upgrade the theme objects in query_themes to objects.
    586         if ( 'query_themes' == $action ) {
     586        if ( 'query_themes' === $action ) {
    587587            foreach ( $res->themes as $i => $theme ) {
    588588                $res->themes[ $i ] = (object) $theme;
     
    590590        }
    591591        // Back-compat for info/1.2 API, downgrade the feature_list result back to an array.
    592         if ( 'feature_list' == $action ) {
     592        if ( 'feature_list' === $action ) {
    593593            $res = (array) $res;
    594594        }
Note: See TracChangeset for help on using the changeset viewer.