WordPress get current user's role

<?php
function get_user_role() { // returns current user's role
	global $current_user;
	$user_roles = $current_user->roles;
	$user_role = array_shift($user_roles);
	return $user_role; // return translate_user_role( $user_role );
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *