mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Editor: Add block theme infrastructure
Adds the required infrastructure to render block-based themes. This is sourced from the Gutenberg plugin. Fixes #54335. Props bernhard-reiter, youknowriad, ntsekouras, hellofromtonya. git-svn-id: https://develop.svn.wordpress.org/trunk@52062 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* avoid registering rewrite rules before the {@see 'init'} action.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 5.9.0 Added `'wp_template_part_area'` taxonomy.
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
|
||||
*/
|
||||
@@ -175,7 +176,7 @@ function create_initial_taxonomies() {
|
||||
|
||||
register_taxonomy(
|
||||
'wp_theme',
|
||||
array( 'wp_template', 'wp_global_styles' ),
|
||||
array( 'wp_template', 'wp_template_part', 'wp_global_styles' ),
|
||||
array(
|
||||
'public' => false,
|
||||
'hierarchical' => false,
|
||||
@@ -191,6 +192,25 @@ function create_initial_taxonomies() {
|
||||
'show_in_rest' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_taxonomy(
|
||||
'wp_template_part_area',
|
||||
array( 'wp_template_part' ),
|
||||
array(
|
||||
'public' => false,
|
||||
'hierarchical' => false,
|
||||
'labels' => array(
|
||||
'name' => __( 'Template Part Areas' ),
|
||||
'singular_name' => __( 'Template Part Area' ),
|
||||
),
|
||||
'query_var' => false,
|
||||
'rewrite' => false,
|
||||
'show_ui' => false,
|
||||
'_builtin' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'show_in_rest' => false,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user