📅  最后修改于: 2022-03-11 14:54:48.077000             🧑  作者: Mango
$user_id = get_current_user_id();
$user_info = get_userdata( $user_id );
$user_roles = implode(', ', $user_info->roles);
return $user_roles;