bp_get_thread_recipients_list()
Generate HTML links to the profiles of recipients in the current thread.
Description Description
Return Return
(string)
Source Source
File: bp-messages/bp-messages-template.php
function bp_get_thread_recipients_list() { global $thread_template; $recipient_links = array(); foreach( (array) $thread_template->thread->recipients as $recipient ) { if ( (int) $recipient->user_id !== bp_loggedin_user_id() ) { $recipient_link = bp_core_get_userlink( $recipient->user_id ); if ( empty( $recipient_link ) ) { $recipient_link = __( 'Deleted User', 'buddypress' ); } $recipient_links[] = $recipient_link; } else { $recipient_links[] = __( 'you', 'buddypress' ); } } // Concatenate to natural language string. $recipient_links = wp_sprintf_l( '%l', $recipient_links ); /** * Filters the HTML links to the profiles of recipients in the current thread. * * @since 2.2.0 * * @param string $value Comma-separated list of recipient HTML links for current thread. */ return apply_filters( 'bp_get_the_thread_recipients_list', $recipient_links ); }
Changelog Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |