Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/25/2011 12:11:32 AM (13 years ago)
Author:
boonebgorges
Message:

Global/slug audit in Friends component. See #3325

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-template.php

    r4822 r4845  
    5151    }
    5252
     53/**
     54 * Displays Friends header tabs
     55 *
     56 * @package BuddyPress
     57 * @todo Deprecate?
     58 */
    5359function bp_friends_header_tabs() {
    5460    global $bp; ?>
    5561
    56     <li<?php if ( !isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    57     <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
    58     <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     62    <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
     63    <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
     64    <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
    5965
    6066<?php
     
    6268}
    6369
     70/**
     71 * Filters the title for the Friends component
     72 *
     73 * @package BuddyPress
     74 * @todo Deprecate?
     75 */
    6476function bp_friends_filter_title() {
    65     global $bp;
    66 
    67     $current_filter = $bp->action_variables[0];
    68 
     77    $current_filter = bp_action_variable( 0 );
     78   
    6979    switch ( $current_filter ) {
    7080        case 'recently-active': default:
Note: See TracChangeset for help on using the changeset viewer.