bbp_get_user_role_map()

Return a map of WordPress roles to bbPress roles. Used to automatically grant appropriate bbPress roles to WordPress users that wouldn’t already have a role in the forums. Also guarantees WordPress admins get the Keymaster role.


Description Description


Return Return

(array) Filtered array of WordPress roles to bbPress roles


Top ↑

Source Source

File: includes/users/capabilities.php

function bbp_get_user_role_map() {

	// Get the default role once here
	$default_role = bbp_get_default_role();

	// Filter & return
	return (array) apply_filters( 'bbp_get_user_role_map', array(
		'administrator' => bbp_get_keymaster_role(),
		'editor'        => $default_role,
		'author'        => $default_role,
		'contributor'   => $default_role,
		'subscriber'    => $default_role
	) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.