I wish changes to survive updates. Include them in functions.php of my chid them
-
Hey there,
I have made some changes in bbpress/includes/core/capabilities.php
The changes alter the capabilities of roles.
I wish these changes to survive updates. So I would like to include these changes in the file functions.php of my child theme.
Changes are in bold:
Change 1
// Moderator
case bbp_get_moderator_role() :
$caps = array(// Primary caps
‘spectate’ => true,
‘participate’ => true,
‘moderate’ => false,
‘throttle’ => true,
‘view_trash’ => true,// Forum caps
‘publish_forums’ => false,
‘edit_forums’ => false ,
‘read_private_forums’ => true,
‘read_hidden_forums’ => true,// Topic caps
‘publish_topics’ => true,
‘edit_topics’ => true,
‘edit_others_topics’ => true,
‘delete_topics’ => true,
‘delete_others_topics’ => true,
‘read_private_topics’ => true,// Reply caps
‘publish_replies’ => true,
‘edit_replies’ => true,
‘edit_others_replies’ => true,
‘delete_replies’ => true,
‘delete_others_replies’ => true,
‘read_private_replies’ => true,// Topic tag caps
‘manage_topic_tags’ => true,
‘edit_topic_tags’ => true,
‘delete_topic_tags’ => true,
‘assign_topic_tags’ => true,
);break;
Change 2
// Participant/Default
case bbp_get_participant_role() :
default :
$caps = array(// Primary caps
‘spectate’ => true,
‘participate’ => true,// Forum caps
‘read_private_forums’ => true,// Topic caps
‘publish_topics’ => false,
‘edit_topics’ => false,// Reply caps
‘publish_replies’ => true,
‘edit_replies’ => true,// Topic tag caps
‘assign_topic_tags’ => true,
);break;
}return apply_filters( ‘bbp_get_caps_for_role’, $caps, $role );
}How can I include them in the file functions.php of my chid theme? Thank you very much in advance
- You must be logged in to reply to this topic.