Changeset 1515
- Timestamp:
- 06/04/2009 11:32:49 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
bp-core.php (modified) (1 diff)
-
bp-core/bp-core-adminbar.php (modified) (1 diff)
-
bp-groups.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r1511 r1515 612 612 global $bp, $wpdb; 613 613 614 if ( $bp->current_component == BP_MEMBERS_SLUG && isset( $_GET['random'] ) ) {614 if ( !$bp->current_component && isset( $_GET['random-member'] ) ) { 615 615 $user = BP_Core_User::get_random_users(1); 616 616 617 617 $ud = get_userdata( $user['users'][0]->user_id ); 618 618 bp_core_redirect( $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/' . $ud->user_login ); 619 619 } 620 620 } 621 add_action( 'wp', 'bp_core_get_random_member' , 6);621 add_action( 'wp', 'bp_core_get_random_member' ); 622 622 623 623 /** -
trunk/bp-core/bp-core-adminbar.php
r1415 r1515 250 250 <a href="#"><?php _e( 'Visit', 'buddypress' ) ?></a> 251 251 <ul class="random-list"> 252 <li><a href="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/?random ' ?>"><?php _e( 'Random Member', 'buddypress' ) ?></a></li>252 <li><a href="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/?random-member' ?>"><?php _e( 'Random Member', 'buddypress' ) ?></a></li> 253 253 254 254 <?php if ( function_exists('groups_install') ) : ?> 255 <li class="alt"><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/?random ' ?>"><?php _e( 'Random Group', 'buddypress' ) ?></a></li>255 <li class="alt"><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug . '/?random-group' ?>"><?php _e( 'Random Group', 'buddypress' ) ?></a></li> 256 256 <?php endif; ?> 257 257 -
trunk/bp-groups.php
r1507 r1515 2102 2102 global $bp, $wpdb; 2103 2103 2104 if ( $bp->current_component == $bp->groups->slug && isset( $_GET['random '] ) ) {2104 if ( $bp->current_component == $bp->groups->slug && isset( $_GET['random-group'] ) ) { 2105 2105 $group = groups_get_random_group(); 2106 2106
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)