Make WordPress Core

Changeset 53155


Ignore:
Timestamp:
04/12/2022 12:58:03 PM (2 years ago)
Author:
gziolo
Message:

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].

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-blocks.php

    r53095 r53155  
    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
  • trunk/src/wp-admin/site-editor.php

    r53095 r53155  
    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 );
Note: See TracChangeset for help on using the changeset viewer.