bp_get_member_total_friend_count()

Return the friend count for the current member in the loop.


Description Description

Return value is a string of the form "x friends".


Top ↑

Return Return

(string) A string of the form "x friends".


Source Source

File: bp-friends/bp-friends-template.php

	function bp_get_member_total_friend_count() {
		global $members_template;

		$total_friend_count = (int) $members_template->member->total_friend_count;

		/**
		 * Filters text used to denote total friend count.
		 *
		 * @since 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',
			/* translators: %d: total friend count */
			sprintf( _n( '%d friend', '%d friends', $total_friend_count, 'buddypress' ), number_format_i18n( $total_friend_count ) )
		);
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.