2010-07-30 22:34:54 +02:00
|
|
|
<?php
|
2010-10-21 13:21:13 +02:00
|
|
|
/**
|
|
|
|
* WordPress Network Administration Bootstrap
|
|
|
|
*
|
|
|
|
* @package WordPress
|
2010-11-10 15:27:15 +01:00
|
|
|
* @subpackage Multisite
|
2010-10-21 13:21:13 +02:00
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
2010-07-30 22:34:54 +02:00
|
|
|
|
2012-01-05 21:50:54 +01:00
|
|
|
define( 'WP_NETWORK_ADMIN', true );
|
2010-07-30 22:34:54 +02:00
|
|
|
|
2010-11-10 15:27:15 +01:00
|
|
|
/** Load WordPress Administration Bootstrap */
|
|
|
|
require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
|
2010-07-30 22:34:54 +02:00
|
|
|
|
2016-09-27 17:39:29 +02:00
|
|
|
// Do not remove this check. It is required by individual network admin pages.
|
|
|
|
if ( ! is_multisite() ) {
|
2010-07-30 22:34:54 +02:00
|
|
|
wp_die( __( 'Multisite support is not enabled.' ) );
|
2016-09-27 17:39:29 +02:00
|
|
|
}
|
2010-07-30 22:34:54 +02:00
|
|
|
|
2014-03-25 22:07:15 +01:00
|
|
|
$redirect_network_admin_request = 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path );
|
|
|
|
|
2014-01-07 05:05:10 +01:00
|
|
|
/**
|
2016-05-22 20:01:30 +02:00
|
|
|
* Filters whether to redirect the request to the Network Admin.
|
2014-01-07 05:05:10 +01:00
|
|
|
*
|
|
|
|
* @since 3.2.0
|
|
|
|
*
|
2014-04-12 02:01:15 +02:00
|
|
|
* @param bool $redirect_network_admin_request Whether the request should be redirected.
|
2014-01-07 05:05:10 +01:00
|
|
|
*/
|
2011-04-20 22:19:50 +02:00
|
|
|
$redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
|
|
|
|
if ( $redirect_network_admin_request ) {
|
2010-07-30 22:34:54 +02:00
|
|
|
wp_redirect( network_admin_url() );
|
2010-12-09 19:02:54 +01:00
|
|
|
exit;
|
|
|
|
}
|
2011-04-20 22:19:50 +02:00
|
|
|
unset( $redirect_network_admin_request );
|