From 0441885c15e45664b189cb86725ea4bd9a1450ae Mon Sep 17 00:00:00 2001 From: youknowriad Date: Thu, 9 Dec 2021 09:56:04 +0000 Subject: [PATCH] Themes: Auto-enable block-templates support for all block themes. Block themes without theme.json file used to have block-templates support disabled. This commit brings this in sync with the behavior in the gutenberg plugin. See #54335. Built from https://develop.svn.wordpress.org/trunk@52347 git-svn-id: http://core.svn.wordpress.org/trunk@51939 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme-templates.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme-templates.php b/wp-includes/theme-templates.php index d18575099c..e837a2fad5 100644 --- a/wp-includes/theme-templates.php +++ b/wp-includes/theme-templates.php @@ -211,7 +211,7 @@ function the_block_template_skip_link() { * @since 5.8.0 */ function wp_enable_block_templates() { - if ( WP_Theme_JSON_Resolver::theme_has_support() ) { + if ( wp_is_block_theme() || WP_Theme_JSON_Resolver::theme_has_support() ) { add_theme_support( 'block-templates' ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 59e6375c80..28d80abe8b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta2-52346'; +$wp_version = '5.9-beta2-52347'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.