Introduce is_multisite(). see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5fb2415de1
commit
f5e12260d4
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if ( !is_multisite() )
|
||||
wp_die( __('Multisite support is not enabled.') );
|
||||
|
||||
$title = __('WordPress MU › Admin');
|
||||
$parent_file = 'wpmu-admin.php';
|
||||
|
||||
|
@ -11,7 +14,7 @@ add_action( 'admin_head', 'index_css' );
|
|||
|
||||
require_once('admin-header.php');
|
||||
|
||||
if( is_site_admin() == false ) {
|
||||
if ( is_site_admin() == false ) {
|
||||
wp_die( __('You do not have permission to access this page.') );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if ( !is_multisite() )
|
||||
wp_die( __('Multisite support is not enabled.') );
|
||||
|
||||
if( is_site_admin() == false ) {
|
||||
wp_die( __('You do not have permission to access this page.') );
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if ( !is_multisite() )
|
||||
wp_die( __('Multisite support is not enabled.') );
|
||||
|
||||
$title = __('WordPress MU › Admin › Site Options');
|
||||
$parent_file = 'wpmu-admin.php';
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if ( !is_multisite() )
|
||||
wp_die( __('Multisite support is not enabled.') );
|
||||
|
||||
$title = __('WordPress MU › Admin › Blogs');
|
||||
$parent_file = 'wpmu-admin.php';
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if ( !is_multisite() )
|
||||
wp_die( __('Multisite support is not enabled.') );
|
||||
|
||||
require_once( ABSPATH . WPINC . '/http.php' );
|
||||
|
||||
$title = __('WordPress MU › Admin › Upgrade Site');
|
||||
$parent_file = 'wpmu-admin.php';
|
||||
require_once('admin-header.php');
|
||||
|
||||
if( is_site_admin() == false ) {
|
||||
if ( is_site_admin() == false ) {
|
||||
wp_die( __('You do not have permission to access this page.') );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
|
||||
if ( !is_multisite() )
|
||||
wp_die( __('Multisite support is not enabled.') );
|
||||
|
||||
$title = __('WordPress MU › Admin › Users');
|
||||
$parent_file = 'wpmu-admin.php';
|
||||
|
||||
|
|
|
@ -323,6 +323,20 @@ function is_admin() {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether Multisite support is enabled
|
||||
*
|
||||
* @since 3.0
|
||||
*
|
||||
* @return bool True if multisite is enabled, false otherwise.
|
||||
*/
|
||||
function is_multisite() {
|
||||
if ( defined('MULTISITE') )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( file_exists(WP_CONTENT_DIR . '/object-cache.php') ) {
|
||||
require_once (WP_CONTENT_DIR . '/object-cache.php');
|
||||
$_wp_using_ext_object_cache = true;
|
||||
|
@ -388,6 +402,11 @@ require (ABSPATH . WPINC . '/media.php');
|
|||
require (ABSPATH . WPINC . '/http.php');
|
||||
require (ABSPATH . WPINC . '/widgets.php');
|
||||
|
||||
if ( is_multisite() ) {
|
||||
require_once( ABSPATH . WPINC . '/ms-functions.php' );
|
||||
require_once( ABSPATH . WPINC . '/ms-default-filters.php' );
|
||||
}
|
||||
|
||||
if ( !defined('WP_CONTENT_URL') )
|
||||
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
|
||||
|
||||
|
|
Loading…
Reference in New Issue