Created
December 8, 2013 22:58
-
-
Save ntwb/7864894 to your computer and use it in GitHub Desktop.
bbPress - Custom Role Names
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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