bp_messages_thread_after_delete

Fires after a message thread is either marked as deleted or deleted.

Description

do_action( 'bp_messages_thread_after_delete', (int) $thread_id, (array) $message_ids, (int) $user_id ); 

Parameters (3)

0. $thread_id (int)
ID of the thread being deleted.
1. $message_ids (array)
IDs of messages being deleted.
2. $user_id (int)
ID of the user the threads were deleted for.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_messages_thread_after_delete', $thread_id, $message_ids, $user_id ); 
The following example is for adding a hook callback.
  1. // define the bp_messages_thread_after_delete callback 
  2. function action_bp_messages_thread_after_delete( $thread_id, $message_ids, $user_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_messages_thread_after_delete', 'action_bp_messages_thread_after_delete', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_messages_thread_after_delete', 'action_bp_messages_thread_after_delete', 10, 3 ); 

Defined (1)

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

/bp-messages/classes/class-bp-messages-thread.php  
  1. do_action( 'bp_messages_thread_after_delete', $thread_id, $message_ids, $user_id );