Description
Filters the block template object before the theme file discovery takes place. Return a non-null value to bypass the WordPress theme file discovery.
Occurrences
Filename | Line Number |
---|---|
wp-includes/block-template-utils.php | 1238 |
Parameters
Type | Name | Description |
---|---|---|
WP_Block_Template|null | $block_template | Return block template object to short-circuit the default query, or null to allow WP to run its normal queries. |
string | $id | Template unique identifier (example: 'theme_slug//template_slug'). |
string | $template_type | Template type. Either 'wp_template' or 'wp_template_part'. |
PHP Doc
/**
* Filters the block template object before the theme file discovery takes place.
*
* Return a non-null value to bypass the WordPress theme file discovery.
*
* @since 5.9.0
*
* @param WP_Block_Template|null $block_template Return block template object to short-circuit the default query,
* or null to allow WP to run its normal queries.
* @param string $id Template unique identifier (example: 'theme_slug//template_slug').
* @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'.
*/