WordPress开发者和主题制作者的搜索引擎



allowed_block_types ›

Since5.0.0
已弃用n/a
apply_filters( 'allowed_block_types', true, $post )
参数: (2)
  • (bool|array) $allowed_block_types Array of block type slugs, or boolean to enable/disable all.
    Required: Yes
  • (object) $post The post resource data.
    Required: Yes
定义在:
文档:

Filters the allowed block types for the editor, defaulting to true (all block types supported).





源码

$allowed_block_types = apply_filters( 'allowed_block_types', true, $post );