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-admin/includes/class-language-pack-upgrader.php

    r47122 r47808  
    189189        }
    190190
    191         if ( 'upgrader_process_complete' == current_filter() ) {
     191        if ( 'upgrader_process_complete' === current_filter() ) {
    192192            $this->skin->feedback( 'starting_upgrade' );
    193193        }
     
    233233
    234234            $destination = WP_LANG_DIR;
    235             if ( 'plugin' == $language_update->type ) {
     235            if ( 'plugin' === $language_update->type ) {
    236236                $destination .= '/plugins';
    237             } elseif ( 'theme' == $language_update->type ) {
     237            } elseif ( 'theme' === $language_update->type ) {
    238238                $destination .= '/themes';
    239239            }
     
    336336        $mo = false;
    337337        foreach ( (array) $files as $file => $filedata ) {
    338             if ( '.po' == substr( $file, -3 ) ) {
     338            if ( '.po' === substr( $file, -3 ) ) {
    339339                $po = true;
    340             } elseif ( '.mo' == substr( $file, -3 ) ) {
     340            } elseif ( '.mo' === substr( $file, -3 ) ) {
    341341                $mo = true;
    342342            }
Note: See TracChangeset for help on using the changeset viewer.