friends_count_invitable_friends( int $user_id, int $group_id )
Get a count of a user’s friends who can be invited to a given group.
Description
Users can invite any of their friends except:
- users who are already in the group
- users who have a pending invite to the group
- users who have been banned from the group
Parameters
- $user_id
-
(Required) ID of the user whose friends are being counted.
- $group_id
-
(Required) ID of the group friends are being invited to.
Return
(int) $invitable_count Eligible friend count.
Source
File: bp-friends/bp-friends-functions.php
function friends_count_invitable_friends( $user_id, $group_id ) { return BP_Friends_Friendship::get_invitable_friend_count( $user_id, $group_id ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.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.