function bp_message_get_recipient_tabs() { global $bp; if (isset($_GET['r'])) { $user_id = bp_core_get_userid_from_user_login($_GET['r']); if ($user_id) { ?> <li id="un-<?php echo $_GET['r']; ?> " class="friend-tab"> <span> <?php echo bp_core_get_avatar($user_id, 1, 15, 15); ?> <?php echo bp_core_get_userlink($user_id); ?> </span> <span class="p">X</span> </li> <?php } } }
/** * bp_core_get_displayed_userid() * * Returns the user id for the user that is currently being displayed. * eg: http://andy.domain.com/ or http://domain.com/andy/ * * @package BuddyPress Core * @global $current_blog WordPress global containing information and settings for the current blog being viewed. * @uses bp_core_get_userid_from_user_login() Returns the user id for the username passed * @return The user id for the user that is currently being displayed, return zero if this is not a user home and just a normal blog. */ function bp_core_get_displayed_userid($user_login) { return apply_filters('bp_core_get_displayed_userid', bp_core_get_userid_from_user_login($user_login)); }