bb_subscription_mail_message

The BuddyPress bb subscription mail message hook.

Description

apply_filters( 'bb_subscription_mail_message', (unknown) $var, (unknown) $post_id, (unknown) $topic_id ); 

Parameters (3)

0. $var (unknown) => __( "%1\$s wrote:\n\n%2\$s\n\nRead this post on the forums: %3\$s\n\nYou're getting this email because you subscribed to '%4\$s.'\nPlease click the link above, login, and click 'Unsubscribe' at the top of the page to stop receiving emails from this topic." )
The var.
1. $post_id (unknown)
The post id.
2. $topic_id (unknown)
The topic id.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-posts.php  
  1. if ( !$message = apply_filters( 'bb_subscription_mail_message', __( "%1\$s wrote:\n\n%2\$s\n\nRead this post on the forums: %3\$s\n\nYou're getting this email because you subscribed to '%4\$s.'\nPlease click the link above, login, and click 'Unsubscribe' at the top of the page to stop receiving emails from this topic." ), $post_id, $topic_id ) )