Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@
$font_sizes = current( (array) get_theme_support( 'editor-font-sizes' ) );
$gradient_presets = current( (array) get_theme_support( 'editor-gradient-presets' ) );

$registered_block_types = WP_Block_Type_Registry::get_instance()->get_all_registered();

/**
* Filters the allowed block types for the editor, defaulting to true (all
* block types supported).
Expand All @@ -147,7 +149,7 @@
* boolean to enable/disable all.
* @param WP_Post $post The post resource data.
*/
$allowed_block_types = apply_filters( 'allowed_block_types', true, $post );
$allowed_block_types = apply_filters( 'allowed_block_types', $registered_block_types, $post );

/*
* Get all available templates for the post/page attributes meta-box.
Expand Down