_get_block_template_file


_get_block_template_file ( $template_type, $slug )

Access:
  • private
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:

Description

Retrieves the template file from the theme for a given slug.

Related Functions

_get_block_templates_files, get_block_template, get_block_templates, _get_block_templates_paths, get_the_block_template_html

Top Google Results

User discussions

wpseek mobile