2010-07-30 16:34:54 -04:00
|
|
|
<?php
|
2010-10-21 07:21:13 -04:00
|
|
|
/**
|
|
|
|
* WordPress Network Administration Bootstrap
|
|
|
|
*
|
|
|
|
* @package WordPress
|
2010-11-10 09:27:15 -05:00
|
|
|
* @subpackage Multisite
|
2010-10-21 07:21:13 -04:00
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
2010-07-30 16:34:54 -04:00
|
|
|
|
2012-01-05 15:50:54 -05:00
|
|
|
define( 'WP_NETWORK_ADMIN', true );
|
2010-07-30 16:34:54 -04:00
|
|
|
|
2010-11-10 09:27:15 -05:00
|
|
|
/** Load WordPress Administration Bootstrap */
|
|
|
|
require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
|
2010-07-30 16:34:54 -04:00
|
|
|
|
|
|
|
if ( ! is_multisite() )
|
|
|
|
wp_die( __( 'Multisite support is not enabled.' ) );
|
|
|
|
|
2011-04-20 16:19:50 -04:00
|
|
|
$redirect_network_admin_request = ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) );
|
2014-01-06 23:05:10 -05:00
|
|
|
/**
|
|
|
|
* Filter whether to redirect the request to the Network Admin.
|
|
|
|
*
|
|
|
|
* @since 3.2.0
|
|
|
|
*
|
|
|
|
* @param bool $redirect_user_admin_request Whether the request should be redirected.
|
|
|
|
*/
|
2011-04-20 16:19:50 -04:00
|
|
|
$redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
|
|
|
|
if ( $redirect_network_admin_request ) {
|
2010-07-30 16:34:54 -04:00
|
|
|
wp_redirect( network_admin_url() );
|
2010-12-09 13:02:54 -05:00
|
|
|
exit;
|
|
|
|
}
|
2011-04-20 16:19:50 -04:00
|
|
|
unset( $redirect_network_admin_request );
|