WPDev.one
Core Function
View Source on Trac ↗

_build_block_template_result_from_file()

_build_block_template_result_from_file( mixed $template_file, mixed $template_type )

Builds a unified template object based on a theme file.

Parameters 2 required

Name / Type Description
$template_file
array

Theme file.

Required
$template_type
string

Template type. Either 'wp_template' or 'wp_template_part'.

Required

Return Value

(WP_Block_Template)
Template.

Function Information

Since Version
5.9.0
Source File
wp-includes/block-template-utils.php
Advertisement