Make WordPress Core


Ignore:
Timestamp:
09/21/2023 04:23:12 AM (3 years ago)
Author:
isabel_brison
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/taxonomy.php

    r56548 r56642  
    1111        public function test_get_link_taxonomies() {
    1212                $this->assertSame( array( 'link_category' ), get_object_taxonomies( 'link' ) );
     13        }
     14
     15        public function test_get_block_taxonomies() {
     16                $this->assertSame( array( 'wp_pattern_category' ), get_object_taxonomies( 'wp_block' ) );
    1317        }
    1418
    … …  
    120124                $this->assertTrue( taxonomy_exists( 'post_tag' ) );
    121125                $this->assertTrue( taxonomy_exists( 'link_category' ) );
     126                $this->assertTrue( taxonomy_exists( 'wp_pattern_category' ) );
    122127        }
    123128
Note: See TracChangeset for help on using the changeset viewer.