custom_module_hook

The MailPoet Newsletters custom module hook hook.

Description

apply_filters( 'custom_module_hook', (string) $var, (unknown) $first_module, (string) $hook_name, (unknown) $hook_params ); 

Parameters (4)

0. $var (string) => ''
The var.
1. $first_module (unknown)
The first module.
2. $hook_name (string)
The hook name.
3. $hook_params (unknown)
The hook params.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'custom_module_hook', $var, $first_module, $hook_name, $hook_params ); 
  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 custom_module_hook callback 
  2. function filter_custom_module_hook( $var, $first_module, $hook_name, $hook_params ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'custom_module_hook', 'filter_custom_module_hook', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'custom_module_hook', 'filter_custom_module_hook', 10, 4 ); 

Defined (2)

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

/controllers/back/statistics.php  
  1. $this->data['first_module'] = apply_filters('custom_module_hook', '', $first_module, $hook_name, $hook_params); 
/controllers/ajax/statistics.php  
  1. return apply_filters('custom_module_hook', '', $module, $hook_name, $this->get_post_params());