Changeset 1957 for trunk/bp-messages.php
- Timestamp:
- 09/25/2009 10:15:42 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-messages.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages.php
r1952 r1957 556 556 } 557 557 558 function messages_ajax_autocomplete_results() {559 global $bp;560 561 $friends = false;562 563 // Get the friend ids based on the search terms564 if ( function_exists( 'friends_search_friends' ) )565 $friends = friends_search_friends( $_GET['q'], $bp->loggedin_user->id, $_GET['limit'], 1 );566 567 $friends = apply_filters( 'bp_friends_autocomplete_list', $friends, $_GET['q'], $_GET['limit'] );568 569 if ( $friends['friends'] ) {570 foreach ( $friends['friends'] as $user_id ) {571 $ud = get_userdata($user_id);572 $username = $ud->user_login;573 echo bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'width' => 15, 'height' => 15 ) ) . ' ' . bp_core_get_user_displayname( $user_id ) . ' (' . $username . ')574 ';575 }576 }577 }578 add_action( 'wp_ajax_messages_autocomplete_results', 'messages_ajax_autocomplete_results' );579 580 581 558 // List actions to clear super cached pages on, if super cache is installed 582 559 add_action( 'messages_delete_thread', 'bp_core_clear_cache' );
Note: See TracChangeset
for help on using the changeset viewer.