diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 6156163d6c266..95a24f9a3f1c3 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -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). @@ -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.