bp_get_message_thread_unread_count

Get the current thread's unread count.

Description

(int) bp_get_message_thread_unread_count(); 

Returns (int)


Usage

  1. if ( !function_exists( 'bp_get_message_thread_unread_count' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-messages/bp-messages-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_message_thread_unread_count(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-messages/bp-messages-template.php  
  1. function bp_get_message_thread_unread_count() { 
  2. global $messages_template; 
  3.  
  4. $count = ! empty( $messages_template->thread->unread_count ) 
  5. ? (int) $messages_template->thread->unread_count 
  6. : false; 
  7.  
  8. /** 
  9. * Filters the current thread's unread count. 
  10. * @since 1.0.0 
  11. * @param int $count Current thread unread count. 
  12. */