bp_get_the_thread_message_id

Get the ID of the current message in the thread.

Description

(int) bp_get_the_thread_message_id(); 

Returns (int)


Usage

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

Defined (1)

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

/bp-messages/bp-messages-template.php  
  1. function bp_get_the_thread_message_id() { 
  2. global $thread_template; 
  3.  
  4. $thread_message_id = isset( $thread_template->message->id ) 
  5. ? (int) $thread_template->message->id 
  6. : null; 
  7.  
  8. /** 
  9. * Filters the ID of the current message in the thread. 
  10. * @since 1.9.0 
  11. * @param int $thread_message_id ID of the current message in the thread. 
  12. */ 
  13. return apply_filters( 'bp_get_the_thread_message_id', $thread_message_id );