Make WordPress Core


Ignore:
Timestamp:
07/05/2022 03:02:03 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.
Merges [53659] to the 6.0 branch.
Fixes #55681.

Location:
branches/6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0

  • branches/6.0/src/wp-includes/theme.php

    r53417 r53661  
    38023802 *
    38033803 * @since 5.5.0
     3804 * @since 6.1.0 The `block-templates` feature was added.
    38043805 */
    38053806function create_initial_theme_features() {
     
    38153816        array(
    38163817            'description'  => __( 'Whether posts and comments RSS feed links are added to head.' ),
     3818            'show_in_rest' => true,
     3819        )
     3820    );
     3821    register_theme_feature(
     3822        'block-templates',
     3823        array(
     3824            'description'  => __( 'Whether a theme uses block-based templates.' ),
    38173825            'show_in_rest' => true,
    38183826        )
Note: See TracChangeset for help on using the changeset viewer.