WordPress at Your Fingertips
filter is not described

allowed_block_types filter-hook . WP 5.0.0

Deprecated from version 5.8.0. It is no longer supported and can be removed in future releases. See allowed_block_types_all.

Deprecated: 5.8.0 Use the {@see 'allowed_block_types_all'} filter instead.

Filters the allowed block types for the editor.

Usage

add_filter( 'allowed_block_types', 'filter_function_name_5843', 10, 3 );
function filter_function_name_5843( $allowed_block_types, $post, $string ){
	// filter...

	return $allowed_block_types;
}
$allowed_block_types(true|false|array)
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.
$string
-

Changelog

Deprecated Since 5.8.0 Use the {@see 'allowed_block_types_all'} filter instead.

Where the hook is called

get_allowed_block_types()
allowed_block_types
wp-includes/block-editor.php 139
$allowed_block_types = apply_filters_deprecated( 'allowed_block_types', array( $allowed_block_types, $post ), '5.8.0', 'allowed_block_types_all' );

Where in WP core the hook is used WordPress

Usage not found.