bp_friends_sent_request_email

Fires after the new friend request email is sent.

Description

do_action( 'bp_friends_sent_request_email', (int) $tokens_friend_id, (string) $email_subject, (string) $email_content, (int) $tokens_friendship_id, (int) $tokens_initiator_id ); 

Parameters (5)

0. $tokens_friend_id (int)
ID of the request recipient.
1. $email_subject (string)
Text for the friend request subject field.
2. $email_content (string)
Text for the friend request message field.
3. $tokens_friendship_id (int)
ID of the friendship object.
4. $tokens_initiator_id (int)
ID of the friendship requester.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_friends_sent_request_email', $tokens_friend_id, $email_subject, $email_content, $tokens_friendship_id, $tokens_initiator_id ); 
The following example is for adding a hook callback.
  1. // define the bp_friends_sent_request_email callback 
  2. function action_bp_friends_sent_request_email( $tokens_friend_id, $email_subject, $email_content, $tokens_friendship_id, $tokens_initiator_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_friends_sent_request_email', 'action_bp_friends_sent_request_email', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_friends_sent_request_email', 'action_bp_friends_sent_request_email', 10, 5 ); 

Defined (1)

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

/bp-core/deprecated/2.5.php  
  1. do_action( 'bp_friends_sent_request_email', $tokens['friend.id'], $email_subject, $email_content, $tokens['friendship.id'], $tokens['initiator.id'] );