diff --git bp-groups/bp-groups-loader.php bp-groups/bp-groups-loader.php
index 4a0b188..223708c 100644
|
|
class BP_Groups_Component extends BP_Component { |
268 | 268 | |
269 | 269 | // Skip the no_access check on home and membership request pages |
270 | 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() ) { |
| 271 | |
| 272 | //Check for access exemptions requested by plugins |
| 273 | $access_exemption = apply_filters( 'bp_groups_access_exemption', false ); |
| 274 | |
| 275 | if ( $access_exemption ) { |
| 276 | // If a plugin author has specifically allowed access to this pane, allow it. |
| 277 | // Do nothing; prevents bp_core_no_access from acting. |
| 278 | } elseif ( is_user_logged_in() ) { |
| 279 | // Off-limits to this user. Throw an error and redirect to the group's home page |
274 | 280 | bp_core_no_access( array( |
275 | 281 | 'message' => __( 'You do not have access to this group.', 'buddypress' ), |
276 | 282 | 'root' => bp_get_group_permalink( $bp->groups->current_group ) . 'home/', |