Skip to:
Content

BuddyPress.org

Ticket #655: autocomplete-message.2.diff

File autocomplete-message.2.diff, 1.3 KB (added by nicolagreco, 15 years ago)

Replace mu-plugins with BP_PLUGIN_DIR

  • .

     
    11<?php
     2
    23/* Load the WP environment */
    34require_once( preg_replace('%(.*)[/\\\\]wp-content[/\\\\].*%', '\1', dirname( __FILE__ ) ) . '/wp-load.php' );
    4 require_once( WP_CONTENT_DIR . '/mu-plugins/bp-core.php' );
    5 require_once( WP_CONTENT_DIR . '/mu-plugins/bp-friends.php' );
    65
     6/* Load the BP environment */
     7require_once( BP_PLUGIN_DIR . '/bp-core.php' );
     8require_once( BP_PLUGIN_DIR . '/bp-friends.php' );
     9
    710// Setup the $bp global array as it's not auto set outside of the normal WP enviro.
    811bp_core_setup_globals();
    912friends_setup_globals();
     
    1215$friends = friends_search_friends( $_GET['q'], $bp->loggedin_user->id, $_GET['limit'], 1 );
    1316
    1417if ( $friends['friends'] ) {
     18
    1519        foreach ( $friends['friends'] as $key => $friend ) {
     20
    1621                $ud = get_userdata($friend['user_id']);
    1722                $username = $ud->user_login;
    18                 echo bp_core_get_avatar( $friend['user_id'], 1, 15, 15 ) . ' ' . bp_fetch_user_fullname( $friend['user_id'], false ) . ' (' . $username . ')
    19                 ';
    20         }               
     23                echo bp_core_get_avatar( $friend['user_id'], 1, 15, 15 ) . ' ' . bp_fetch_user_fullname( $friend['user_id'], false ) . ' (' . $username . ')';
     24
     25        }
     26       
    2127}
    2228?>
     29 No newline at end of file