diff --git bp-groups/bp-groups-loader.php bp-groups/bp-groups-loader.php
index 4a0b188..5301c71 100644
|
|
class BP_Groups_Component extends BP_Component { |
266 | 266 | bp_do_404(); |
267 | 267 | return; |
268 | 268 | |
269 | | // Skip the no_access check on home and membership request pages |
270 | | } elseif ( !bp_is_current_action( 'home' ) && !bp_is_current_action( 'request-membership' ) ) { |
271 | | |
272 | | // Off-limits to this user. Throw an error and redirect to the group's home page |
273 | | if ( is_user_logged_in() ) { |
| 269 | } else { |
| 270 | |
| 271 | // Skip the no_access check on home and membership request pages. Also check for access exemptions requested by plugins. |
| 272 | $access_exemption = apply_filters( 'bp_groups_access_exemption', false ); |
| 273 | |
| 274 | if ( bp_is_current_action( 'home' ) || bp_is_current_action( 'request-membership' ) || $access_exemption ) { |
| 275 | // If a plugin author has specifically allowed access to this pane, allow it. |
| 276 | // Do nothing; prevents bp_core_no_access from acting. |
| 277 | } elseif ( is_user_logged_in() ) { |
| 278 | // Off-limits to this user. Throw an error and redirect to the group's home page |
274 | 279 | bp_core_no_access( array( |
275 | 280 | 'message' => __( 'You do not have access to this group.', 'buddypress' ), |
276 | 281 | 'root' => bp_get_group_permalink( $bp->groups->current_group ) . 'home/', |
… |
… |
class BP_Groups_Component extends BP_Component { |
604 | 609 | function bp_setup_groups() { |
605 | 610 | buddypress()->groups = new BP_Groups_Component(); |
606 | 611 | } |
607 | | add_action( 'bp_setup_components', 'bp_setup_groups', 6 ); |
| 612 | add_action( 'bp_setup_components', 'bp_setup_groups', 6 ); |
| 613 | No newline at end of file |