Skip to:
Content

BuddyPress.org

Changeset 1515


Ignore:
Timestamp:
06/04/2009 11:32:49 PM (17 years ago)
Author:
apeatling
Message:

Fixing random member, group and blog links.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1511 r1515  
    612612        global $bp, $wpdb;
    613613       
    614         if ( $bp->current_component == BP_MEMBERS_SLUG && isset( $_GET['random'] ) ) {
     614        if ( !$bp->current_component && isset( $_GET['random-member'] ) ) {
    615615                $user = BP_Core_User::get_random_users(1);
    616 
     616               
    617617                $ud = get_userdata( $user['users'][0]->user_id );
    618618                bp_core_redirect( $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/' . $ud->user_login );
    619619        }
    620620}
    621 add_action( 'wp', 'bp_core_get_random_member', 6 );
     621add_action( 'wp', 'bp_core_get_random_member' );
    622622
    623623/**
  • trunk/bp-core/bp-core-adminbar.php

    r1415 r1515  
    250250                <a href="#"><?php _e( 'Visit', 'buddypress' ) ?></a>
    251251                <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>
    253253
    254254                        <?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>
    256256                        <?php endif; ?>
    257257
  • trunk/bp-groups.php

    r1507 r1515  
    21022102        global $bp, $wpdb;
    21032103       
    2104         if ( $bp->current_component == $bp->groups->slug && isset( $_GET['random'] ) ) {
     2104        if ( $bp->current_component == $bp->groups->slug && isset( $_GET['random-group'] ) ) {
    21052105                $group = groups_get_random_group();
    21062106
Note: See TracChangeset for help on using the changeset viewer.