Skip to:
Content

BuddyPress.org

Ticket #5950: 5950.patch

File 5950.patch, 987 bytes (added by imath, 10 years ago)
  • src/bp-friends/bp-friends-functions.php

    diff --git src/bp-friends/bp-friends-functions.php src/bp-friends/bp-friends-functions.php
    index 0e4a402..b62683b 100644
    function bp_friends_prime_mentions_results() { 
    594594                $result        = new stdClass();
    595595                $result->ID    = $user->user_nicename;
    596596                $result->image = bp_core_fetch_avatar( array( 'html' => false, 'item_id' => $user->ID ) );
    597                 $result->name  = bp_core_get_user_displayname( $user->ID );
     597                $result->name  = $user->user_nicename;
     598
     599                if ( ! empty( $user->display_name ) ) {
     600                        $result->name = $user->display_name;
     601                }
    598602
    599603                $results[] = $result;
    600604        }
    function bp_friends_prime_mentions_results() { 
    603607                'friends' => $results,
    604608        ) );
    605609}
    606 add_action( 'bp_activity_mentions_prime_results', 'bp_friends_prime_mentions_results' );
    607  No newline at end of file
     610add_action( 'bp_activity_mentions_prime_results', 'bp_friends_prime_mentions_results' );