author | ymh <ymh.work@gmail.com> |
Tue, 27 Sep 2022 16:37:53 +0200 | |
changeset 19 | 3d72ae0968f4 |
parent 16 | a86126ab1dd4 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress Network Administration Bootstrap |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Multisite |
|
7 |
* @since 3.1.0 |
|
8 |
*/ |
|
9 |
||
10 |
define( 'WP_NETWORK_ADMIN', true ); |
|
11 |
||
12 |
/** Load WordPress Administration Bootstrap */ |
|
16 | 13 |
require_once dirname( __DIR__ ) . '/admin.php'; |
0 | 14 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
15 |
// Do not remove this check. It is required by individual network admin pages. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
16 |
if ( ! is_multisite() ) { |
0 | 17 |
wp_die( __( 'Multisite support is not enabled.' ) ); |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
18 |
} |
0 | 19 |
|
16 | 20 |
$redirect_network_admin_request = ( 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ) ); |
5 | 21 |
|
22 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
23 |
* Filters whether to redirect the request to the Network Admin. |
5 | 24 |
* |
25 |
* @since 3.2.0 |
|
26 |
* |
|
27 |
* @param bool $redirect_network_admin_request Whether the request should be redirected. |
|
28 |
*/ |
|
0 | 29 |
$redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request ); |
16 | 30 |
|
0 | 31 |
if ( $redirect_network_admin_request ) { |
32 |
wp_redirect( network_admin_url() ); |
|
33 |
exit; |
|
34 |
} |
|
16 | 35 |
|
0 | 36 |
unset( $redirect_network_admin_request ); |