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.


Top ↑

Source

File: wp-includes/block-editor.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Use the 'allowed_block_types_all' filter instead.
5.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.