pmpro_<type>_custom_template_path

The Paid Memberships Pro pmpro type custom template path hook.

Description

apply_filters( 'pmpro_<type>_custom_template_path', (unknown) $default_templates, (string) $page_name, (unknown) $type, (unknown) $where, (unknown) $ext ); 

Parameters (5)

0. $default_templates (unknown)
The default templates.
1. $page_name (string)
The page name.
2. $type (unknown)
The type.
3. $where (unknown)
The where.
4. $ext (unknown)
The ext.

Usage

To run the hook, copy the example below.
  1. $default_templates = apply_filters( 'pmpro_{$type}_custom_template_path', $default_templates, $page_name, $type, $where, $ext ); 
  2.  
  3. if ( !empty( $default_templates ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the pmpro_<type>_custom_template_path callback 
  2. function filter_pmpro_type_custom_template_path( $default_templates, $page_name, $type, $where, $ext ) { 
  3. // make filter magic happen here... 
  4. return $default_templates
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "pmpro_{$type}_custom_template_path", 'filter_pmpro_type_custom_template_path', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "pmpro_{$type}_custom_template_path", 'filter_pmpro_type_custom_template_path', 10, 5 ); 

Defined (1)

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

/includes/functions.php  
  1. $templates = apply_filters("pmpro_{$type}_custom_template_path", $default_templates, $page_name, $type, $where, $ext);