hooked_block_types

过滤钩子
apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context )
参数
  • (string[]) $hooked_block_types The list of hooked block types.
    Required:
  • (string) $relative_position The relative position of the hooked blocks. Can be one of 'before', 'after', 'first_child', or 'last_child'.
    Required:
  • (string) $anchor_block_type The anchor block type.
    Required:
  • (WP_Block_Template|array) $context The block template, template part, or pattern that the anchor block belongs to.
    Required:
定义位置
相关勾子
allowed_block_types_allget_block_templatesregister_block_type_argsrest_prepare_block_typepre_get_block_templates
相关方法
get_hooked_blocksget_allowed_block_typesregister_block_typeget_block_templatesunregister_block_typedo_blocks
引入
6.4.0
弃用
-

过滤给定锚区块类型和相对位置的钩子区块类型列表。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );

常见问题

FAQs
查看更多 >