wpseek.com
A WordPress-centric search engine for devs and theme authors



allowed_block_types_{$editor_name} › WordPress Filter Hooks

Since5.8.0
Deprecatedn/a
apply_filters( "allowed_block_types_{$editor_name}", $allowed_block_types, $editor_name )
Parameters: (2)
  • (bool|array) $allowed_block_types Array of block type slugs, or boolean to enable/disable all.
    Required: Yes
  • (string) $editor_name The name of the editor, e.g. 'post-editor'.
    Required: Yes
Defined at:
Codex:

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

The dynamic portion of the hook name, $editor_name, refers to the name of the editor type, e.g. 'post-editor', 'site-editor', etc.





Source

$allowed_block_types = apply_filters( "allowed_block_types_{$editor_name}", $allowed_block_types, $editor_name );