bp_document_get_total_group_document_count( int $group_id )
Get the document count of a given group.
Description
Parameters
- $group_id
-
(Required) ID of the group whose document are being counted.
Return
(int) document count of the group.
Source
File: bp-document/bp-document-functions.php
function bp_document_get_total_group_document_count( $group_id = 0 ) { if ( empty( $group_id ) && bp_get_current_group_id() ) { $group_id = bp_get_current_group_id(); } $count = wp_cache_get( 'bp_total_document_for_group_' . $group_id, 'bp' ); if ( false === $count ) { $count = BP_Document::total_group_document_count( $group_id ); wp_cache_set( 'bp_total_document_for_group_' . $group_id, $count, 'bp' ); } /** * Filters the total document count for a given group. * * @param int $count Total document count for a given group. * * @since BuddyBoss 1.4.0 */ return apply_filters( 'bp_document_get_total_group_document_count', (int) $count ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.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.