is_user_admin
Whether the current request is for a user admin screen.
Description
is_user_admin();
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(…)
.
Usage
if ( !function_exists( 'is_user_admin' ) ) { require_once ABSPATH . WPINC . '/load.php'; } // NOTICE! Understand what this does before running. $result = is_user_admin();
Defined (1)
The function is defined in the following location(s).
- /wp-includes/load.php
- 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;
- }