is_blog_admin

Whether the current request is for a site's admininstrative interface.

Description

is_blog_admin(); 

e.g. /wp-admin/

Does not check if the user is an administrator; current_user_can() for checking roles and capabilities.


Usage

  1. if ( !function_exists( 'is_blog_admin' ) ) { 
  2. require_once ABSPATH . WPINC . '/load.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_blog_admin(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/load.php  
  1. function is_blog_admin() { 
  2. if ( isset( $GLOBALS['current_screen'] ) ) 
  3. return $GLOBALS['current_screen']->in_admin( 'site' ); 
  4. elseif ( defined( 'WP_BLOG_ADMIN' ) ) 
  5. return WP_BLOG_ADMIN
  6.  
  7. return false;