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

722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
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

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.