From 956dd0d50cff55fbf64c5fc6e5f254ada22e2da1 Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Wed, 8 Mar 2023 22:45:19 +0000 Subject: [PATCH] Site Editor: Revert r54860. [54860] caused a regression. Changes to a parent theme's template part (i.e.e when a child theme does not override that template part) no longer saved in the Site Editor. Reverting the changeset resolves the regression. Props mreishus, hellofromTonya, azaozz, ironprogrammer, antonvlasenko. Fixes #57630. See #55437. Built from https://develop.svn.wordpress.org/trunk@55493 git-svn-id: http://core.svn.wordpress.org/trunk@55026 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-template-utils.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/block-template-utils.php b/wp-includes/block-template-utils.php index acbb7724c5..39961780e3 100644 --- a/wp-includes/block-template-utils.php +++ b/wp-includes/block-template-utils.php @@ -503,7 +503,7 @@ function _build_block_template_result_from_file( $template_file, $template_type $template = new WP_Block_Template(); $template->id = $theme . '//' . $template_file['slug']; - $template->theme = ! empty( $template_file['theme'] ) ? $template_file['theme'] : $theme; + $template->theme = $theme; $template->content = _inject_theme_attribute_in_block_template_content( $template_content ); $template->slug = $template_file['slug']; $template->source = 'theme'; diff --git a/wp-includes/version.php b/wp-includes/version.php index f306043282..88f1934e4f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-beta5-55492'; +$wp_version = '6.2-beta5-55493'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.