Make WordPress Core

Changeset 46963


Ignore:
Timestamp:
12/16/2019 12:35:26 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-admin/includes/network.php.

Props ataurr.
Fixes #48994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/network.php

    r45932 r46963  
    3535function allow_subdomain_install() {
    3636    $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) );
    37     if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) {
     37    if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' === $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) {
    3838        return false;
    3939    }
     
    257257    endif;
    258258
    259     if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
     259    if ( WP_CONTENT_DIR !== ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
    260260        echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>';
    261261    }
     
    294294        <h3><?php esc_html_e( 'Network Details' ); ?></h3>
    295295        <table class="form-table" role="presentation">
    296         <?php if ( 'localhost' == $hostname ) : ?>
     296        <?php if ( 'localhost' === $hostname ) : ?>
    297297            <tr>
    298298                <th scope="row"><?php esc_html_e( 'Sub-directory Installation' ); ?></th>
     
    525525        <p>
    526526            <?php
    527             if ( 1 == $num_keys_salts ) {
     527            if ( 1 === $num_keys_salts ) {
    528528                printf(
    529529                    /* translators: %s: wp-config.php */
     
    608608            );
    609609        echo '</p>';
    610         if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) {
     610        if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
    611611            echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
    612612        }
     
    650650        );
    651651        echo '</p>';
    652         if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) {
     652        if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
    653653            echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
    654654        }
Note: See TracChangeset for help on using the changeset viewer.