Changeset 3917 for trunk/bp-blogs/bp-blogs-actions.php
- Timestamp:
- 01/25/2011 08:58:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-actions.php
r3761 r3917 1 1 <?php 2 2 3 function bp_blogs_redirect_to_random_blog() { 4 global $bp, $wpdb; 5 6 if ( bp_is_blogs_component() && isset( $_GET['random-blog'] ) ) { 7 $blog = bp_blogs_get_random_blogs( 1, 1 ); 8 9 bp_core_redirect( get_site_url( $blog['blogs'][0]->blog_id ) ); 10 } 11 } 12 add_action( 'bp_actions', 'bp_blogs_redirect_to_random_blog' ); 13 3 14 ?>
Note: See TracChangeset
for help on using the changeset viewer.