is_user_admin() WP 1.0
Whether the current request is for a user admin screen.
e.g. /wp-admin/user/
Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities.
No Hooks.
Return
true/false. True if inside WordPress user administration pages.
Usage
is_user_admin();
Notes
- Global. WP_Screen. $current_screen WordPress current screen object.
Changelog
Since 3.1.0 | Introduced. |
Code of is_user_admin() is user admin WP 5.6
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)
- is_404()
- is_admin()
- is_archive()
- is_attachment()
- is_author()
- is_blog_admin()
- is_category()
- is_comment_feed()
- is_customize_preview()
- is_date()
- is_day()
- is_embed()
More from tag: Conditional tags (all)
- cat_is_ancestor_of()
- comments_open()
- email_exists()
- has_category()
- has_custom_header()
- has_excerpt()
- has_nav_menu()
- has_post_thumbnail()
- has_shortcode()
- has_tag()
- has_term()
- have_comments()
- have_posts()
- in_category()
- in_the_loop()
- is_active_sidebar()