Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 02:45:59 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Replace direct references to $bp user domains with their functional equivalents. See #3994.

File:
1 edited

Legend:

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

    r5416 r5704  
    6060    global $bp; ?>
    6161
    62     <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>
    63     <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>
    64     <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>
     62    <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>
     63    <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>
     64    <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>
    6565
    6666<?php
     
    9999
    100100    <div class="info-group">
    101         <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() ) ?>"><?php _e('See All', 'buddypress') ?></a></span></h4>
     101        <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() ) ?>"><?php _e('See All', 'buddypress') ?></a></span></h4>
    102102
    103103        <?php if ( $friend_ids ) { ?>
     
    198198    global $friends_template, $bp;
    199199
    200     $action = $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/search/';
     200    $action = bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/search/';
    201201    $label = __( 'Filter Friends', 'buddypress' ); ?>
    202202
     
    320320                    'wrapper_class'     => 'friendship-button pending',
    321321                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    322                     'link_href'         => trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests' ),
     322                    'link_href'         => trailingslashit( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests' ),
    323323                    'link_text'         => __( 'Friendship Requested', 'buddypress' ),
    324324                    'link_title'        => __( 'Friendship Requested', 'buddypress' ),
     
    335335                    'wrapper_class'     => 'friendship-button is_friend',
    336336                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    337                     'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
     337                    'link_href'         => wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
    338338                    'link_text'         => __( 'Cancel Friendship', 'buddypress' ),
    339339                    'link_title'        => __( 'Cancel Friendship', 'buddypress' ),
     
    352352                    'wrapper_class'     => 'friendship-button not_friends',
    353353                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    354                     'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
     354                    'link_href'         => wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
    355355                    'link_text'         => __( 'Add Friend', 'buddypress' ),
    356356                    'link_title'        => __( 'Add Friend', 'buddypress' ),
     
    410410        }
    411411
    412         return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
     412        return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
    413413    }
    414414
     
    424424        }
    425425
    426         return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
     426        return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
    427427    }
    428428
Note: See TracChangeset for help on using the changeset viewer.