Prevent half-baked loading of MS that would happen when constants are added into wp-config below the wp-settings include. Now it would error on the redefinition of the MULTISITE constant, instead of vague errors, and prevent any MS from loading. see #12848
git-svn-id: https://develop.svn.wordpress.org/trunk@14000 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2fc834c550
commit
1fa9e99992
@ -568,6 +568,9 @@ function is_admin() {
|
||||
* @return bool True if multisite is enabled, false otherwise.
|
||||
*/
|
||||
function is_multisite() {
|
||||
if ( defined( 'MULTISITE' ) && ! MULTISITE )
|
||||
return false;
|
||||
|
||||
if ( ( defined( 'MULTISITE' ) && MULTISITE ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) )
|
||||
return true;
|
||||
|
||||
|
@ -85,6 +85,8 @@ require( ABSPATH . WPINC . '/pomo/mo.php' );
|
||||
if ( is_multisite() ) {
|
||||
require( ABSPATH . WPINC . '/ms-blogs.php' );
|
||||
require( ABSPATH . WPINC . '/ms-settings.php' );
|
||||
} elseif ( ! defined( 'MULTISITE' ) ) {
|
||||
define( 'MULTISITE', false );
|
||||
}
|
||||
|
||||
// Stop most of WordPress from being loaded if we just want the basics.
|
||||
|
Loading…
Reference in New Issue
Block a user