friends_format_notifications

Fires at the end of the bp-friends notification format callback.

Description

do_action( 'friends_format_notifications', (string) $action, (int) $item_id, (int) $secondary_item_id, (number) $total_items, (array|string) $return ); 

Parameters (5)

0. $action (string)
The kind of notification being rendered.
1. $item_id (int)
The primary item ID.
2. $secondary_item_id (int)
The secondary item id.
3. $total_items (number)
The total number of messaging-related notifications waiting for the user.
4. $return (array|string)
Notification text string or array of link and text.

Usage

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

Defined (1)

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

/bp-friends/bp-friends-notifications.php  
  1. do_action( 'friends_format_notifications', $action, $item_id, $secondary_item_id, $total_items, $return );