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

Props ataurr.
Fixes #48994.
Built from https://develop.svn.wordpress.org/trunk@46963


git-svn-id: http://core.svn.wordpress.org/trunk@46763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-12-16 12:37:06 +00:00
parent 6d40400756
commit 5b9fd2d7e7
2 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ function network_domain_check() {
*/ */
function allow_subdomain_install() { function allow_subdomain_install() {
$domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) ); $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) );
if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) { if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' === $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) {
return false; return false;
} }
@ -256,7 +256,7 @@ function network_step1( $errors = false ) {
<?php <?php
endif; endif;
if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) { if ( WP_CONTENT_DIR !== ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>'; echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>';
} }
@ -293,7 +293,7 @@ function network_step1( $errors = false ) {
<h3><?php esc_html_e( 'Network Details' ); ?></h3> <h3><?php esc_html_e( 'Network Details' ); ?></h3>
<table class="form-table" role="presentation"> <table class="form-table" role="presentation">
<?php if ( 'localhost' == $hostname ) : ?> <?php if ( 'localhost' === $hostname ) : ?>
<tr> <tr>
<th scope="row"><?php esc_html_e( 'Sub-directory Installation' ); ?></th> <th scope="row"><?php esc_html_e( 'Sub-directory Installation' ); ?></th>
<td> <td>
@ -524,7 +524,7 @@ define('BLOG_ID_CURRENT_SITE', 1);
?> ?>
<p> <p>
<?php <?php
if ( 1 == $num_keys_salts ) { if ( 1 === $num_keys_salts ) {
printf( printf(
/* translators: %s: wp-config.php */ /* translators: %s: wp-config.php */
__( 'This unique authentication key is also missing from your %s file.' ), __( 'This unique authentication key is also missing from your %s file.' ),
@ -607,7 +607,7 @@ define('BLOG_ID_CURRENT_SITE', 1);
'<code>' . $home_path . '</code>' '<code>' . $home_path . '</code>'
); );
echo '</p>'; echo '</p>';
if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) { if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>'; echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
} }
?> ?>
@ -649,7 +649,7 @@ EOF;
'<code>' . $home_path . '</code>' '<code>' . $home_path . '</code>'
); );
echo '</p>'; echo '</p>';
if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) { if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>'; echo '<p><strong>' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
} }
?> ?>

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-46962'; $wp_version = '5.4-alpha-46963';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.