From 43a639929f1c217a25145e7ce7137e36a3270d72 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 20 Dec 2010 11:57:25 +0000 Subject: [PATCH] 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 --- wp-includes/load.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/load.php b/wp-includes/load.php index a384f1e3de..96845facf9 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -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;