bp_friend_get_total_requests_count( int $user_id )

Return the total friendship request count for a given user.


Parameters Parameters

$user_id

(int) (Required) ID of the user whose requests are being counted. Default: ID of the logged-in user.


Top ↑

Return Return

(int) Friend count.


Source Source

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

	function bp_friend_get_total_requests_count( $user_id = 0 ) {
		if ( empty( $user_id ) )
			$user_id = bp_loggedin_user_id();

		/**
		 * Filters the total friendship request count for a given user.
		 *
		 * @since 1.2.0
		 * @since 2.6.0 Added the `$user_id` parameter.
		 *
		 * @param int $value   Friendship request count.
		 * @param int $user_id ID of the queried user.
		 */
		return apply_filters( 'bp_friend_get_total_requests_count', count( BP_Friends_Friendship::get_friend_user_ids( $user_id, true ) ), $user_id );
	}


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.