From a58654d87e3997fc12c973e6f1d82e57aa244c18 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Mon, 24 Sep 2018 15:22:24 +0000 Subject: [PATCH] Multisite: Fix coding standard errors after [43654]. See #41333. Built from https://develop.svn.wordpress.org/trunk@43655 git-svn-id: http://core.svn.wordpress.org/trunk@43484 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-blogs.php | 22 ++++++++++++---------- wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 25424416fb..21d0820920 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -58,7 +58,7 @@ function get_blogaddress_by_id( $blog_id ) { */ function get_blogaddress_by_name( $blogname ) { if ( is_subdomain_install() ) { - if ( $blogname == 'main' ) { + if ( 'main' === $blogname ) { $blogname = 'www'; } $url = rtrim( network_home_url(), '/' ); @@ -178,12 +178,12 @@ function get_blog_details( $fields = null, $get_all = true ) { $blog_id = (int) $blog_id; - $all = $get_all == true ? '' : 'short'; + $all = $get_all ? '' : 'short'; $details = wp_cache_get( $blog_id . $all, 'blog-details' ); if ( $details ) { if ( ! is_object( $details ) ) { - if ( $details == -1 ) { + if ( -1 == $details ) { return false; } else { // Clear old pre-serialized objects. Cache clients do better with that. @@ -203,7 +203,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 ( $details == -1 ) { + if ( -1 == $details ) { return false; } else { // Clear old pre-serialized objects. Cache clients do better with that. @@ -1175,10 +1175,12 @@ function wp_uninitialize_site( $site_id ) { return new WP_Error( 'site_already_uninitialized', __( 'The site appears to be already uninitialized.' ) ); } - $users = get_users( array( - 'blog_id' => $site->id, - 'fields' => 'ids', - ) ); + $users = get_users( + array( + 'blog_id' => $site->id, + 'fields' => 'ids', + ) + ); // Remove users from the site. if ( ! empty( $users ) ) { @@ -1229,7 +1231,7 @@ function wp_uninitialize_site( $site_id ) { // Get indexed directory from stack $dir = $stack[ $index ]; - // phpcs:disable Generic.PHP.NoSilencedErrors.Discouraged + // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged $dh = @opendir( $dir ); if ( $dh ) { $file = @readdir( $dh ); @@ -1259,7 +1261,7 @@ function wp_uninitialize_site( $site_id ) { } } - // phpcs:enable Generic.PHP.NoSilencedErrors.Discouraged + // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged if ( $switch ) { restore_current_blog(); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0d8a3b5c2f..ae0c16804b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43654'; +$wp_version = '5.0-alpha-43655'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.