messages_format_notifications

Fires right before returning the formatted message notifications.

Description

do_action( 'messages_format_notifications', (string) $action, (int) $item_id, (int) $secondary_item_id, (number) $total_items ); 

Parameters (4)

0. $action (string)
The type of message notification.
1. $item_id (int)
The primary item ID.
2. $secondary_item_id (int)
The secondary item id.
3. $total_items (number)
Total amount of items to format.

Usage

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

Defined (1)

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

/bp-messages/bp-messages-notifications.php  
  1. do_action( 'messages_format_notifications', $action, $item_id, $secondary_item_id, $total_items );