WordPress.org

Make WordPress Core

Changeset 17077


Ignore:
Timestamp:
12/20/10 11:57:25 (5 years ago)
Author:
ryan
Message:

Check is_network in the screen object for AJAX requests. Props scribu. fixes #15903

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/load.php

    r16558 r17077  
    611611 */ 
    612612function is_network_admin() { 
     613    if ( defined('DOING_AJAX') && function_exists('get_current_screen') ) { 
     614        $screen = get_current_screen(); 
     615        return (bool) $screen->is_network; 
     616    } 
     617 
    613618    if ( defined( 'WP_NETWORK_ADMIN' ) ) 
    614619        return WP_NETWORK_ADMIN; 
Note: See TracChangeset for help on using the changeset viewer.