{$template_type}_template_hierarchy

{$template_type}_template_hierarchy

Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.13.2.1

apply_filters('{$template_type}_template_hierarchy') is found 1 times:

  • /_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-template-loader.php line 102
    	public function get_item( $request ) {
    		$template_type = $request['template_type'];
    
    		// A list of template candidates, in descending order of priority.
    		$templates      = apply_filters( "{$template_type}_template_hierarchy", array( "{$template_type}.php" ) );
    		$template       = locate_template( $templates );
    		$block_template = resolve_block_template( $template_type, $templates, $template );
    
    		if ( empty( $block_template ) ) {
    			return new WP_Error( 'not_found', 'Template not found', array( 'status' => 404 ) );
    		}