Filters the block template object before the theme file discovery takes place.
Return a non-null value to bypass the WordPress theme file discovery.
$block_templateWP_Block_Template|null
$idstring
'theme_slug//template_slug').$template_typestring
'wp_template' or 'wp_template_part'.$block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type );
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_get_block_file_template