Changeset 5301 for trunk/bp-friends/bp-friends-template.php
- Timestamp:
- 11/08/2011 01:14:31 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-template.php
r4961 r5301 93 93 global $bp; 94 94 95 if ( !$friend_ids = wp_cache_get( 'friends_friend_ids_' . $bp->displayed_user->id, 'bp' ) ) {96 $friend_ids = BP_Friends_Friendship::get_random_friends( $bp->displayed_user->id);97 wp_cache_set( 'friends_friend_ids_' . $bp->displayed_user->id, $friend_ids, 'bp' );95 if ( !$friend_ids = wp_cache_get( 'friends_friend_ids_' . bp_displayed_user_id(), 'bp' ) ) { 96 $friend_ids = BP_Friends_Friendship::get_random_friends( bp_displayed_user_id() ); 97 wp_cache_set( 'friends_friend_ids_' . bp_displayed_user_id(), $friend_ids, 'bp' ); 98 98 } ?> 99 99 100 100 <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 $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 $bp->displayed_user->domain . bp_get_friends_slug() ?>"><?php _e('See All', 'buddypress') ?></a></span></h4> 102 102 103 103 <?php if ( $friend_ids ) { ?> … … 208 208 <?php wp_nonce_field( 'friends_search', '_wpnonce_friend_search' ) ?> 209 209 210 <input type="hidden" name="initiator" id="initiator" value="<?php echo esc_attr( $bp->displayed_user->id) ?>" />210 <input type="hidden" name="initiator" id="initiator" value="<?php echo esc_attr( bp_displayed_user_id() ) ?>" /> 211 211 212 212 </form> … … 268 268 $user_id = $friends_template->friendship->friend->id; 269 269 else if ( empty( $user_id ) && !isset( $friends_template->friendship->friend ) ) 270 $user_id = $bp->displayed_user->id;270 $user_id = bp_displayed_user_id(); 271 271 272 272 return apply_filters( 'bp_get_potential_friend_id', (int)$user_id ); … … 370 370 371 371 if ( !$user_id ) 372 $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id: $bp->loggedin_user->id;372 $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : $bp->loggedin_user->id; 373 373 374 374 $friend_ids = friends_get_friend_user_ids( $user_id );
Note: See TracChangeset
for help on using the changeset viewer.