(template_type)_template_hierarchy
This filter is documented in wp-includes/template.php
Usage
add_filter( '(template_type)_template_hierarchy', 'wp_kama_template_type_hierarchy_filter' );
/**
* Function for `(template_type)_template_hierarchy` filter-hook.
*
* @param $template_hierarchy
*
* @return
*/
function wp_kama_template_type_hierarchy_filter( $template_hierarchy ){
// filter...
return $template_hierarchy;
}
- $template_hierarchy
- -
Where the hook is called
(template_type)_template_hierarchy
wp-includes/block-template-utils.php 1670
return apply_filters( "{$template_type}_template_hierarchy", $template_hierarchy );