Changeset 21687 for trunk/wp-includes/load.php
- Timestamp:
- 08/31/2012 05:16:46 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/load.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/load.php
r21559 r21687 584 584 */ 585 585 function is_admin() { 586 if ( defined( 'WP_ADMIN' ) ) 586 if ( isset( $GLOBALS['current_screen'] ) ) 587 return $GLOBALS['current_screen']->in_admin(); 588 elseif ( defined( 'WP_ADMIN' ) ) 587 589 return WP_ADMIN; 590 588 591 return false; 589 592 } … … 600 603 */ 601 604 function is_blog_admin() { 602 if ( defined( 'WP_BLOG_ADMIN' ) ) 605 if ( isset( $GLOBALS['current_screen'] ) ) 606 return $GLOBALS['current_screen']->in_admin( 'blog' ); 607 elseif ( defined( 'WP_BLOG_ADMIN' ) ) 603 608 return WP_BLOG_ADMIN; 609 604 610 return false; 605 611 } … … 616 622 */ 617 623 function is_network_admin() { 618 if ( defined( 'WP_NETWORK_ADMIN' ) ) 624 if ( isset( $GLOBALS['current_screen'] ) ) 625 return $GLOBALS['current_screen']->in_admin( 'network' ); 626 elseif ( defined( 'WP_NETWORK_ADMIN' ) ) 619 627 return WP_NETWORK_ADMIN; 628 620 629 return false; 621 630 } … … 632 641 */ 633 642 function is_user_admin() { 634 if ( defined( 'WP_USER_ADMIN' ) ) 643 if ( isset( $GLOBALS['current_screen'] ) ) 644 return $GLOBALS['current_screen']->in_admin( 'user' ); 645 elseif ( defined( 'WP_USER_ADMIN' ) ) 635 646 return WP_USER_ADMIN; 647 636 648 return false; 637 649 }
Note: See TracChangeset
for help on using the changeset viewer.