Files
wp-multi-city/includes/class-post-type.php
T
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

47 lines
1.6 KiB
PHP

<?php
declare(strict_types=1);
namespace WPMultiCity;
final class PostType
{
public const SLUG = 'shortcode-town';
public static function register(): void
{
add_action('init', [self::class, 'do_register']);
}
public static function do_register(): void
{
register_post_type(self::SLUG, [
'labels' => [
'name' => 'Шорткоды',
'singular_name' => 'Шорткод',
'menu_name' => 'Шорткоды',
'add_new' => 'Добавить',
'add_new_item' => 'Добавить шорткод',
'edit_item' => 'Редактировать',
'new_item' => 'Новый',
'view_item' => 'Смотреть',
'search_items' => 'Поиск',
'not_found' => 'Не найдено',
],
'public' => false,
'exclude_from_search' => true,
'publicly_queryable' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'show_in_rest' => false,
'query_var' => false,
'has_archive' => false,
'rewrite' => false,
'hierarchical' => false,
'capability_type' => 'post',
'supports' => ['title'],
'menu_position' => 8,
]);
}
}