do_action( 'get_template_part', string $slug, string $name, string[] $templates, array $args )
Fires before a template part is loaded.
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.
Source
Changelog
Version | Description |
---|---|
5.5.0 | The $args parameter was added. |
5.2.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_template_part