mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -186,6 +186,8 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase {
|
||||
'/wp-site-health/v1/tests/authorization-header',
|
||||
'/wp-site-health/v1/tests/page-cache',
|
||||
'/wp-site-health/v1/directory-sizes',
|
||||
'/wp/v2/wp_pattern_category',
|
||||
'/wp/v2/wp_pattern_category/(?P<id>[\d]+)',
|
||||
);
|
||||
|
||||
$this->assertSameSets( $expected_routes, $routes );
|
||||
|
||||
@@ -12,6 +12,10 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
$this->assertSame( array( 'link_category' ), get_object_taxonomies( 'link' ) );
|
||||
}
|
||||
|
||||
public function test_get_block_taxonomies() {
|
||||
$this->assertSame( array( 'wp_pattern_category' ), get_object_taxonomies( 'wp_block' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 5417
|
||||
*/
|
||||
@@ -119,6 +123,7 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
$this->assertTrue( taxonomy_exists( 'category' ) );
|
||||
$this->assertTrue( taxonomy_exists( 'post_tag' ) );
|
||||
$this->assertTrue( taxonomy_exists( 'link_category' ) );
|
||||
$this->assertTrue( taxonomy_exists( 'wp_pattern_category' ) );
|
||||
}
|
||||
|
||||
public function test_taxonomy_exists_unknown() {
|
||||
|
||||
Reference in New Issue
Block a user