# WordPress – Get a list of all user roles (existing in the site)

sometimes you need to see all of the user roles in your website, to do that Add this in functions.php:

function get_editable_roles() {
    global $wp_roles;
    $all_roles = $wp_roles->roles;
    $editable_roles = apply_filters('editable_roles', $all_roles);
    return $editable_roles;
}

Now, on some page of site (page-template, front-page, something, add:

screen-shot-2016-11-08-at-17-07-41

Now you have a list on the page of all the user roles and capabilities.
Note: Totally remove this on a production website, I would also remove the function altogether to avoid mistakes, and leaving this on by accident.