WordPress.org

Make WordPress Core

Changeset 17080


Ignore:
Timestamp:
12/20/10 13:30:39 (4 years ago)
Author:
ryan
Message:

Define net and user admin constants for fetch-list case. Props scribu. fixes #15903

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r16999 r17080  
    5757    $current_screen->is_network = 'false' === $current_screen->is_network ? false : true; 
    5858    $current_screen->is_user = 'false' === $current_screen->is_user ? false : true; 
     59 
     60    define( 'WP_NETWORK_ADMIN', $current_screen->is_network ); 
     61    define( 'WP_USER_ADMIN', $current_screen->is_user ); 
    5962 
    6063    $wp_list_table = get_list_table( $_GET['list_args']['class'] ); 
  • trunk/wp-includes/load.php

    r17077 r17080  
    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  
    618613    if ( defined( 'WP_NETWORK_ADMIN' ) ) 
    619614        return WP_NETWORK_ADMIN; 
Note: See TracChangeset for help on using the changeset viewer.