frontpage_template filter-hookWP 1.5.0

Filters the path of the queried template by type.

This is one of the variants of the dynamic hook (type)_template

Usage

add_filter( 'frontpage_template', 'wp_kama_frontpage_template_filter', 10, 3 );

/**
 * Function for `frontpage_template` filter-hook.
 * 
 * @param string   $template  Path to the template. See locate_template().
 * @param string   $type      Sanitized filename without extension.
 * @param string[] $templates A list of template candidates, in descending order of priority.
 *
 * @return string
 */
function wp_kama_frontpage_template_filter( $template, $type, $templates ){

	// filter...
	return $template;
}
$template(string)
Path to the template. See locate_template().
$type(string)
Sanitized filename without extension.
$templates(string[])
A list of template candidates, in descending order of priority.

Changelog

Since 1.5.0 Introduced.
Since 4.8.0 The $type and $templates parameters were added.

Where the hook is called

get_query_template()
frontpage_template
wp-includes/template.php 103
return apply_filters( "{$type}_template", $template, $type, $templates );

Where the hook is used in WordPress

Usage not found.