This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BBP_Forums_Group_Extension::setup_filters()
Setup the group forums class filters
Description
Source
File: bp-forums/groups.php
private function setup_filters() {
// Group forum pagination
add_filter( 'bbp_topic_pagination', array( $this, 'topic_pagination' ) );
add_filter( 'bbp_replies_pagination', array( $this, 'replies_pagination' ) );
// Tweak the redirect field
add_filter( 'bbp_new_topic_redirect_to', array( $this, 'new_topic_redirect_to' ), 10, 3 );
add_filter( 'bbp_new_reply_redirect_to', array( $this, 'new_reply_redirect_to' ), 10, 3 );
// Map forum/topic/replys permalinks to their groups
add_filter( 'bbp_get_forum_permalink', array( $this, 'map_forum_permalink_to_group' ), 10, 2 );
add_filter( 'bbp_get_topic_permalink', array( $this, 'map_topic_permalink_to_group' ), 10, 2 );
add_filter( 'bbp_get_reply_permalink', array( $this, 'map_reply_permalink_to_group' ), 10, 2 );
// Map reply edit links to their groups
add_filter( 'bbp_get_reply_edit_url', array( $this, 'map_reply_edit_url_to_group' ), 10, 2 );
// Map assorted template function permalinks
add_filter( 'post_link', array( $this, 'post_link' ), 10, 2 );
add_filter( 'page_link', array( $this, 'page_link' ), 10, 2 );
add_filter( 'post_type_link', array( $this, 'post_type_link' ), 10, 2 );
// Map group forum activity items to groups
add_filter( 'bbp_before_record_activity_parse_args', array( $this, 'map_activity_to_group' ) );
/** Caps **************************************************************/
// Only add these filters if inside a group forum
if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) ) {
// Allow group member to view private/hidden forums
add_filter( 'bbp_map_meta_caps', array( $this, 'map_group_forum_meta_caps' ), 10, 4 );
// Group member permissions to view the topic and reply forms
add_filter( 'bbp_current_user_can_access_create_topic_form', array( $this, 'form_permissions' ) );
add_filter( 'bbp_current_user_can_access_create_reply_form', array( $this, 'form_permissions' ) );
}
}
Changelog
| Version | Description |
|---|---|
| bbPress (r4552) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.