BP_Media::total_user_group_media_count( int $user_id )
Count total groups media for the given user.
Description
Parameters
- $user_id
-
(Required)
Return
(array|bool|int)
Source
File: bp-media/classes/class-bp-media.php
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 | public static function total_user_group_media_count( $user_id = 0 ) { global $bp , $wpdb ; $privacy = bp_media_query_privacy( $user_id , 0, 'groups' ); $privacy = "'" . implode( "', '" , $privacy ) . "'" ; $total_count = (int) $wpdb ->get_var( "SELECT COUNT(*) FROM {$bp->media->table_name} WHERE user_id = {$user_id} AND privacy IN ({$privacy})" ); return $total_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.