2010-10-07 15:34:18 -04:00
|
|
|
<?php
|
2010-10-21 07:14:22 -04:00
|
|
|
/**
|
|
|
|
* WordPress User Administration Bootstrap
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Administration
|
|
|
|
* @since 3.1.0
|
|
|
|
*/
|
2010-10-07 15:34:18 -04:00
|
|
|
|
2017-11-30 18:11:00 -05:00
|
|
|
define( 'WP_USER_ADMIN', true );
|
2010-10-07 15:34:18 -04:00
|
|
|
|
2020-02-06 01:33:11 -05:00
|
|
|
require_once dirname( __DIR__ ) . '/admin.php';
|
2010-10-07 15:34:18 -04:00
|
|
|
|
2011-01-19 22:04:20 -05:00
|
|
|
if ( ! is_multisite() ) {
|
|
|
|
wp_redirect( admin_url() );
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2020-01-27 09:30:05 -05:00
|
|
|
$redirect_user_admin_request = ( 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ) );
|
|
|
|
|
2013-11-23 17:47:10 -05:00
|
|
|
/**
|
2016-05-22 14:01:30 -04:00
|
|
|
* Filters whether to redirect the request to the User Admin in Multisite.
|
2013-11-23 17:47:10 -05:00
|
|
|
*
|
|
|
|
* @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_user_admin_request = apply_filters( 'redirect_user_admin_request', $redirect_user_admin_request );
|
2020-01-27 09:30:05 -05:00
|
|
|
|
2011-04-20 16:19:50 -04:00
|
|
|
if ( $redirect_user_admin_request ) {
|
2010-10-07 15:34:18 -04:00
|
|
|
wp_redirect( user_admin_url() );
|
2010-12-09 13:02:54 -05:00
|
|
|
exit;
|
|
|
|
}
|
2020-01-27 09:30:05 -05:00
|
|
|
|
2011-04-20 16:19:50 -04:00
|
|
|
unset( $redirect_user_admin_request );
|