Skip to content

Instantly share code, notes, and snippets.

@tsquez
Created April 1, 2018 14:55
Show Gist options
  • Save tsquez/20d4895cd67777378a10fb4da06c49d1 to your computer and use it in GitHub Desktop.
Save tsquez/20d4895cd67777378a10fb4da06c49d1 to your computer and use it in GitHub Desktop.
Use this function to change the user role names in BBPres
function bbpress_custom_roles() {
return array(
bbp_get_keymaster_role() => array(// Keymaster
'name' => 'Custom Keymaster Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
),
// Moderator
bbp_get_moderator_role() => array(
'name' => 'Custom Moderator Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
),
// Participant
bbp_get_participant_role() => array(
'name' => 'Custom Participant Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
),
// Spectator
bbp_get_spectator_role() => array(
'name' => 'Custom Spectator Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
),
// Blocked
bbp_get_blocked_role() => array(
'name' => 'Custom Blocked Role Name',
'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
)
);
}
add_filter('bbp_get_dynamic_roles','bbpress_custom_roles');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment