bp_get_total_member_count()
Return the total member count in your BP instance.
Description
Since BuddyBoss 1.0.0, members directory lists all members, even if they have never been active. So, this function also uses bp_core_get_total_member_count, again.
Since BuddyPress 1.6, this function has used bp_core_get_active_member_count(), which counts non-spam, non-deleted users who have last_activity. This value will correctly match the total member count number used for pagination on member directories.
Before BuddyPress 1.6, this function used bp_core_get_total_member_count(), which did not take into account last_activity, and thus often resulted in higher counts than shown by member directory pagination.
Return
(int) Member count.
Source
File: bp-core/bp-core-template.php
function bp_get_total_member_count() { /** * Filters the total member count in your BP instance. * * @since BuddyPress 1.2.0 * * @param int $value Member count. */ return apply_filters( 'bp_get_total_member_count', bp_core_get_total_member_count() ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.2.0 | BuddyPress 1.2.0 |
BuddyBoss 1.0.0 Uses bp_core_get_total_member_count instead of bp_core_get_active_member_count | 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.