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-includes/ms-load.php

    r47219 r47808  
    2121    }
    2222
    23     return ( defined( 'VHOST' ) && VHOST == 'yes' );
     23    return ( defined( 'VHOST' ) && 'yes' === VHOST );
    2424}
    2525
     
    4747    foreach ( $active_plugins as $plugin ) {
    4848        if ( ! validate_file( $plugin )                     // $plugin must validate as file.
    49             && '.php' == substr( $plugin, -4 )              // $plugin must end with '.php'.
     49            && '.php' === substr( $plugin, -4 )             // $plugin must end with '.php'.
    5050            && file_exists( WP_PLUGIN_DIR . '/' . $plugin ) // $plugin must exist.
    5151            ) {
     
    500500    $msg .= ' ' . __( 'If you&#8217;re still stuck with this message, then check that your database contains the following tables:' ) . '</p><ul>';
    501501    foreach ( $wpdb->tables( 'global' ) as $t => $table ) {
    502         if ( 'sitecategories' == $t ) {
     502        if ( 'sitecategories' === $t ) {
    503503            continue;
    504504        }
Note: See TracChangeset for help on using the changeset viewer.