wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



pre_get_block_file_template › WordPress Filter Hooks

Seit5.9.0
Veraltetn/v
apply_filters( 'pre_get_block_file_template', null, $id, $template_type )
Parameter: (3)
  • () block_template Return block template object to short-circuit the default query, or null to allow WP to run its normal queries.
    Erforderlich: Ja
  • () id Template unique identifier (example: 'theme_slug//template_slug').
    Erforderlich: Ja
  • () template_type Template type. Either 'wp_template' or 'wp_template_part'.
    Erforderlich: Ja
Definiert in:
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.




Quellcode

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