From e81c1a0267b8f0c05185ad3b51c47cf6e6b39f6c Mon Sep 17 00:00:00 2001 From: gziolo Date: Tue, 12 Apr 2022 13:00:14 +0000 Subject: [PATCH] Editor: Remove block patterns from server-generated settings Backport of https://github.com/WordPress/gutenberg/pull/39185 from the Gutenberg plugin. Namely the part where the `gutenberg_remove_block_patterns_settings` filter function removes the block patterns fields from settings. Props jsnajdr, zieladam. See #55505. Follow-up for [53152]. Built from https://develop.svn.wordpress.org/trunk@53155 git-svn-id: http://core.svn.wordpress.org/trunk@52744 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 2 -- wp-admin/site-editor.php | 2 -- wp-includes/version.php | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index e80877bcc0..c08cde109a 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -202,8 +202,6 @@ $editor_settings = array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ), ), 'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(), - '__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(), - '__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(), 'supportsTemplateMode' => current_theme_supports( 'block-templates' ), // Whether or not to load the 'postcustom' meta box is stored as a user meta diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php index a413ddb2d6..09706dafd0 100644 --- a/wp-admin/site-editor.php +++ b/wp-admin/site-editor.php @@ -67,8 +67,6 @@ $custom_settings = array( 'defaultTemplateTypes' => $indexed_template_types, 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), '__unstableHomeTemplate' => $home_template, - '__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(), - '__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(), ); $editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 995e7ab385..709b885d96 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53154'; +$wp_version = '6.0-alpha-53155'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.