mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Check is_network in the screen object for AJAX requests. Props scribu. fixes #15903
git-svn-id: http://svn.automattic.com/wordpress/trunk@17077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cb88352144
commit
43a639929f
@ -610,6 +610,11 @@ function is_blog_admin() {
|
||||
* @return bool True if inside WordPress network administration pages.
|
||||
*/
|
||||
function is_network_admin() {
|
||||
if ( defined('DOING_AJAX') && function_exists('get_current_screen') ) {
|
||||
$screen = get_current_screen();
|
||||
return (bool) $screen->is_network;
|
||||
}
|
||||
|
||||
if ( defined( 'WP_NETWORK_ADMIN' ) )
|
||||
return WP_NETWORK_ADMIN;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user