/** * Recalculate the total number of active site members. * * @since BuddyPress (2.0.0) */ function bp_admin_repair_count_members() { $statement = __('Counting the number of active members on the site… %s', 'buddypress'); delete_transient('bp_active_member_count'); bp_core_get_active_member_count(); return array(0, sprintf($statement, __('Complete!', 'buddypress'))); }
/** * Returns the total member count in your BP instance * * 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. */ function bp_get_total_member_count() { return apply_filters('bp_get_total_member_count', bp_core_get_active_member_count()); }
/** * Return the total member count in your BP instance. * * 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. * * @since 1.2.0 * * @return int Member count. */ function bp_get_total_member_count() { /** * Filters the total member count in your BP instance. * * @since 1.2.0 * * @param int $value Member count. */ return apply_filters('bp_get_total_member_count', bp_core_get_active_member_count()); }
function kleo_bp_get_total_member_count_member_type() { $count = bp_core_get_active_member_count(); $member_type = bp_get_current_member_type(); if (bp_is_directory() && $member_type) { $count = kleo_bp_count_member_types($member_type); } return $count; }