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
This commit is contained in:
parent
6b35519559
commit
5640b2b02c
|
@ -68,7 +68,6 @@ function wp_get_active_network_plugins() {
|
||||||
* @return true|string Returns true on success, or drop-in file to include.
|
* @return true|string Returns true on success, or drop-in file to include.
|
||||||
*/
|
*/
|
||||||
function ms_site_check() {
|
function ms_site_check() {
|
||||||
$blog = get_blog_details();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters checking the status of the current blog.
|
* Filters checking the status of the current blog.
|
||||||
|
@ -85,6 +84,8 @@ function ms_site_check() {
|
||||||
if ( is_super_admin() )
|
if ( is_super_admin() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
$blog = get_blog_details();
|
||||||
|
|
||||||
if ( '1' == $blog->deleted ) {
|
if ( '1' == $blog->deleted ) {
|
||||||
if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
|
if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
|
||||||
return WP_CONTENT_DIR . '/blog-deleted.php';
|
return WP_CONTENT_DIR . '/blog-deleted.php';
|
||||||
|
|
Loading…
Reference in New Issue