get_block_file_template WordPress Filter Hook
The get_block_file_template hook is used to filter the path of the template file used to render the block.
apply_filters( 'get_block_file_template', WP_Block_Template|null $block_template , string $id , string $template_type ) #
Filters the array of queried block templates array after they’ve been fetched.
Parameters
- $block_template
(WP_Block_Template|null)The found block template, or null if there is none.
- $id
(string)Template unique identifier (example: theme_slug//template_slug).
- $template_type
(string)Template type:
'wp_template'
or 'wp_template_part'
.
Source
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |