_get_block_template_file
- %1$s is private and should not be used in themes or plugins directly.
_get_block_template_file ( $template_type, $slug )
Access:Parameters:- (string) template_type Template type. Either 'wp_template' or 'wp_template_part'.
- (string) slug Template slug.
Returns:- (array|null) { Array with template metadata if $template_type is one of 'wp_template' or 'wp_template_part', null otherwise. @type string $slug Template slug. @type string $path Template file path. @type string $theme Theme slug. @type string $type Template type. @type string $area Template area. Only for 'wp_template_part'. @type string $title Optional. Template title. @type string[] $postTypes Optional. List of post types that the template supports. Only for 'wp_template'. }
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Retrieves the template file from the theme for a given slug.