Templates implements Template_Loader

A WooCommerce template loader.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

version
1.1

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
Echo (output) the HTML for the specified template.
expand_template()  : mixed

Properties

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()

Echo (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.

Return values
mixed

expand_template()

private expand_template(mixed $template_name) : mixed
Parameters
$template_name : mixed
Return values
mixed

Search results