函数原型
is_user_admin(): bool
函数描述
Determines whether the current request is for a user admin screen.
是否弃用
未弃用
函数参数
无
函数返回值
bool True if inside WordPress user administration pages.
函数位置
File: 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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |

