949fb19e95
Replace all __('...', 'wp-multi-city') calls in CPT, taxonomy, ACF field group,
and options page label arrays with literal Russian strings. The plugin ships no
.mo translation files, so wrapping labels in __() was YAGNI and triggered the
WP 6.7+ _load_textdomain_just_in_time notice.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace WPMultiCity;
|
|
|
|
final class Taxonomy
|
|
{
|
|
public const SLUG = 'town';
|
|
|
|
public static function register(): void
|
|
{
|
|
add_action('init', [self::class, 'do_register']);
|
|
}
|
|
|
|
public static function do_register(): void
|
|
{
|
|
register_taxonomy(self::SLUG, [PostType::SLUG], [
|
|
'labels' => [
|
|
'name' => 'Города',
|
|
'singular_name' => 'Город',
|
|
'menu_name' => 'Города',
|
|
'add_new_item' => 'Добавить',
|
|
],
|
|
'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,
|
|
]);
|
|
}
|
|
}
|