feat(wpmc S2): register taxonomy town with required args

Also stub translation functions in base TestCase so __() calls from
WPMultiCity namespace resolve correctly via Brain Monkey.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vladimir Bryzgalov
2026-05-12 17:37:29 +05:00
parent 53a784bbe8
commit b06ea9e605
2 changed files with 20 additions and 1 deletions
+19 -1
View File
@@ -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,
]);
}
}