Skip to content

Commit

Permalink
Editor: Remove block patterns from server-generated settings
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gziolo committed Apr 12, 2022
1 parent bca9b6d commit 31c2639
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ static function( $classes ) {
'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
Expand Down
2 changes: 0 additions & 2 deletions src/wp-admin/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ static function( $classes ) {
'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 );

Expand Down

0 comments on commit 31c2639

Please sign in to comment.