mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 01:19:51 +01:00
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]. git-svn-id: https://develop.svn.wordpress.org/trunk@53155 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bca9b6d940
commit
31c2639b80
@ -202,8 +202,6 @@ $editor_settings = array(
|
|||||||
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
||||||
),
|
),
|
||||||
'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(),
|
'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' ),
|
'supportsTemplateMode' => current_theme_supports( 'block-templates' ),
|
||||||
|
|
||||||
// Whether or not to load the 'postcustom' meta box is stored as a user meta
|
// Whether or not to load the 'postcustom' meta box is stored as a user meta
|
||||||
|
@ -67,8 +67,6 @@ $custom_settings = array(
|
|||||||
'defaultTemplateTypes' => $indexed_template_types,
|
'defaultTemplateTypes' => $indexed_template_types,
|
||||||
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
|
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
|
||||||
'__unstableHomeTemplate' => $home_template,
|
'__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 );
|
$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user