diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:22 +0000 |
commit | fc0a79914946dac00ccd51b1aacffe267de7210e (patch) | |
tree | 1403384efbfe8f8776ff60aaa40f7d535c02c822 /wp-includes/ms-blogs.php | |
parent | Releasing progress-linux version 6.5.5+dfsg1-1~progress7.99u1. (diff) | |
download | wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.tar.xz wordpress-fc0a79914946dac00ccd51b1aacffe267de7210e.zip |
Merging upstream version 6.6.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/ms-blogs.php')
-rw-r--r-- | wp-includes/ms-blogs.php | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index b9575b3..2cf6d23 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -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. @@ -293,15 +293,11 @@ function refresh_blog_details( $blog_id = 0 ) { * * @since MU (3.0.0) * - * @global wpdb $wpdb WordPress database abstraction object. - * * @param int $blog_id Blog ID. * @param array $details Array of details keyed by blogs table field names. * @return bool True if update succeeds, false otherwise. */ function update_blog_details( $blog_id, $details = array() ) { - global $wpdb; - if ( empty( $details ) ) { return false; } @@ -360,7 +356,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 +403,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 +430,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 +459,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 ); } @@ -489,7 +485,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) { * @global int $blog_id * @global array $_wp_switched_stack * @global bool $switched - * @global string $table_prefix + * @global string $table_prefix The database table prefix. * @global WP_Object_Cache $wp_object_cache * * @param int $new_blog_id The ID of the blog to switch to. Default: current blog. @@ -511,7 +507,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. * @@ -599,7 +595,7 @@ function switch_to_blog( $new_blog_id, $deprecated = null ) { * @global array $_wp_switched_stack * @global int $blog_id * @global bool $switched - * @global string $table_prefix + * @global string $table_prefix The database table prefix. * @global WP_Object_Cache $wp_object_cache * * @return bool True on success, false if we're already on the current blog. @@ -614,7 +610,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 +689,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; } |