/** * Get the member count for a group. * * @param int $group_id Group ID. * * @return int Count of confirmed members for the group. */ function groups_get_total_member_count($group_id) { return BP_Groups_Group::get_total_member_count($group_id); }
/** * Refresh the total_member_count for a group. * * @since BuddyPress (1.8.0) * * @param int $group_id ID of the group. * * @return bool True on success, false on failure. */ public static function refresh_total_member_count_for_group($group_id) { return groups_update_groupmeta($group_id, 'total_member_count', (int) BP_Groups_Group::get_total_member_count($group_id)); }