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: 这个过滤器钩子允许开发者修改块编辑器中允许的块类型列表。

过滤所有编辑器类型的允许块类型。

$allowed_block_types = apply_filters( 'allowed_block_types_all', $allowed_block_types, $block_editor_context );

常见问题

FAQs
查看更多 >