Files
Vladimir Bryzgalov 949fb19e95 fix(wpmc 1.0.1): remove __() from labels (no translations, fixes WP 6.7 notice)
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>
2026-05-17 17:01:11 +05:00

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,
]);
}
}