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