bp_email_recipient

Fires inside __construct() method for BP_Email_Recipient class.

Description

do_action( 'bp_email_recipient', (string|array|int|WP_User) $email_or_user, (string) $name, (BP_Email_Recipient) $instance ); 

Parameters (3)

0. $email_or_user (string|array|int|WP_User)
Either a email address, user ID, WP_User object, or an array containing any combination of the above.
1. $name (string)
If $email_or_user is a string, this is the recipient's name.
2. $instance (BP_Email_Recipient)
Current instance of the email type class.

Usage

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

Defined (1)

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

/bp-core/classes/class-bp-email-recipient.php  
  1. do_action( 'bp_email_recipient', $email_or_user, $name, $this );