Skip to content

Commit 31c2639

Browse files
committed
Editor: Remove block patterns from server-generated settings
Backport of WordPress/gutenberg#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]. git-svn-id: https://develop.svn.wordpress.org/trunk@53155 602fd350-edb4-49c9-b593-d223f7449a82
1 parent bca9b6d commit 31c2639

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

src/wp-admin/edit-form-blocks.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,6 @@ static function( $classes ) {
202202
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
203203
),
204204
'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(),
205-
'__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
206-
'__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
207205
'supportsTemplateMode' => current_theme_supports( 'block-templates' ),
208206

209207
// Whether or not to load the 'postcustom' meta box is stored as a user meta

src/wp-admin/site-editor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ static function( $classes ) {
6767
'defaultTemplateTypes' => $indexed_template_types,
6868
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
6969
'__unstableHomeTemplate' => $home_template,
70-
'__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
71-
'__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
7270
);
7371
$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context );
7472

0 commit comments

Comments
 (0)