mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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'`
{{{#!php
add_theme_support( 'block-template-parts' );
}}}
This is a backport from Gutenberg.[https://github.com/WordPress/gutenberg/pull/42729 See WordPress/gutenberg PR 42729].
Follow-up to [52330], [52069], [52178].
Props mamaduka, fabiankaegy, poena, scruffian, manfcarlo, bernhard-reiter, hellofromTonya.
See #56467.
git-svn-id: https://develop.svn.wordpress.org/trunk@54176 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3843,6 +3843,13 @@ function create_initial_theme_features() {
|
||||
'show_in_rest' => true,
|
||||
)
|
||||
);
|
||||
register_theme_feature(
|
||||
'block-template-parts',
|
||||
array(
|
||||
'description' => __( 'Whether a theme uses block-based template parts.' ),
|
||||
'show_in_rest' => true,
|
||||
)
|
||||
);
|
||||
register_theme_feature(
|
||||
'custom-background',
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user