mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Site Editor: Show correct theme per template or template part.
Child themes inherit templates and template parts from the parent theme. In Site Editor, the "Added by" column for a template defaults to displaying the child theme, even though it is inherited from the parent, creating confusion as to where the actual templates are located. This commit ensures that the parent theme is correctly displayed in that scenario. Follow-up to [51003], [52062]. Props ptahdunbar, WoutPitje, petaryoast, costdev, poena, audrasjb, SergeyBiryukov. Fixes #55437. Built from https://develop.svn.wordpress.org/trunk@54860 git-svn-id: http://core.svn.wordpress.org/trunk@54412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f3b087164d
commit
c7457d772e
@ -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 = $theme;
|
||||
$template->theme = ! empty( $template_file['theme'] ) ? $template_file['theme'] : $theme;
|
||||
$template->content = _inject_theme_attribute_in_block_template_content( $template_content );
|
||||
$template->slug = $template_file['slug'];
|
||||
$template->source = 'theme';
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.2-alpha-54859';
|
||||
$wp_version = '6.2-alpha-54860';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user