friends_notification_new_request_message
Filters the message for the friend request email.
Description
apply_filters( 'friends_notification_new_request_message', (string) $value, (string) $tokens_initiator_name, (string) $tokens_initiator_url, (string) $tokens_friend_requests_url, (string) $var );
Parameters (5)
- 0. $value (string)
- Message to be used in friend request email.
- 1. $tokens_initiator_name (string)
- Name of the person requesting friendship.
- 2. $tokens_initiator_url (string)
- Profile link of person requesting friendship.
- 3. $tokens_friend_requests_url (string)
- User's friends request management link.
- 4. $var (string) =>
''
- Removed in 2.5; now an empty string.
Usage
- To run the hook, copy the example below.
- $value = apply_filters( 'friends_notification_new_request_message', $value, $tokens_initiator_name, $tokens_initiator_url, $tokens_friend_requests_url, $var );
- if ( !empty( $value ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the friends_notification_new_request_message callback
- function filter_friends_notification_new_request_message( $value, $tokens_initiator_name, $tokens_initiator_url, $tokens_friend_requests_url, $var ) {
- // make filter magic happen here...
- return $value;
- };
- // add the filter
- add_filter( 'friends_notification_new_request_message', 'filter_friends_notification_new_request_message', 10, 5 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'friends_notification_new_request_message', 'filter_friends_notification_new_request_message', 10, 5 );
Defined (1)
The filter is defined in the following location(s).
- /bp-core/deprecated/2.5.php
- $value = apply_filters( 'friends_notification_new_request_message', $value, $tokens['initiator.name'], $tokens['initiator.url'], $tokens['friend-requests.url'], '' );