Created
October 3, 2016 23:33
-
-
Save fearlex/e33fcc8774e9d64e47672e677665c9a9 to your computer and use it in GitHub Desktop.
Get Current User Role name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -- Get Current User Role. | |
global $wp_roles; | |
$roles = wp_get_current_user()->roles[ 0 ]; | |
$role_display = $wp_roles->roles[ $roles ][ 'name' ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment