📜  获取用户类型 wp php 代码示例

📅  最后修改于: 2022-03-11 14:54:48.077000             🧑  作者: Mango

代码示例1
$user_id = get_current_user_id();
    $user_info = get_userdata( $user_id );
    $user_roles = implode(', ', $user_info->roles);
    return $user_roles;