Skip to content

Instantly share code, notes, and snippets.

@DumahX
Created April 19, 2022 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DumahX/faf11aedce8857b964616b5032bd0f25 to your computer and use it in GitHub Desktop.
Save DumahX/faf11aedce8857b964616b5032bd0f25 to your computer and use it in GitHub Desktop.
Add custom bbPress role
<?php
function add_custom_role( $bbp_roles ) {
$bbp_roles['basic_member_role'] = array(
'name' => 'Basic Member',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
);
return $bbp_roles;
}
add_filter( 'bbp_get_dynamic_roles', 'add_custom_role' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment