Created
December 22, 2015 16:15
-
-
Save maxkostinevich/d133177dfe746fa064b7 to your computer and use it in GitHub Desktop.
bbPress: User Roles Custom Titles
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 | |
add_filter( 'bbp_get_dynamic_roles', 'my_bbp_custom_role_names'); | |
function my_bbp_custom_role_names(){ | |
return array( | |
// Keymaster | |
bbp_get_keymaster_role() => array( | |
'name' => __( 'Keymaster', 'bbpress' ), | |
'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) | |
), | |
// Moderator | |
bbp_get_moderator_role() => array( | |
'name' => __( 'Moderator', 'bbpress' ), | |
'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) | |
), | |
// Participant | |
bbp_get_participant_role() => array( | |
'name' => __( 'Participant', 'bbpress' ), | |
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) | |
), | |
// Spectator | |
bbp_get_spectator_role() => array( | |
'name' => __( 'Spectator', 'bbpress' ), | |
'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() ) | |
), | |
// Blocked | |
bbp_get_blocked_role() => array( | |
'name' => __( 'Blocked', 'bbpress' ), | |
'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