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-core/deprecated/1.6.php

    r6039 r6047  
    9393    _deprecated_function( __FUNCTION__, '1.6' );
    9494}
     95
     96/**
     97 * Friends functions
     98 */
     99
     100/**
     101 * Displays Friends header tabs
     102 *
     103 * @deprecated 1.6
     104 * @deprecated No longer used
     105 */
     106function bp_friends_header_tabs() {
     107    _deprecated_function( __FUNCTION__, '1.6', 'Since BuddyPress 1.2, BP has not supported ordering of friend lists by URL parameters.' );
     108?>
     109
     110    <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>
     111    <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>
     112    <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>
     113
     114<?php
     115    do_action( 'friends_header_tabs' );
     116}
     117
     118/**
     119 * Filters the title for the Friends component
     120 *
     121 * @deprecated 1.6
     122 * @deprecated No longer used
     123 */
     124function bp_friends_filter_title() {
     125    _deprecated_function( __FUNCTION__, '1.6', 'Since BuddyPress 1.2, BP has not supported ordering of friend lists by URL parameters.' );
     126
     127    $current_filter = bp_action_variable( 0 );
     128
     129    switch ( $current_filter ) {
     130        case 'recently-active': default:
     131            _e( 'Recently Active', 'buddypress' );
     132            break;
     133        case 'newest':
     134            _e( 'Newest', 'buddypress' );
     135            break;
     136        case 'alphabetically':
     137            _e( 'Alphabetically', 'buddypress' );
     138            break;
     139    }
     140}
     141
    95142
    96143/**
Note: See TracChangeset for help on using the changeset viewer.