Make WordPress Core


Ignore:
Timestamp:
07/05/2022 02:57:52 PM (2 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.
Fixes #55681.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r53513 r53659  
    38053805 *
    38063806 * @since 5.5.0
     3807 * @since 6.1.0 The `block-templates` feature was added.
    38073808 */
    38083809function create_initial_theme_features() {
     
    38183819        array(
    38193820            'description'  => __( 'Whether posts and comments RSS feed links are added to head.' ),
     3821            'show_in_rest' => true,
     3822        )
     3823    );
     3824    register_theme_feature(
     3825        'block-templates',
     3826        array(
     3827            'description'  => __( 'Whether a theme uses block-based templates.' ),
    38203828            'show_in_rest' => true,
    38213829        )
Note: See TracChangeset for help on using the changeset viewer.