Templates implements Template_Loader
A WooCommerce template loader.
Tags
Interfaces, Classes and Traits
- Template_Loader
- An object which can load PHP templates.
Table of Contents
- $default_path : mixed
- $template_path : mixed
- __construct() : mixed
- get_default_path() : mixed
- get_template() : string
- Return the HTML for the specified template.
- get_template_path() : mixed
- load_template() : mixed
- Output the HTML for the specified template.
Properties
$default_path
private
mixed
$default_path
$template_path
private
mixed
$template_path
Methods
__construct()
public
__construct([mixed $theme_dir = '' ][, mixed $default_path = '' ]) : mixed
Parameters
- $theme_dir : mixed = ''
- $default_path : mixed = ''
Return values
mixed —get_default_path()
public
get_default_path() : mixed
Return values
mixed —get_template()
Return the HTML for the specified template.
public
get_template(mixed $template_name[, array<string|int, mixed> $args = [] ]) : string
Parameters
- $template_name : mixed
-
The template name (e.g. 'path/to/template.php')
- $args : array<string|int, mixed> = []
-
The template args.
Return values
string —The template HTML.
get_template_path()
public
get_template_path() : mixed
Return values
mixed —load_template()
Output the HTML for the specified template.
public
load_template(mixed $template_name[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $template_name : mixed
-
The template name (e.g. 'path/to/template.php')
- $args : array<string|int, mixed> = []
-
The template args.