bp_get_total_unread_messages_count( int $user_id )
Get the unread messages count for the current inbox.
Description
Parameters
- $user_id
-
(Required) The user ID.
Return
(int) $unread_count Total inbox unread count for user.
Source
File: bp-messages/bp-messages-template.php
function bp_get_total_unread_messages_count( $user_id = 0 ) {
/**
* Filters the unread messages count for the current inbox.
*
* @since BuddyPress 1.0.0
*
* @param int $value Unread messages count for the current inbox.
*/
return apply_filters( 'bp_get_total_unread_messages_count', BP_Messages_Thread::get_inbox_count( $user_id ) );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.6.x Added $user_id argument. | 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.