bp_media_get_total_media_count()
Get the media count of a user.
Description
Return
(int) media count of the user.
Source
File: bp-media/bp-media-functions.php
function bp_media_get_total_media_count( $user_id = 0 ) { if ( empty( $user_id ) ) $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : bp_loggedin_user_id(); $count = BP_Media::total_media_count( $user_id ); if ( empty( $count ) ) $count = 0; /** * Filters the total media count for a given user. * * @since BuddyBoss 1.0.0 * * @param int $count Total media count for a given user. */ return apply_filters( 'bp_media_get_total_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.