wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



pre_get_block_template › WordPress Filter Hooks

Da5.9.0
Deprecaton/a
apply_filters( 'pre_get_block_template', null, $id, $template_type )
Parametri: (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.
    Richiesto:
  • (string) $id Template unique identifier (example: 'theme_slug//template_slug').
    Richiesto:
  • (string) $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    Richiesto:
Definito a:
Codex:

Filters the block template object before the query takes place.

Return a non-null value to bypass the WordPress queries.





Sorgenti

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