WordPress at a glance

is_user_admin() WP 1.0

Whether the current request is for a user admin screen.

e.g. /wp-admin/user/

Does not inform on whether the user is an admin! Use capability checks to tell if the user should be accessing a section or not current_user_can().

  • Global. WP_Screen. $current_screen

No Hooks.


true/false. True if inside WordPress user administration pages.



Code of is_user_admin: wp-includes/load.php VER 4.9.8

function is_user_admin() {
	if ( isset( $GLOBALS['current_screen'] ) )
		return $GLOBALS['current_screen']->in_admin( 'user' );
	elseif ( defined( 'WP_USER_ADMIN' ) )
		return WP_USER_ADMIN;

	return false;

Related Functions

From tag: Conditional tags (page type and request)

More from tag: Conditional tags (all)

More from category: Multisite

No comments
    Hello, !     Log In . Register