From 716eea408b7542ac5e7e3f75e1177da997cb6e8e Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Thu, 7 Mar 2019 03:45:26 +0000 Subject: [PATCH] Multisite: Fix code formatting errors from r44805 See #46351. git-svn-id: https://develop.svn.wordpress.org/trunk@44806 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-site.php | 2 +- tests/phpunit/tests/multisite/site.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/ms-site.php b/src/wp-includes/ms-site.php index b7a14c47f8..920e5d8b37 100644 --- a/src/wp-includes/ms-site.php +++ b/src/wp-includes/ms-site.php @@ -107,7 +107,7 @@ function wp_insert_site( array $data ) { // Rebuild the data expected by the `wpmu_new_blog` hook prior to 5.1.0 using whitelisted keys. // The `$site_data_whitelist` matches the one used in `wpmu_create_blog()`. $site_data_whitelist = array( 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ); - $meta = array_merge( array_intersect_key( $data, array_flip( $site_data_whitelist ) ), $meta ); + $meta = array_merge( array_intersect_key( $data, array_flip( $site_data_whitelist ) ), $meta ); /** * Fires immediately after a new site is created. diff --git a/tests/phpunit/tests/multisite/site.php b/tests/phpunit/tests/multisite/site.php index ff785c0a0a..9b53df1709 100644 --- a/tests/phpunit/tests/multisite/site.php +++ b/tests/phpunit/tests/multisite/site.php @@ -2379,8 +2379,7 @@ if ( is_multisite() ) : public function data_wpmu_new_blog_action_backward_commpatible() { return array( 'default values' => array( - array( - ), + array(), array( 'public' => 0, // `public` is one of the defaults metas in `wpmu_create_blog' function prior WordPress 5.1.0 'WPLANG' => 'en_US', // WPLANG is another default meta in `wpmu_create_blog` function prior WordPress 5.1.0. @@ -2392,7 +2391,7 @@ if ( is_multisite() ) : ), array( 'public' => 1, - 'WPLANG' => 'en_US' + 'WPLANG' => 'en_US', ), ), 'all whitelisted' => array(