WordPress开发者和主题制作者的搜索引擎



get_user_to_edit ›

Since2.0.5
已弃用n/a
get_user_to_edit ( $user_id )
参数:
  • (int) $user_id User ID.
    Required: Yes
返回:
  • (WP_User|bool) WP_User object on success, false on failure.
定义在:
文档:

Retrieve user data and filter it.



源码

function get_user_to_edit( $user_id ) {
	$user = get_userdata( $user_id );

	if ( $user ) {
		$user->filter = 'edit';
	}

	return $user;
}