WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about pre_get_block_template

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/block-template-utils.php apply_filters 1027 /**
* Filters the block template object before the query takes place.
*
* Return a non-null value to bypass the WordPress queries.
*
* @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: `'wp_template'` or '`wp_template_part'`.
*/

Hook Parameters

Parameter Type Name Description
WP_Block_Template[]|null $block_templates Return an array of block templates to short-circuit the default query,
array $quer y {
string $template_type wp_template or wp_template_part.