Changeset 11405 for trunk/src/bp-groups/bp-groups-screens.php
- Timestamp:
- 01/31/2017 08:31:10 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-screens.php
r11360 r11405 22 22 function groups_directory_groups_setup() { 23 23 if ( bp_is_groups_directory() ) { 24 // Set group type if available.25 if ( bp_is_current_action( bp_get_groups_group_type_base() ) && bp_action_variable() ) {26 $matched_types = bp_groups_get_group_types( array(27 'has_directory' => true,28 'directory_slug' => bp_action_variable(),29 ) );30 31 // Redirect back to group directory if no match.32 if ( empty( $matched_types ) ) {33 bp_core_redirect( bp_get_groups_directory_permalink() );34 }35 36 // Set our global variable.37 buddypress()->groups->current_directory_type = reset( $matched_types );38 }39 40 24 bp_update_is_directory( true, 'groups' ); 41 25
Note: See TracChangeset
for help on using the changeset viewer.