index_template_hierarchy
index_template_hierarchy
Appears in: gutenberg.18.2.0, gutenberg.18.5.0, gutenberg.18.6.1, gutenberg.18.7.1, gutenberg.18.9.0, gutenberg.19.0.0, gutenberg.19.1.0, gutenberg.19.2.0, gutenberg.19.4.0, gutenberg.19.6.1, gutenberg.19.6.4, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2, wordpress-6.7, wordpress-6.7.1, wordpress-6.7.2
Hook Type: filter
Displaying hooks found in version: wordpress-6.7.2apply_filters('index_template_hierarchy') is found 1 times:
- /wp-includes/block-template-utils.php line 152415201521152215231524152515261527152815291530
*/
function
get_template_hierarchy(
$slug
,
$is_custom
= false,
$template_prefix
=
''
) {
if
(
'index'
===
$slug
) {
/** This filter is documented in wp-includes/template.php */
return
apply_filters(
'index_template_hierarchy'
,
array
(
'index'
) );
}
if
(
$is_custom
) {
/** This filter is documented in wp-includes/template.php */
return
apply_filters(
'page_template_hierarchy'
,
array
(
'page'
,
'singular'
,
'index'
) );
}
if
(
'front-page'
===
$slug
) {