- Timestamp:
- 01/31/2017 08:31:10 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-component.php
r11360 r11405 266 266 } else { 267 267 $this->current_group = 0; 268 } 269 270 // Set group type if available. 271 if ( bp_is_groups_directory() && bp_is_current_action( bp_get_groups_group_type_base() ) && bp_action_variable() ) { 272 $matched_types = bp_groups_get_group_types( array( 273 'has_directory' => true, 274 'directory_slug' => bp_action_variable(), 275 ) ); 276 277 // Set 404 if we do not have a valid group type. 278 if ( empty( $matched_types ) ) { 279 bp_do_404(); 280 return; 281 } 282 283 // Set our directory type marker. 284 $this->current_directory_type = reset( $matched_types ); 268 285 } 269 286 … … 298 315 299 316 // If the user was attempting to access a group, but no group by that name was found, 404. 300 if ( bp_is_groups_component() && empty( $this->current_group ) && bp_current_action() && !in_array( bp_current_action(), $this->forbidden_names ) ) {317 if ( bp_is_groups_component() && empty( $this->current_group ) && empty( $this->current_directory_type ) && bp_current_action() && ! in_array( bp_current_action(), $this->forbidden_names ) ) { 301 318 bp_do_404(); 302 319 return;
Note: See TracChangeset
for help on using the changeset viewer.