Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bbPress - Custom Role Names
<?php
/*
Plugin Name: bbPress - Custom Role Names
Plugin URI: https://gist.github.com/ntwb/7864894
Description: bbPress - bbPress - Custom Role Names
Version: 0.1
Author: Stephen Edgar - Netweb
Author URI: http://netweb.com.au
*/
add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
function ntwb_bbpress_custom_role_names() {
return array(
// Keymaster
bbp_get_keymaster_role() => array(
'name' => 'My Custom Keymaster Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
),
// Moderator
bbp_get_moderator_role() => array(
'name' => 'My Custom Moderator Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
),
// Participant
bbp_get_participant_role() => array(
'name' => 'My Custom Participant Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
),
// Spectator
bbp_get_spectator_role() => array(
'name' => 'My Custom Spectator Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
),
// Blocked
bbp_get_blocked_role() => array(
'name' => 'My Custom Blocked Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.