Remove Participant Role Capabilities
-
I’d like to remove the capability for participants to create and edit topics. They should keep their reply capabilities.
I’m using this code (along with attempting to use a couple different solutions which did not work), but I haven’t found anything that works. Can someone point me in the right direction? No plugins, i’m just looking for working code.
add_filter( 'bbp_get_caps_for_role', 'ST_add_role_caps_filter', 10, 2 );function ST_add_role_caps_filter( $caps, $role ){
if( $role == bbp_get_participant_role() ) {
$caps ['publish_topics']= false ;
}
return $caps;
}
- You must be logged in to reply to this topic.