From f9e979a74cf61e5e06eac559d7d90a06b67dad58 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 5 Jul 2022 14:59:16 +0000 Subject: [PATCH] Themes: Register the `block-templates` theme feature. This ensures the feature is included in the `theme_supports` REST API data for the active theme. Follow-up to [48171]. Props grantmkin, TimothyBlynJacobs, addiestavlo. Fixes #55681. Built from https://develop.svn.wordpress.org/trunk@53659 git-svn-id: http://core.svn.wordpress.org/trunk@53218 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 8 ++++++++ wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index ee544e25dc..c3d5003f75 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -3804,6 +3804,7 @@ function _wp_keep_alive_customize_changeset_dependent_auto_drafts( $new_status, * See {@see 'setup_theme'}. * * @since 5.5.0 + * @since 6.1.0 The `block-templates` feature was added. */ function create_initial_theme_features() { register_theme_feature( @@ -3820,6 +3821,13 @@ function create_initial_theme_features() { 'show_in_rest' => true, ) ); + register_theme_feature( + 'block-templates', + array( + 'description' => __( 'Whether a theme uses block-based templates.' ), + 'show_in_rest' => true, + ) + ); register_theme_feature( 'custom-background', array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 495b4a77a2..512490c0fc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53657'; +$wp_version = '6.1-alpha-53659'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.