From ff5026369e81f1e5d194d91453ad822c2c462ee0 Mon Sep 17 00:00:00 2001 From: youknowriad Date: Tue, 7 Feb 2023 07:16:17 +0000 Subject: [PATCH] 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 --- wp-admin/site-editor.php | 9 --------- wp-includes/blocks/cover.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php index deb556a695..016245a677 100644 --- a/wp-admin/site-editor.php +++ b/wp-admin/site-editor.php @@ -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 ); diff --git a/wp-includes/blocks/cover.php b/wp-includes/blocks/cover.php index 4168d26767..e5a497fd76 100644 --- a/wp-includes/blocks/cover.php +++ b/wp-includes/blocks/cover.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 169de5b1aa..468c7043f7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.