Taxonomy: add taxonomy for user pattern categories.

Adds a `wp_pattern_category` taxonomy linked to the `wp-block` object.

Props glendaviesnz, kebbet, desrosj, mamaduka.
Fixes #59379.


git-svn-id: https://develop.svn.wordpress.org/trunk@56642 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Isabel Brison
2023-09-21 04:23:12 +00:00
parent c531947f3b
commit 2c2924089d
4 changed files with 426 additions and 1 deletions

View File

@@ -222,6 +222,27 @@ function create_initial_taxonomies() {
'show_in_rest' => false,
)
);
register_taxonomy(
'wp_pattern_category',
array( 'wp_block' ),
array(
'public' => true,
'publicly_queryable' => false,
'hierarchical' => false,
'labels' => array(
'name' => _x( 'Pattern Categories', 'taxonomy general name' ),
'singular_name' => _x( 'Pattern Category', 'taxonomy singular name' ),
),
'query_var' => false,
'rewrite' => false,
'show_ui' => true,
'_builtin' => true,
'show_in_nav_menus' => false,
'show_in_rest' => true,
'show_admin_column' => true,
)
);
}
/**