wpseek.com
WordPress开发者和主题制作者的搜索引擎



pre_get_block_file_template › WordPress过滤钩子

Since5.9.0
已弃用n/a
› apply_filters( 'pre_get_block_file_template', null, $id, $template_type )
参数: (3)
  • () block_template Return block template object to short-circuit the default query, or null to allow WP to run its normal queries.
    Required: Yes
  • () id Template unique identifier (example: 'theme_slug//template_slug').
    Required: Yes
  • () template_type Template type. Either 'wp_template' or 'wp_template_part'.
    Required: Yes
定义在:
文档:

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

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




源码

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