Skip to content

Hook {prefix}_get_template_part

Javier edited this page Oct 22, 2021 · 1 revision

Important: This documentation is still under construction, methods and/or properties may be missing or not fully documented


do_action("{$prefix}_get_template_part", string $slug, string|null $name, array $templates, array $args);

Fires before a template part is loaded.


Description

The dynamic portion of the hook name, $prefix, refers to the prefix defined on Template class.


Parameters

$slug *(string) The slug name for the generic template.

$name *(string) The name of the specialized template.

$templates (string[]) Array of template files to search for, in order.

$args (array) Additional arguments passed to the template.


See Also


Change log

Version Description
1.2.0 Introduced

Clone this wiki locally