Action hook 'get_template_part'

in WP Core File wp-includes/general-template.php at line 204

Description

Fires before an attempt is made to locate and load a template part.

Occurrences

Filename Line Number
wp-includes/general-template.php 204

Parameters

Type Name Description
string $slug The slug name for the generic template.
string $name The name of the specialized template or an empty string if there is none.
string[] $templates Array of template files to search for, in order.
array $args Additional arguments passed to the template.

PHP Doc

/**
	 * Fires before an attempt is made to locate and load a template part.
	 *
	 * @since 5.2.0
	 * @since 5.5.0 The `$args` parameter was added.
	 *
	 * @param string   $slug      The slug name for the generic template.
	 * @param string   $name      The name of the specialized template or an empty
	 *                            string if there is none.
	 * @param string[] $templates Array of template files to search for, in order.
	 * @param array    $args      Additional arguments passed to the template.
	 */