Filters the block template object before the query takes place.
Description
Return a non-null value to bypass the WordPress queries.
Parameters
$block_templateWP_Block_Template|null- Return block template object to short-circuit the default query, or null to allow WP to run its normal queries.
$idstring- Template unique identifier (example:
'theme_slug//template_slug'). $template_typestring- Template type. Either
'wp_template'or'wp_template_part'.
Source
$block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type );
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.