is_admin()

Whether the current request is for an administrative interface page.


Description

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


Return

(bool) True if inside ClassicPress administration interface, false otherwise.


Source

File: wp-includes/load.php

function is_admin() {
	if ( isset( $GLOBALS['current_screen'] ) )
		return $GLOBALS['current_screen']->in_admin();
	elseif ( defined( 'WP_ADMIN' ) )
		return WP_ADMIN;

	return false;
}


Changelog

Changelog
Version Description
WP-1.5.1 Introduced.