Permalink
Browse files

Move ms_site_check() to after init and allow super admins to view blo…

…cked sites. see #13094

git-svn-id: http://svn.automattic.com/wordpress/trunk@14198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 9a92811 commit ff140f1d7627eb346caf4cebea3169d07d4c5ab9 ryan committed Apr 23, 2010
Showing with 19 additions and 9 deletions.
  1. +9 −0 wp-includes/ms-load.php
  2. +10 −9 wp-settings.php
@@ -38,6 +38,15 @@ function is_subdomain_install() {
function ms_site_check() {
global $wpdb, $current_blog;
+ // Allow short-circuiting
+ $check = apply_filters('ms_site_check', null);
+ if ( null !== $check )
+ return;
+
+ // Allow super admins to see blocked sites
+ if ( is_super_admin() )
+ return true;
+
if ( '1' == $current_blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
return WP_CONTENT_DIR . '/blog-deleted.php';
View
@@ -153,16 +153,8 @@
do_action( 'muplugins_loaded' );
-// Check site status if multisite.
-if ( is_multisite() ) {
- if ( true !== ( $file = ms_site_check() ) ) {
- require( $file );
- die();
- }
- unset($file);
-
+if ( is_multisite() )
ms_cookie_constants( );
-}
// Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
wp_cookie_constants( );
@@ -290,6 +282,15 @@
*/
do_action( 'init' );
+// Check site status
+if ( is_multisite() ) {
+ if ( true !== ( $file = ms_site_check() ) ) {
+ require( $file );
+ die();
+ }
+ unset($file);
+}
+
/**
* This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
*

0 comments on commit ff140f1

Please sign in to comment.