Template extends Component

Handles template rendering.

Table of Contents

__construct()  : mixed
Class constructor.
add_admin_columns()  : array<string|int, mixed>
Adds admin columns.
add_menu_items()  : string
Adds menu items.
add_theme_class()  : array<string|int, mixed>
Adds theme class.
fetch_block()  : array<string|int, mixed>
Fetches template block.
fetch_blocks()  : array<string|int, mixed>
Fetches template blocks.
merge_blocks()  : array<string|int, mixed>
Merges template blocks.
remove_theme_header()  : bool
Removes theme header.
render_menu()  : mixed
Renders HivePress menu.
render_site_footer()  : mixed
Renders site footer.
render_site_header()  : mixed
Renders site header.
set_template_title()  : mixed
Sets template title.
_fetch_blocks()  : mixed
_merge_blocks()  : mixed
boot()  : mixed
Bootstraps component properties.
set_callbacks()  : mixed
Sets the action and filter callbacks.
set_property()  : mixed
Sets a property value.

Methods

__construct()

Class constructor.

public __construct([array<string|int, mixed> $args = [] ]) : mixed
Parameters
$args : array<string|int, mixed> = []

Component arguments.

Return values
mixed

add_admin_columns()

Adds admin columns.

public add_admin_columns(array<string|int, mixed> $columns) : array<string|int, mixed>
Parameters
$columns : array<string|int, mixed>

Columns.

Return values
array<string|int, mixed>

add_menu_items()

Adds menu items.

public add_menu_items(string $items, mixed $args) : string
Parameters
$items : string

Menu items.

$args : mixed

Menu arguments.

Return values
string

add_theme_class()

Adds theme class.

public add_theme_class(array<string|int, mixed> $classes) : array<string|int, mixed>
Parameters
$classes : array<string|int, mixed>

Body classes.

Return values
array<string|int, mixed>

fetch_block()

Fetches template block.

public fetch_block(array<string|int, mixed> &$template, string $name[, bool $remove = true ]) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>

Template blocks.

$name : string

Block name.

$remove : bool = true

Remove block?

Return values
array<string|int, mixed>

fetch_blocks()

Fetches template blocks.

public fetch_blocks(array<string|int, mixed> &$template, array<string|int, mixed> $names[, bool $remove = true ]) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>

Template blocks.

$names : array<string|int, mixed>

Block names.

$remove : bool = true

Remove block?

Return values
array<string|int, mixed>

merge_blocks()

Merges template blocks.

public merge_blocks(array<string|int, mixed> &$template, array<string|int, mixed> $blocks) : array<string|int, mixed>
Parameters
$template : array<string|int, mixed>

Template blocks.

$blocks : array<string|int, mixed>

Blocks to merge.

Return values
array<string|int, mixed>

remove_theme_header()

Removes theme header.

public remove_theme_header(bool $display) : bool
Parameters
$display : bool

Display theme header?

Return values
bool

set_template_title()

Sets template title.

public set_template_title(int $post_id, string $post_type) : mixed
Parameters
$post_id : int

Post ID.

$post_type : string

Post type.

Return values
mixed

_fetch_blocks()

protected _fetch_blocks(mixed &$template, mixed &$names, mixed $remove) : mixed
Parameters
$template : mixed
$names : mixed
$remove : mixed
Return values
mixed

_merge_blocks()

protected _merge_blocks(mixed &$template, mixed &$blocks) : mixed
Parameters
$template : mixed
$blocks : mixed
Return values
mixed

set_callbacks()

Sets the action and filter callbacks.

protected final set_callbacks(array<string|int, mixed> $callbacks) : mixed
Parameters
$callbacks : array<string|int, mixed>

Callback arguments.

Return values
mixed

set_property()

Sets a property value.

protected final set_property(string $name, mixed $value[, string $prefix = '' ]) : mixed
Parameters
$name : string

Property name.

$value : mixed

Property value.

$prefix : string = ''

Method prefix.

Return values
mixed