A WordPress-centric search engine for devs and theme authors



allowed_block_types ›

Since5.0.0
Deprecatedn/a
apply_filters( 'allowed_block_types', true, $post )
Parameters: (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
Defined at:
Codex:

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





Source

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