[wp-hackers] List all capabilities

Ryan Bilesky rbilesky at gmail.com
Thu Jan 20 18:18:20 UTC 2011


Ok I think I may have found it, all roles and capabilities appear to be
stored in an option called (dbprefix)_user_roles in an array format like:

array (
        'rolename' => array (
                'name' => 'rolename',
                'capabilities' => array()
        )
)

Now it the a better method, or should I just
global $wpdb;
$roles = get_option($wpdb->prefix . 'user_roles');
and then loop though each role and get it's capability array than merge.

On Wed, Jan 19, 2011 at 9:44 AM, Ryan Bilesky <rbilesky at gmail.com> wrote:

> I was woundering how could I get a list of all the possible capabilities, I
> mean I could hardcode all the default stuff but I want to get the actual
> list from wordpress to incluee custom stuff added by other plugins.
>


More information about the wp-hackers mailing list