diff --git a/includes/class-taxonomy.php b/includes/class-taxonomy.php index f712922..c0c3772 100644 --- a/includes/class-taxonomy.php +++ b/includes/class-taxonomy.php @@ -14,6 +14,24 @@ final class Taxonomy public static function do_register(): void { - // Implementation filled in Task 5. + register_taxonomy(self::SLUG, ['shortcode-town'], [ + 'labels' => [ + 'name' => __('Города', 'wp-multi-city'), + 'singular_name' => __('Город', 'wp-multi-city'), + 'menu_name' => __('Города', 'wp-multi-city'), + 'add_new_item' => __('Добавить', 'wp-multi-city'), + ], + 'public' => false, + 'publicly_queryable' => false, + 'hierarchical' => false, + 'show_ui' => true, + 'show_in_menu' => true, + 'show_in_nav_menus' => false, + 'show_admin_column' => false, + 'show_in_rest' => true, + 'query_var' => false, + 'rewrite' => false, + 'meta_box_cb' => false, + ]); } } diff --git a/tests/TestCase.php b/tests/TestCase.php index e6b34e7..50baf08 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -12,6 +12,7 @@ abstract class TestCase extends BaseTestCase { parent::setUp(); Monkey\setUp(); + Monkey\Functions\stubTranslationFunctions(); } protected function tearDown(): void