wpseek.com
A WordPress-centric search engine for devs and theme authors



pre_get_block_file_template › WordPress Filter Hooks

Since5.9.0
Deprecatedn/a
apply_filters( 'pre_get_block_file_template', null, $id, $template_type )
Parameters: (3)
  • (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.
    Required: Yes
  • (string) $id Template unique identifier (example: 'theme_slug//template_slug').
    Required: Yes
  • (string) $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    Required: Yes
Defined at:
Codex:

Filters the block template object before the theme file discovery takes place.

Return a non-null value to bypass the WordPress theme file discovery.





Source

$block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type );