On this page
apply_filters( 'get_block_file_template', WP_Block_Template|null $block_template, string $id, string $template_type )
Filters the block template object after it has been (potentially) fetched from the theme file.
Parameters
$block_templateWP_Block_Template|null-
The found block template, or null if there is none.
$idstring-
Template unique identifier (example: theme_slug//template_slug).
$template_typestring-
Template type:
'wp_template'or 'wp_template_part'.
Source
File: wp-includes/block-template-utils.php. View all references
return apply_filters( 'get_block_file_template', $block_template, $id, $template_type );
Related
Used By
| Used By | Description |
|---|---|
| get_block_file_template() wp-includes/block-template-utils.php | Retrieves a unified template object based on a theme file. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_block_file_template