bbp_get_blog_roles()
Get the available roles, minus the dynamic roles that come with bbPress
Description Description
Return Return
(array)
Source Source
File: includes/core/capabilities.php
function bbp_get_blog_roles() {
// Get WordPress's roles (returns $wp_roles global)
$wp_roles = bbp_get_wp_roles();
// Apply the WordPress 'editable_roles' filter to let plugins ride along.
//
// We use this internally via bbp_filter_blog_editable_roles() to remove
// any custom bbPress roles that are added to the global.
$the_roles = isset( $wp_roles->roles ) ? $wp_roles->roles : false;
$all_roles = apply_filters( 'editable_roles', $the_roles );
// Filter & return
return apply_filters( 'bbp_get_blog_roles', $all_roles, $wp_roles );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.4.0 | Introduced. |