Changeset 4721
- Timestamp:
- 01/27/2013 12:38:01 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/extend/buddypress/group.php
r4717 r4721 111 111 add_filter( 'post_type_link', array( $this, 'post_type_link' ), 10, 2 ); 112 112 113 // Allow group member to view private/hidden forums114 add_filter( 'bbp_map_meta_caps', array( $this, 'map_group_forum_meta_caps' ), 99, 4 );115 116 113 // Map group forum activity items to groups 117 114 add_filter( 'bbp_before_record_activity_parse_args', array( $this, 'map_activity_to_group' ) ); … … 120 117 add_filter( 'bbp_get_forum_subforum_count_int', array( $this, 'no_subforums_yet' ) ); 121 118 122 // Group member permissions to view the topic and reply forms 123 add_filter( 'bbp_current_user_can_access_create_topic_form', array( $this, 'form_permissions' ) ); 124 add_filter( 'bbp_current_user_can_access_create_reply_form', array( $this, 'form_permissions' ) ); 119 /** Caps **************************************************************/ 120 121 // Only add these filters if inside a group forum 122 if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) ) { 123 124 // Allow group member to view private/hidden forums 125 add_filter( 'bbp_map_meta_caps', array( $this, 'map_group_forum_meta_caps' ), 10, 4 ); 126 127 // Group member permissions to view the topic and reply forms 128 add_filter( 'bbp_current_user_can_access_create_topic_form', array( $this, 'form_permissions' ) ); 129 add_filter( 'bbp_current_user_can_access_create_reply_form', array( $this, 'form_permissions' ) ); 130 } 125 131 } 126 132 … … 178 184 */ 179 185 public function map_group_forum_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) { 180 181 // Bail if not viewing a group forum182 if ( ! bp_is_single_item() || ! bp_is_groups_component() || ! bp_is_current_action( 'forum' ) )183 return $caps;184 186 185 187 switch ( $cap ) {
Note: See TracChangeset
for help on using the changeset viewer.