Changeset 6107 for trunk/bp-groups/bp-groups-actions.php
- Timestamp:
- 06/18/2012 12:43:03 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups/bp-groups-actions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-actions.php
r6093 r6107 291 291 } 292 292 293 /** 294 * Catches requests for a random group page (example.com/groups/?random-group) and redirects 295 */ 293 296 function groups_action_redirect_to_random_group() { 294 297 295 298 if ( bp_is_groups_component() && isset( $_GET['random-group'] ) ) { 296 $group = groups_get_groups( array( 'type' => 'random', 'per_page' => 1 ));299 $group = BP_Groups_Group::get_random( 1, 1 ); 297 300 298 301 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group['groups'][0]->slug . '/' );
Note: See TracChangeset
for help on using the changeset viewer.