get_block_template

过滤钩子


apply_filters( 'get_block_template', $block_template, $id, $template_type )
参数
  • (WP_Block_Template|null)
    $block_template
    The found block template, or null if there isn’t one.
    Required:
  • (string)
    $id
    Template unique identifier (example: theme_slug//template_slug).
    Required:
  • (array)
    $template_type
    Template type: `’wp_template’` or ‘`wp_template_part’`.
    Required:
定义位置
  • wp-includes/block-template-utils.php
    , line 1077
引入
5.9.0
弃用

Filters the queried block template object after it’s been fetched.

return apply_filters( 'get_block_template', $block_template, $id, $template_type );