Make WordPress Core

Changeset 15558


Ignore:
Timestamp:
09/02/2010 03:03:39 PM (14 years ago)
Author:
ryan
Message:

is_blog_admin(). fixes #14763

Location:
trunk
Files:
2 edited

Legend:

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

    r15481 r15558  
    1515    define('WP_ADMIN', TRUE);
    1616
    17 if ( !defined('WP_NETWORK_ADMIN') )
     17if ( !defined('WP_NETWORK_ADMIN') ) {
    1818    define('WP_NETWORK_ADMIN', FALSE);
     19    define('WP_BLOG_ADMIN', TRUE);
     20}
    1921
    2022if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
  • trunk/wp-includes/load.php

    r15482 r15558  
    554554
    555555/**
    556  * Whether the current request is in WordPress admin Panel
     556 * Whether the current request is for a network or blog admin page
    557557 *
    558558 * Does not inform on whether the user is an admin! Use capability checks to
     
    570570
    571571/**
    572  * Whether the current request is in WordPress network admin Panel
     572 * Whether the current request is for a blog admin screen /wp-admin/
     573 *
     574 * Does not inform on whether the user is a blog admin! Use capability checks to
     575 * tell if the user should be accessing a section or not.
     576 *
     577 * @since 3.1.0
     578 *
     579 * @return bool True if inside WordPress network administration pages.
     580 */
     581function is_blog_admin() {
     582    if ( defined( 'WP_BLOG_ADMIN' ) )
     583        return WP_BLOG_ADMIN;
     584    return false;
     585}
     586
     587/**
     588 * Whether the current request is for a network admin screen /wp-admin/network/
    573589 *
    574590 * Does not inform on whether the user is a network admin! Use capability checks to
Note: See TracChangeset for help on using the changeset viewer.