From 5640b2b02c1dd2c953bfa6a0119d6d895e2a35db Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Wed, 22 Jun 2016 21:33:20 +0000 Subject: [PATCH] Multisite: Move call of `get_blog_details()` inside `ms_site_check()`. This allows the `ms_site_check` filter or `is_super_admin()` check to return `true` before `get_blog_details()` is used. Props danielbachhuber. Fixes #37118. git-svn-id: https://develop.svn.wordpress.org/trunk@37850 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/ms-load.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/ms-load.php b/src/wp-includes/ms-load.php index 7f9c28b2b6..759c2699d1 100644 --- a/src/wp-includes/ms-load.php +++ b/src/wp-includes/ms-load.php @@ -68,7 +68,6 @@ function wp_get_active_network_plugins() { * @return true|string Returns true on success, or drop-in file to include. */ function ms_site_check() { - $blog = get_blog_details(); /** * Filters checking the status of the current blog. @@ -85,6 +84,8 @@ function ms_site_check() { if ( is_super_admin() ) return true; + $blog = get_blog_details(); + if ( '1' == $blog->deleted ) { if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) return WP_CONTENT_DIR . '/blog-deleted.php';