From 9ba50bb6233fc5f80fd7b9ae7c492e59537d091d Mon Sep 17 00:00:00 2001 From: isabel_brison Date: Thu, 21 Sep 2023 04:25:22 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@56642 git-svn-id: http://core.svn.wordpress.org/trunk@56154 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 21 +++++++++++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index a611307b6d..b0d053f648 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -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, + ) + ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index c4e4c5fbdb..022a9d5a77 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56641'; +$wp_version = '6.4-alpha-56642'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.