Created
March 25, 2015 03:54
-
-
Save daronspence/819c002f998bb92bfcb5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
add_action('init', function(){ | |
global $wp_roles; | |
$roles = $wp_roles->roles; | |
$choices = array(); | |
foreach ( $roles as $key => $value ){ | |
if ( $key !== 'administrator') | |
continue; | |
$caps = $value['capabilities']; | |
foreach ( $caps as $cap_key => $cap_value ) | |
$choices[] = $cap_key; | |
} | |
var_dump($choices); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment