I tried this in a plugin recently but I can’t tell what it does:
add_action(‘wp_loaded’,’modify_participant’);
function ‘modify_participant'()
{
add_filter(‘mod_participant’, ‘upd_participant’);
}
function upd_participant($caps,$role)
{
$role = bbp_get_participant_role();
$caps = modify_capabilities($role);
}
function modify_capabilities($caps)
{
$caps = array(
// Topic caps
‘publish_topics’ => false,
‘edit_topics’ => false,
‘edit_others_topics’ => false,
‘delete_topics’ => false,
// Primary caps
‘spectate’ => true,
‘participate’ => true,
‘moderate’ => false,
‘throttle’ => false,
‘view_trash’ => false,
// Forum caps
‘publish_forums’ => false,
‘edit_forums’ => false,
‘edit_others_forums’ => false,
‘delete_forums’ => false,
‘delete_others_forums’ => false,
‘read_private_forums’ => false,
‘read_hidden_forums’ => false,
‘delete_others_topics’ => false,
‘read_private_topics’ => false,
// Reply caps
‘publish_replies’ => true,
‘edit_replies’ => true,
‘edit_others_replies’ => false,
‘delete_replies’ => false,
‘delete_others_replies’ => false,
‘read_private_replies’ => false,
// Topic tag caps
‘manage_topic_tags’ => false,
‘edit_topic_tags’ => false,
‘delete_topic_tags’ => false,
‘assign_topic_tags’ => false
);
return $caps;
}