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