Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/12/2011 02:11:01 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Audit the usage of $bp->friends->slug. See #3325.

File:
1 edited

Legend:

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

    r4612 r4647  
    5252    global $bp; ?>
    5353
    54     <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->friends->slug ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    55     <li<?php if ( 'newest' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
    56     <li<?php if ( 'alphabetically' == $bp->action_variables[0] ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     54    <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>
     55    <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>
     56    <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>
    5757
    5858<?php
     
    8787
    8888    <div class="info-group">
    89         <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 $bp->displayed_user->domain . $bp->friends->slug ?>"><?php _e('See All', 'buddypress') ?> &rarr;</a></span></h4>
     89        <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 $bp->displayed_user->domain . bp_get_friends_slug() ?>"><?php _e('See All', 'buddypress') ?> &rarr;</a></span></h4>
    9090
    9191        <?php if ( $friend_ids ) { ?>
     
    186186    global $friends_template, $bp;
    187187
    188     $action = $bp->displayed_user->domain . $bp->friends->slug . '/my-friends/search/';
     188    $action = $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/search/';
    189189    $label = __( 'Filter Friends', 'buddypress' ); ?>
    190190
     
    308308                    'wrapper_class'     => 'friendship-button pending',
    309309                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    310                     'link_href'         => trailingslashit( $bp->loggedin_user->domain . $bp->friends->slug . '/requests' ),
     310                    'link_href'         => trailingslashit( $bp->loggedin_user->domain . bp_get_friends_slug() . '/requests' ),
    311311                    'link_text'         => __( 'Friendship Requested', 'buddypress' ),
    312312                    'link_title'        => __( 'Friendship Requested', 'buddypress' ),
     
    323323                    'wrapper_class'     => 'friendship-button is_friend',
    324324                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    325                     'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
     325                    'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
    326326                    'link_text'         => __( 'Cancel Friendship', 'buddypress' ),
    327327                    'link_title'        => __( 'Cancel Friendship', 'buddypress' ),
     
    340340                    'wrapper_class'     => 'friendship-button not_friends',
    341341                    'wrapper_id'        => 'friendship-button-' . $potential_friend_id,
    342                     'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
     342                    'link_href'         => wp_nonce_url( $bp->loggedin_user->domain . bp_get_friends_slug() . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ),
    343343                    'link_text'         => __( 'Add Friend', 'buddypress' ),
    344344                    'link_title'        => __( 'Add Friend', 'buddypress' ),
     
    398398        }
    399399
    400         return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ) );
     400        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' ) );
    401401    }
    402402
     
    412412        }
    413413
    414         return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ) );
     414        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' ) );
    415415    }
    416416
Note: See TracChangeset for help on using the changeset viewer.