Skip to content

Instantly share code, notes, and snippets.

@norico norico/user role Secret
Created Feb 26, 2019

What would you like to do?
$current_user_role = get_current_user_role();
function get_current_user_role(){
global $current_user;
$user_role = array_shift($current_user->roles);
return translate_user_role(ucfirst($user_role) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.