From 71ed5a6b5339db920b8e4893fb6fe426dbd4bf2d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 24 Aug 2023 11:19:16 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/ms-site.php`. Follow-up to [12603], [43548], [43654], [44472]. Props aristath, poena, afercia, SergeyBiryukov. See #58831. Built from https://develop.svn.wordpress.org/trunk@56438 git-svn-id: http://core.svn.wordpress.org/trunk@55950 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-site.php | 22 +++++++++++----------- wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wp-includes/ms-site.php b/wp-includes/ms-site.php index 40321d57e0..eaee99f568 100644 --- a/wp-includes/ms-site.php +++ b/wp-includes/ms-site.php @@ -882,7 +882,7 @@ function wp_uninitialize_site( $site_id ) { $stack = array_reverse( $stack ); // Last added directories are deepest. foreach ( (array) $stack as $dir ) { - if ( $dir != $top_dir ) { + if ( $dir !== $top_dir ) { @rmdir( $dir ); } } @@ -1130,7 +1130,7 @@ function wp_maybe_update_network_site_counts_on_update( $new_site, $old_site = n return; } - if ( $new_site->network_id != $old_site->network_id ) { + if ( $new_site->network_id !== $old_site->network_id ) { wp_maybe_update_network_site_counts( $new_site->network_id ); wp_maybe_update_network_site_counts( $old_site->network_id ); } @@ -1153,8 +1153,8 @@ function wp_maybe_transition_site_statuses_on_update( $new_site, $old_site = nul $old_site = new WP_Site( new stdClass() ); } - if ( $new_site->spam != $old_site->spam ) { - if ( 1 == $new_site->spam ) { + if ( $new_site->spam !== $old_site->spam ) { + if ( '1' === $new_site->spam ) { /** * Fires when the 'spam' status is added to a site. @@ -1177,8 +1177,8 @@ function wp_maybe_transition_site_statuses_on_update( $new_site, $old_site = nul } } - if ( $new_site->mature != $old_site->mature ) { - if ( 1 == $new_site->mature ) { + if ( $new_site->mature !== $old_site->mature ) { + if ( '1' === $new_site->mature ) { /** * Fires when the 'mature' status is added to a site. @@ -1201,8 +1201,8 @@ function wp_maybe_transition_site_statuses_on_update( $new_site, $old_site = nul } } - if ( $new_site->archived != $old_site->archived ) { - if ( 1 == $new_site->archived ) { + if ( $new_site->archived !== $old_site->archived ) { + if ( '1' === $new_site->archived ) { /** * Fires when the 'archived' status is added to a site. @@ -1225,8 +1225,8 @@ function wp_maybe_transition_site_statuses_on_update( $new_site, $old_site = nul } } - if ( $new_site->deleted != $old_site->deleted ) { - if ( 1 == $new_site->deleted ) { + if ( $new_site->deleted !== $old_site->deleted ) { + if ( '1' === $new_site->deleted ) { /** * Fires when the 'deleted' status is added to a site. @@ -1249,7 +1249,7 @@ function wp_maybe_transition_site_statuses_on_update( $new_site, $old_site = nul } } - if ( $new_site->public != $old_site->public ) { + if ( $new_site->public !== $old_site->public ) { /** * Fires after the current blog's 'public' setting is updated. diff --git a/wp-includes/version.php b/wp-includes/version.php index 25129a3633..6081185131 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56437'; +$wp_version = '6.4-alpha-56438'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.