Warning: This hook has been deprecated. Use the ‘allowed_block_types_all’ filter instead.
allowed_block_types WordPress Hook
The allowed_block_types hook is used to filter the list of block types that are allowed to be used in the post editor.
apply_filters_deprecated( 'allowed_block_types', bool|string[] $allowed_block_types , WP_Post $post ) #
Filters the allowed block types for the editor.
Parameters
- $allowed_block_types
(bool|string[])Array of block type slugs, or boolean to enable/disable all. Default true (all registered block types supported)
- $post
(WP_Post)The post resource data.
Source
Changelog
Version | Description |
---|---|
5.8.0 | Use the 'allowed_block_types_all' filter instead. |
5.0.0 | Introduced. |