Skip to content

Commit f9b59e9

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57874 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f870189 commit f9b59e9

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/wp-includes/ms-blogs.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
187187

188188
if ( $details ) {
189189
if ( ! is_object( $details ) ) {
190-
if ( -1 == $details ) {
190+
if ( -1 === $details ) {
191191
return false;
192192
} else {
193193
// Clear old pre-serialized objects. Cache clients do better with that.
@@ -207,7 +207,7 @@ function get_blog_details( $fields = null, $get_all = true ) {
207207
// If short was requested and full cache is set, we can return.
208208
if ( $details ) {
209209
if ( ! is_object( $details ) ) {
210-
if ( -1 == $details ) {
210+
if ( -1 === $details ) {
211211
return false;
212212
} else {
213213
// Clear old pre-serialized objects. Cache clients do better with that.
@@ -360,7 +360,7 @@ function get_blog_option( $id, $option, $default_value = false ) {
360360
$id = get_current_blog_id();
361361
}
362362

363-
if ( get_current_blog_id() == $id ) {
363+
if ( get_current_blog_id() === $id ) {
364364
return get_option( $option, $default_value );
365365
}
366366

@@ -407,7 +407,7 @@ function add_blog_option( $id, $option, $value ) {
407407
$id = get_current_blog_id();
408408
}
409409

410-
if ( get_current_blog_id() == $id ) {
410+
if ( get_current_blog_id() === $id ) {
411411
return add_option( $option, $value );
412412
}
413413

@@ -434,7 +434,7 @@ function delete_blog_option( $id, $option ) {
434434
$id = get_current_blog_id();
435435
}
436436

437-
if ( get_current_blog_id() == $id ) {
437+
if ( get_current_blog_id() === $id ) {
438438
return delete_option( $option );
439439
}
440440

@@ -463,7 +463,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
463463
_deprecated_argument( __FUNCTION__, '3.1.0' );
464464
}
465465

466-
if ( get_current_blog_id() == $id ) {
466+
if ( get_current_blog_id() === $id ) {
467467
return update_option( $option, $value );
468468
}
469469

@@ -511,7 +511,7 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) {
511511
* set the right vars, do the associated actions, but skip
512512
* the extra unnecessary work
513513
*/
514-
if ( $new_blog_id == $prev_blog_id ) {
514+
if ( $new_blog_id === $prev_blog_id ) {
515515
/**
516516
* Fires when the blog is switched.
517517
*
@@ -614,7 +614,7 @@ function restore_current_blog() {
614614
$new_blog_id = array_pop( $GLOBALS['_wp_switched_stack'] );
615615
$prev_blog_id = get_current_blog_id();
616616

617-
if ( $new_blog_id == $prev_blog_id ) {
617+
if ( $new_blog_id === $prev_blog_id ) {
618618
/** This filter is documented in wp-includes/ms-blogs.php */
619619
do_action( 'switch_blog', $new_blog_id, $prev_blog_id, 'restore' );
620620

@@ -693,7 +693,7 @@ function restore_current_blog() {
693693
* @param int $old_site_id Old site ID.
694694
*/
695695
function wp_switch_roles_and_user( $new_site_id, $old_site_id ) {
696-
if ( $new_site_id == $old_site_id ) {
696+
if ( $new_site_id === $old_site_id ) {
697697
return;
698698
}
699699

0 commit comments

Comments
 (0)