WordPress at Your Fingertips
filter is not described

allowed_block_types filter-hook . WP 5.0.0

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


add_filter( 'allowed_block_types', 'filter_function_name_4', 10, 2 );
function filter_function_name_4( $allowed_block_types, $post ){
	// filter...

	return $allowed_block_types;
Array of block type slugs, or boolean to enable/disable all.
The post resource data.


Since 5.0.0 Introduced.

Where the hook is called

In file: /wp-admin/edit-form-blocks.php
wp-admin/edit-form-blocks.php 162
$allowed_block_types = apply_filters( 'allowed_block_types', true, $post );

Where in WP core the hook is used WordPress

Usage not found.