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.

Built from https://develop.svn.wordpress.org/trunk@55247


git-svn-id: http://core.svn.wordpress.org/trunk@54780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
youknowriad 2023-02-07 07:16:17 +00:00
parent a41c798835
commit ff5026369e
3 changed files with 2 additions and 11 deletions

View File

@ -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 );

View File

@ -25,7 +25,7 @@ function render_block_core_cover( $attributes, $content ) {
);
if ( isset( $attributes['focalPoint'] ) ) {
$object_position = round( $attributes['focalPoint']['x'] * 100 ) . '%' . ' ' . round( $attributes['focalPoint']['y'] * 100 ) . '%';
$object_position = round( $attributes['focalPoint']['x'] * 100 ) . '% ' . round( $attributes['focalPoint']['y'] * 100 ) . '%';
$attr['data-object-position'] = $object_position;
$attr['style'] = 'object-position: ' . $object_position;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55246';
$wp_version = '6.2-alpha-55247';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.