bpro_hook_before_email

Filters the email arguments before mailing.

Description

apply_filters( 'bpro_hook_before_email', (array) $mailme, (object) $user ); 

Parameters (2)

0. $mailme (array)
Array of email arguments for wp_mail.
1. $user (object)
User object for user being moderated.

Usage

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

Defined (1)

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

/includes/admin.php  
  1. $mailme_filtered = apply_filters( 'bpro_hook_before_email', $mailme, $user );