mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Site Editor: Backport site editor intialization changes from Gutenberg 15.1
The site editor has been updated to not require the "home template" setting. This removes the key from the settings passed to the frontend. Props flixos90, hellofromtonya, ntsekouras. Fixes #57480. git-svn-id: https://develop.svn.wordpress.org/trunk@55247 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -76,17 +76,8 @@ $custom_settings = array(
|
||||
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
|
||||
'supportsLayout' => wp_theme_has_theme_json(),
|
||||
'supportsTemplatePartsMode' => ! wp_is_block_theme() && current_theme_supports( 'block-template-parts' ),
|
||||
'__unstableHomeTemplate' => $home_template,
|
||||
);
|
||||
|
||||
/**
|
||||
* Home template resolution is not needed when block template parts are supported.
|
||||
* Set the value to `true` to satisfy the editor initialization guard clause.
|
||||
*/
|
||||
if ( $custom_settings['supportsTemplatePartsMode'] ) {
|
||||
$custom_settings['__unstableHomeTemplate'] = true;
|
||||
}
|
||||
|
||||
// Add additional back-compat patterns registered by `current_screen` et al.
|
||||
$custom_settings['__experimentalAdditionalBlockPatterns'] = WP_Block_Patterns_Registry::get_instance()->get_all_registered( true );
|
||||
$custom_settings['__experimentalAdditionalBlockPatternCategories'] = WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered( true );
|
||||
|
||||
Reference in New Issue
Block a user