mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@53659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user