is_admin

The WordPress Core is admin function.

Description

is_admin(); 

Usage

  1. if ( !function_exists( 'is_admin' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/noop.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_admin(); 
  7.  

Defined (2)

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

/wp-admin/includes/noop.php  
  1. function is_admin() {return true;} 
/wp-includes/load.php  
  1. function is_admin() { 
  2. if ( isset( $GLOBALS['current_screen'] ) ) 
  3. return $GLOBALS['current_screen']->in_admin(); 
  4. elseif ( defined( 'WP_ADMIN' ) ) 
  5. return WP_ADMIN
  6.  
  7. return false;