bp_get_thread_recipients_list()
Generate HTML links to the profiles of recipients in the current thread.
Description
Return
(string)
Source
File: bp-messages/bp-messages-template.php
1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 | 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' , 'buddyboss' ); } $recipient_links [] = $recipient_link ; } else { $recipient_links [] = __( 'you' , 'buddyboss' ); } } // 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 BuddyPress 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
Version | Description |
---|---|
BuddyPress 2.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.