bp_activity_new_comment_notification_message

Filters the new comment notification message that will be sent to user.

Description

apply_filters( 'bp_activity_new_comment_notification_message', (string) $value, (string) $tokens_poster_name, (string) $tokens_content, (string) $tokens_thread_url, (string) $var ); 

Parameters (5)

0. $value (string)
Email notification message text.
1. $tokens_poster_name (string)
Name of the person who made the comment.
2. $tokens_content (string)
Content of the comment.
3. $tokens_thread_url (string)
URL permalink for the activity thread.
4. $var (string) => ''
Removed in 2.5; now an empty string.

Usage

To run the hook, copy the example below.
  1. $value = apply_filters( 'bp_activity_new_comment_notification_message', $value, $tokens_poster_name, $tokens_content, $tokens_thread_url, $var ); 
  2.  
  3. if ( !empty( $value ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_activity_new_comment_notification_message callback 
  2. function filter_bp_activity_new_comment_notification_message( $value, $tokens_poster_name, $tokens_content, $tokens_thread_url, $var ) { 
  3. // make filter magic happen here... 
  4. return $value
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_activity_new_comment_notification_message', 'filter_bp_activity_new_comment_notification_message', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_activity_new_comment_notification_message', 'filter_bp_activity_new_comment_notification_message', 10, 5 ); 

Defined (1)

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

/bp-core/deprecated/2.5.php  
  1. $value = apply_filters( 'bp_activity_new_comment_notification_message', $value, $tokens['poster.name'], $tokens['content'], $tokens['thread.url'], '' );