Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/27/2012 02:37:27 PM (14 years ago)
Author:
boonebgorges
Message:

Cleanup of outdated URL parameters in Friends component.

Before BuddyPress 1.2, it was possible to set the order of a friends list
(alphabetical, newest, recently active) by appending the appropriate action
variable. This changeset cleans up some remaining remnants of this outdated
method of filtering:

  • Deprecates functions responsible for rendering related Alphabetical, Newest,

and Recently Active links

  • Cleans up Friends notification functions so that the deprecated URLs are not

applied to Friendship Accepted notifications

Fixes #4077

File:
1 edited

Legend:

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

    r5931 r6047  
    5858                return apply_filters( 'bp_get_friends_root_slug', $bp->friends->root_slug );
    5959        }
    60 
    61 /**
    62  * Displays Friends header tabs
    63  *
    64  * @package BuddyPress
    65  * @todo Deprecate?
    66  */
    67 function bp_friends_header_tabs() {
    68 ?>
    69 
    70         <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    71         <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/newest' ) ?>"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
    72         <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
    73 
    74 <?php
    75         do_action( 'friends_header_tabs' );
    76 }
    77 
    78 /**
    79  * Filters the title for the Friends component
    80  *
    81  * @package BuddyPress
    82  * @todo Deprecate?
    83  */
    84 function bp_friends_filter_title() {
    85         $current_filter = bp_action_variable( 0 );
    86 
    87         switch ( $current_filter ) {
    88                 case 'recently-active': default:
    89                         _e( 'Recently Active', 'buddypress' );
    90                         break;
    91                 case 'newest':
    92                         _e( 'Newest', 'buddypress' );
    93                         break;
    94                 case 'alphabetically':
    95                         _e( 'Alphabetically', 'buddypress' );
    96                         break;
    97         }
    98 }
    9960
    10061function bp_friends_random_friends() {
Note: See TracChangeset for help on using the changeset viewer.