Make WordPress Core


Ignore:
Timestamp:
09/15/2022 12:18:30 PM (20 months ago)
Author:
hellofromTonya
Message:

Themes: Introduces block-based template parts for Classic themes.

Allows Classic / Hybrid themes to use block-based template parts without using complete block-based templates.

  • Exposes the Site Editor's template parts UI
  • Adds Appearance > "Template Parts" menu
  • Enabled within the theme via adding a theme support for 'block-template-parts'
    add_theme_support( 'block-template-parts' );
    

This is a backport from Gutenberg.See WordPress/gutenberg PR 42729.

Follow-up to [52330], [52069], [52178].

Props mamaduka, fabiankaegy, poena, scruffian, manfcarlo, bernhard-reiter, hellofromTonya.
See #56467.

File:
1 edited

Legend:

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

    r54174 r54176  
    38453845    );
    38463846    register_theme_feature(
     3847        'block-template-parts',
     3848        array(
     3849            'description'  => __( 'Whether a theme uses block-based template parts.' ),
     3850            'show_in_rest' => true,
     3851        )
     3852    );
     3853    register_theme_feature(
    38473854        'custom-background',
    38483855        array(
Note: See TracChangeset for help on using the changeset viewer.