Coding Standards: Use strict comparison in `wp-includes/ms-blogs.php`.

Follow-up to [12603], [12948], [13125], [13126], [21480], [21485], [38457], [41625], [43654], [43655], [45794].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@57874


git-svn-id: http://core.svn.wordpress.org/trunk@57375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-03-24 13:04:16 +00:00
parent 22d95abc55
commit 6d5d992cf1
2 changed files with 10 additions and 10 deletions

View File

@ -187,7 +187,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
if ( $details ) {
if ( ! is_object( $details ) ) {
if ( -1 == $details ) {
if ( -1 === $details ) {
return false;
} else {
// Clear old pre-serialized objects. Cache clients do better with that.
@ -207,7 +207,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
// If short was requested and full cache is set, we can return.
if ( $details ) {
if ( ! is_object( $details ) ) {
if ( -1 == $details ) {
if ( -1 === $details ) {
return false;
} else {
// Clear old pre-serialized objects. Cache clients do better with that.
@ -360,7 +360,7 @@ function get_blog_option( $id, $option, $default_value = false ) {
$id = get_current_blog_id();
}
if ( get_current_blog_id() == $id ) {
if ( get_current_blog_id() === $id ) {
return get_option( $option, $default_value );
}
@ -407,7 +407,7 @@ function add_blog_option( $id, $option, $value ) {
$id = get_current_blog_id();
}
if ( get_current_blog_id() == $id ) {
if ( get_current_blog_id() === $id ) {
return add_option( $option, $value );
}
@ -434,7 +434,7 @@ function delete_blog_option( $id, $option ) {
$id = get_current_blog_id();
}
if ( get_current_blog_id() == $id ) {
if ( get_current_blog_id() === $id ) {
return delete_option( $option );
}
@ -463,7 +463,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
_deprecated_argument( __FUNCTION__, '3.1.0' );
}
if ( get_current_blog_id() == $id ) {
if ( get_current_blog_id() === $id ) {
return update_option( $option, $value );
}
@ -511,7 +511,7 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) {
* set the right vars, do the associated actions, but skip
* the extra unnecessary work
*/
if ( $new_blog_id == $prev_blog_id ) {
if ( $new_blog_id === $prev_blog_id ) {
/**
* Fires when the blog is switched.
*
@ -614,7 +614,7 @@ function restore_current_blog() {
$new_blog_id = array_pop( $GLOBALS['_wp_switched_stack'] );
$prev_blog_id = get_current_blog_id();
if ( $new_blog_id == $prev_blog_id ) {
if ( $new_blog_id === $prev_blog_id ) {
/** This filter is documented in wp-includes/ms-blogs.php */
do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' );
@ -693,7 +693,7 @@ function restore_current_blog() {
* @param int $old_site_id Old site ID.
*/
function wp_switch_roles_and_user( $new_site_id, $old_site_id ) {
if ( $new_site_id == $old_site_id ) {
if ( $new_site_id === $old_site_id ) {
return;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-57873';
$wp_version = '6.6-alpha-57874';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.