bbp_get_blog_roles()

Get the available roles minus Forums’ dynamic roles

Description

Return

(array)

Source

File: bp-forums/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 Forums 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 );

	return apply_filters( 'bbp_get_blog_roles', $all_roles, $wp_roles );
}

Changelog

Changelog
Version Description
bbPress (r5064) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.