activity_format_notifications

Fires right before returning the formatted activity notifications.

Description

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

Parameters (4)

0. $action (string)
The type of activity item.
1. $item_id (int)
The activity ID.
2. $secondary_item_id (int)
The user ID who inited the interaction.
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( 'activity_format_notifications', $action, $item_id, $secondary_item_id, $total_items ); 
The following example is for adding a hook callback.
  1. // define the activity_format_notifications callback 
  2. function action_activity_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( 'activity_format_notifications', 'action_activity_format_notifications', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'activity_format_notifications', 'action_activity_format_notifications', 10, 4 ); 

Defined (1)

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

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