get_epm_template

Get and include template files.

Description

get_epm_template( (string) $template_name, (array) $args = array(), (string) $template_path = '', (string) $default_path = '' ); 

Parameters (4)

0. $template_name (string)
The template name.
1. $args — Optional. (array) => array()
(default: array())
2. $template_path — Optional. (string) => ''
The template path.
3. $default_path — Optional. (string) => ''
The default path.

Usage

  1. if ( !function_exists( 'get_epm_template' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-peasy-mailchimp-ajax-form/includes/template.php'; 
  3.  
  4. // The template name. 
  5. $template_name = ''; 
  6.  
  7. // (default: array()) 
  8. $args = array(); 
  9.  
  10. // The template path. 
  11. $template_path = ''; 
  12.  
  13. // The default path. 
  14. $default_path = ''; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = get_epm_template($template_name, $args, $template_path, $default_path); 
  18.  

Defined (1)

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

/includes/template.php  
  1. function get_epm_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { 
  2. if ( $args && is_array($args) ) 
  3. extract( $args ); 
  4.  
  5. include( locate_epm_template( $template_name, $template_path, $default_path ) );