Define net and user admin constants for fetch-list case. Props scribu. fixes #15903
git-svn-id: http://svn.automattic.com/wordpress/trunk@17080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a96f9d899f
commit
65f14e4fd3
|
@ -57,6 +57,9 @@ case 'fetch-list' :
|
|||
$current_screen->is_network = 'false' === $current_screen->is_network ? false : true;
|
||||
$current_screen->is_user = 'false' === $current_screen->is_user ? false : true;
|
||||
|
||||
define( 'WP_NETWORK_ADMIN', $current_screen->is_network );
|
||||
define( 'WP_USER_ADMIN', $current_screen->is_user );
|
||||
|
||||
$wp_list_table = get_list_table( $_GET['list_args']['class'] );
|
||||
if ( ! $wp_list_table )
|
||||
die( '0' );
|
||||
|
|
|
@ -610,11 +610,6 @@ 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