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
檢視更多 >