allowed_block_types_all

過濾鉤子
apply_filters( 'allowed_block_types_all', $allowed_block_types, $block_editor_context )
引數
  • (bool|string[]) $allowed_block_types Array of block type slugs, or boolean to enable/disable all. Default true (all registered block types supported).
    Required:
  • (WP_Block_Editor_Context) $block_editor_context The current block editor context.
    Required:
定義位置
相關勾子
excerpt_allowed_blocksregister_block_type_argsblock_categories_allallowed_themesallowed_options
相關方法
get_allowed_block_typesget_allowed_mime_typesfilter_block_kses_valueget_allowed_block_template_part_areaslocate_block_templateregister_block_type
引入
5.8.0
棄用
-

allowed_block_types_all: 這個過濾器鉤子允許開發者修改塊編輯器中允許的塊型別列表。

過濾所有編輯器型別的允許塊型別。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$allowed_block_types = apply_filters( 'allowed_block_types_all', $allowed_block_types, $block_editor_context );
$allowed_block_types = apply_filters( 'allowed_block_types_all', $allowed_block_types, $block_editor_context );
$allowed_block_types = apply_filters( 'allowed_block_types_all', $allowed_block_types, $block_editor_context );

常見問題

FAQs
檢視更多 >