bp_get_member_total_friend_count()
Return the friend count for the current member in the loop.
Description
Return value is a string of the form "x friends".
Return
(string) A string of the form "x friends".
Source
File: bp-friends/bp-friends-template.php
function bp_get_member_total_friend_count() {
global $members_template;
if ( 1 == (int) $members_template->member->total_friend_count ) {
/**
* Filters text used to denote total friend count.
*
* @since BuddyPress 1.2.0
*
* @param string $value String of the form "x friends".
* @param int $value Total friend count for current member in the loop.
*/
return apply_filters( 'bp_get_member_total_friend_count', sprintf( __( '%d connection', 'buddyboss' ), (int) $members_template->member->total_friend_count ) );
} else {
/** This filter is documented in bp-friends/bp-friends-template.php */
return apply_filters( 'bp_get_member_total_friend_count', sprintf( __( '%d connections', 'buddyboss' ), (int) $members_template->member->total_friend_count ) );
}
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.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.