From 26472a55633573586445cf5baae3fc71d6c1038a Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 6 Sep 2023 15:21:21 +0200 Subject: [PATCH 1/3] Check if tests detect missing injected theme attribute --- src/wp-includes/block-template-utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index b8538ee3b43e2..4096407e39611 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -565,7 +565,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->content = _inject_theme_attribute_in_block_template_content( $template_content ); + //$template->content = _inject_theme_attribute_in_block_template_content( $template_content ); $template->slug = $template_file['slug']; $template->source = 'theme'; $template->type = $template_type; From 63ae2b12fcbc4de40e6500d22ae1d8b53ac5d821 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 6 Sep 2023 15:34:43 +0200 Subject: [PATCH 2/3] Remove injection, but keep template content --- src/wp-includes/block-template-utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 4096407e39611..55753aa27c1cc 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -565,7 +565,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->content = _inject_theme_attribute_in_block_template_content( $template_content ); + $template->content = $template_content ; $template->slug = $template_file['slug']; $template->source = 'theme'; $template->type = $template_type; From df03d5a4ca08b90e460579bc7ecff1148fae35cd Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 7 Sep 2023 20:45:52 +0200 Subject: [PATCH 3/3] Whitespace --- src/wp-includes/block-template-utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/block-template-utils.php b/src/wp-includes/block-template-utils.php index 55753aa27c1cc..11d4141aa3420 100644 --- a/src/wp-includes/block-template-utils.php +++ b/src/wp-includes/block-template-utils.php @@ -565,7 +565,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->content = $template_content ; + $template->content = $template_content; $template->slug = $template_file['slug']; $template->source = 'theme'; $template->type = $template_type;