Plugin Directory

Changeset 3757984


Ignore:
Timestamp:
10/21/2026 08:52:31 AM (4 weeks ago)
Author:
opphisse
Message:

Release Opphisse Toolkit 1.0.1

Location:
opphisse-toolkit
Files:
8 added
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • opphisse-toolkit/tags/1.0.1/includes/class-opphisse-toolkit-admin-menu.php

    r3705504 r3757984  
    7272        }
    7373
     74        // The Toolkit is the recovery path for menu visibility settings. Keep it
     75        // reachable even when the Settings parent or one of its children is hidden.
     76        if (self::is_toolkit_page()) {
     77            return;
     78        }
     79
    7480        $current = self::current_page_slug();
    7581        $hidden = array_map('strval', (array) ($settings['admin_menu_hidden'] ?? []));
    … …  
    128134    }
    129135
     136    private static function is_toolkit_page(): bool
     137    {
     138        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only current admin screen detection.
     139        $page = isset($_GET['page']) ? sanitize_key(wp_unslash((string) $_GET['page'])) : '';
     140        return $page === 'opphisse-toolkit';
     141    }
     142
    130143    private static function matches_current_slug(string $slug): bool
    131144    {
  • opphisse-toolkit/tags/1.0.1/includes/class-opphisse-toolkit-i18n.php

    r3705504 r3757984  
    77final class Opphisse_Toolkit_I18n
    88{
    9     private const STRINGS = [
    10         'tr' => [
    11             'login_error' => 'Giriş bilgileri doğrulanamadı. Lütfen tekrar deneyin.',
    12             'login_limited' => 'Çok fazla deneme yapıldı. Lütfen daha sonra tekrar deneyin.',
    13             'dashboard_title' => 'Opphisse Site Özeti',
    14             'dashboard_ready' => 'Yönetim paneliniz hazır.',
    15             'dashboard_status' => 'Site yönetimi ve bakım durumu',
    16             'toolkit_settings' => 'Toolkit Ayarları',
    17             'add_page' => 'Sayfa Ekle',
    18             'add_product' => 'Ürün Ekle',
    19             'orders' => 'Siparişler',
    20             'view_site' => 'Siteyi Görüntüle',
    21             'get_support' => 'Destek Al',
    22             'footer_prefix' => 'Toolkit',
    23             'managed_by' => 'tarafından yönetiliyor.',
    24             'menu_blocked' => 'Bu admin sayfası Opphisse menü görünürlük ayarlarıyla gizlendi.',
    25             'settings_imported' => 'Toolkit ayarları içe aktarıldı.',
    26             'unauthorized' => 'Yetkisiz işlem.',
    27             'settings_intro' => 'Ajans teslimleri için white-label admin, güvenlik, sağlık ve izleme katmanı.',
    28             'save_settings' => 'Ayarları Kaydet',
    29             'tab_appearance' => 'Görünüm',
    30             'tab_login' => 'Giriş',
    31             'tab_urls' => 'URL',
    32             'tab_menu' => 'Menü',
    33             'tab_security' => 'Güvenlik',
    34             'tab_diagnostics' => 'Tanı',
    35             'tab_health' => 'Sağlık',
    36             'tab_woocommerce' => 'WooCommerce',
    37             'tab_tools' => 'Araçlar',
    38             'settings_lock_enabled' => 'Kritik ayarları kilitle',
    39             'admin_branding' => 'Admin panel teması',
    40             'toolbar_logo' => 'Toolbar logosu',
    41             'footer_branding' => 'Footer yazısı',
    42             'dashboard_cleanup' => 'Dashboard sadeleştirme',
    43             'maintenance_branding' => 'Bakım ekranı markalama',
    44             'maintenance_manual_enabled' => 'Manuel bakım modu',
    45             'accent_color' => 'Vurgu rengi',
    46             'dark_color' => 'Koyu renk',
    47             'maintenance_title_tr' => 'Bakım başlığı TR',
    48             'maintenance_heading_tr' => 'Bakım ana metni TR',
    49             'maintenance_message_tr' => 'Bakım açıklaması TR',
    50             'maintenance_support_label_tr' => 'Bakım destek butonu TR',
    51             'maintenance_title_en' => 'Bakım başlığı EN',
    52             'maintenance_heading_en' => 'Bakım ana metni EN',
    53             'maintenance_message_en' => 'Bakım açıklaması EN',
    54             'maintenance_support_label_en' => 'Bakım destek butonu EN',
    55             'login_branding' => 'Giriş ekranı teması',
    56             'custom_login_enabled' => 'Özel giriş adresi',
    57             'limit_login' => 'Login deneme limiti',
    58             'custom_login_slug' => 'Özel giriş yolu',
    59             'custom_login_slug_help' => 'Önerilen: login. wp-login.php bu adrese yönlendirilir.',
    60             'login_background' => 'Giriş arka plan rengi',
    61             'login_card_background' => 'Form arka plan rengi',
    62             'login_text_color' => 'Form metin rengi',
    63             'login_limit_attempts' => 'Deneme limiti',
    64             'login_limit_minutes' => 'Limit süresi dakika',
    65             'clean_urls_enabled' => 'Clean URL katmanı',
    66             'clean_urls_safe_mode' => 'Safe mode',
    67             'clean_admin_alias_enabled' => 'Admin aliası',
    68             'clean_admin_slug' => 'Admin alias yolu',
    69             'client_mode_enabled' => 'Müşteri modu',
    70             'admin_menu_control_enabled' => 'Admin menü düzenlemeyi etkinleştir',
    71             'admin_menu_block_direct_access' => 'Gizlenen sayfalara direkt erişimi engelle',
    72             'hide_notices_for_clients' => 'Müşteriye teknik bildirimleri gizle',
    73             'show_admin_bar_for_clients' => 'Müşteriye frontend admin bar göster',
    74             'security_headers' => 'Temel güvenlik başlıkları',
    75             'disable_xmlrpc' => 'XML-RPC kapat',
    76             'hide_generator' => 'Generator izini kaldır',
    77             'harden_rest_users' => 'REST kullanıcı endpointlerini kısıtla',
    78             'disable_author_scan' => 'Author scan azalt',
    79             'health_widget' => 'Sağlık widgetı',
    80             'wc_hide_marketing' => 'WooCommerce pazarlama alanlarını gizle',
    81             'wc_account_branding' => 'Hesabım formlarını markala',
    82             'reset_menu_visibility' => 'Menüyü Varsayılana Döndür',
    83             'apply_security_standard' => 'Güvenlik Standardını Uygula',
    84             'security_test' => 'Güvenlik Kontrolü Çalıştır',
    85             'diagnostics_test' => 'Tanı Testini Logla',
    86             'clear_logs' => 'Logları Temizle',
    87             'woocommerce_status' => 'WooCommerce durumu',
    88             'active' => 'Aktif',
    89             'inactive_test' => 'Bu test ortamında aktif değil',
    90             'wordpress' => 'WordPress',
    91             'theme' => 'Tema',
    92             'core_update' => 'Core güncelleme',
    93             'plugin_update' => 'Plugin güncelleme',
    94             'theme_update' => 'Tema güncelleme',
    95             'file_editor' => 'Dosya editörü',
    96             'writable' => 'Yazılabilir',
    97             'problem' => 'Sorunlu',
    98             'none' => 'Yok',
    99             'ready' => 'Hazır',
    100             'scheduled' => 'Planlı',
    101             'default' => 'Varsayılan',
    102             'compatible' => 'Uyumlu',
    103             'different' => 'Farklı',
    104             'clean' => 'Temiz',
    105             'disabled' => 'Kapalı',
    106             'enabled' => 'Açık',
    107             'no_records' => 'Henüz kayıt yok.',
    108             'time' => 'Zaman',
    109             'type' => 'Tip',
    110             'detail' => 'Detay',
    111             'export_settings' => 'Ayarları Dışa Aktar',
    112             'import_settings' => 'Ayarları İçe Aktar',
    113             'reset_appearance' => 'Görünümü Sıfırla',
    114             'reset_security' => 'Güvenliği Sıfırla',
    115             'reset_all' => 'Tüm Ayarları Sıfırla',
    116             'tools_import_help' => 'Aktarım JSON dosyası sadece toolkit ayarlarını taşır; kullanıcı, içerik ve WordPress çekirdek ayarlarını değiştirmez.',
    117             'recovery' => 'Kurtarma',
    118             'recovery_global_text' => 'Admin tema, özel giriş, clean URL ve kritik müdahaleleri geçici kapatır.',
    119             'recovery_clean_url_text' => 'WordPress rewrite API ile çalışan admin aliasını geçici olarak pasifleştirir.',
    120             'recovery_lock_title' => 'Ayar kilidi',
    121             'recovery_lock_text' => 'Müşteri tesliminden sonra kritik ayarların panelden değiştirilmesini engeller.',
    122             'diagnostics_result' => 'Tanı Sonucu',
    123             'diagnostics_summary' => '%1$s kritik, %2$s uyarı',
    124             'clean_urls_status' => 'Clean URL Durumu',
    125             'rebuild_aliases' => 'Aliasları Yeniden Kur',
    126             'enable_recovery_mode' => 'Kurtarma Modunu Aç',
    127             'clean_urls_help' => 'Admin aliası yalnızca WordPress rewrite API ile çalışır. Toolkit wp-admin, wp-content, wp-includes veya .htaccess dosyalarını değiştirmez.',
    128             'clean_urls_recovery_help' => 'Kurtarma modu clean URL safe mode açar ve admin aliasını devre dışı bırakır.',
    129             'file' => 'Dosya',
    130             'size' => 'Boyut',
    131             'action' => 'İşlem',
    132             'restore' => 'Geri Yükle',
    133             'settings_locked_notice' => 'Kritik ayarlar kilitli. Renk ve bakım metinleri düzenlenebilir, URL/login/güvenlik/menü ayarları korunur.',
    134             'menu_visibility_title' => 'Admin Menü Görünürlüğü',
    135             'menu_visibility_help' => 'Seçili menüler gizlenir. Opphisse Toolkit menüsü güvenlik için bu listeden hariç tutulur.',
    136             'menu_client_title' => 'Müşteri görünümü',
    137             'menu_client_text' => 'Teknik menüleri, pazarlama bağlantılarını ve gereksiz ayar sayfalarını hızlıca gizler.',
    138             'menu_block_title' => 'Direkt erişim koruması',
    139             'menu_block_text' => 'Gizlenen sayfaya URL ile gidilirse dashboarda yönlendirir.',
    140             'menu_restore_title' => 'Geri dönüş',
    141             'menu_restore_text' => 'Menüyü Varsayılana Döndür ile seçimler tek adımda temizlenir.',
    142             'menu_search_placeholder' => 'Menü ara',
    143             'filter_all' => 'Tümü',
    144             'filter_content' => 'İçerik',
    145             'filter_commerce' => 'Ticaret',
    146             'filter_technical' => 'Teknik',
    147             'client_defaults' => 'Müşteri İçin Sadeleştir',
    148             'show_all' => 'Hepsini Göster',
    149             'hide_visible' => 'Görünenleri Gizle',
    150             'hidden_items' => 'Gizlenenler',
    151             'submenu_visibility_title' => 'Alt Menü Görünürlüğü',
    152             'menu_empty' => 'Bu filtrede menü bulunamadı.',
    153             'menu_none_selected' => 'Henüz seçim yok.',
    154             'menu_count' => '%1$s/%2$s görünürde, toplam %3$s gizlenecek',
    155         ],
    156         'en' => [
    157             'login_error' => 'The login details could not be verified. Please try again.',
    158             'login_limited' => 'Too many attempts. Please try again later.',
    159             'dashboard_title' => 'Opphisse Site Summary',
    160             'dashboard_ready' => 'Your admin panel is ready.',
    161             'dashboard_status' => 'Site management and maintenance status',
    162             'toolkit_settings' => 'Toolkit Settings',
    163             'add_page' => 'Add Page',
    164             'add_product' => 'Add Product',
    165             'orders' => 'Orders',
    166             'view_site' => 'View Site',
    167             'get_support' => 'Get Support',
    168             'footer_prefix' => 'Toolkit',
    169             'managed_by' => 'managed by.',
    170             'menu_blocked' => 'This admin page is hidden by Opphisse menu visibility settings.',
    171             'settings_imported' => 'Toolkit settings imported.',
    172             'unauthorized' => 'Unauthorized.',
    173             'settings_intro' => 'White-label admin, security, health and monitoring layer for agency handoffs.',
    174             'save_settings' => 'Save Settings',
    175             'tab_appearance' => 'Appearance',
    176             'tab_login' => 'Login',
    177             'tab_urls' => 'URL',
    178             'tab_menu' => 'Menu',
    179             'tab_security' => 'Security',
    180             'tab_diagnostics' => 'Diagnostics',
    181             'tab_health' => 'Health',
    182             'tab_woocommerce' => 'WooCommerce',
    183             'tab_tools' => 'Tools',
    184             'settings_lock_enabled' => 'Lock critical settings',
    185             'admin_branding' => 'Admin panel theme',
    186             'toolbar_logo' => 'Toolbar logo',
    187             'footer_branding' => 'Footer text',
    188             'dashboard_cleanup' => 'Dashboard cleanup',
    189             'maintenance_branding' => 'Maintenance screen branding',
    190             'maintenance_manual_enabled' => 'Manual maintenance mode',
    191             'accent_color' => 'Accent color',
    192             'dark_color' => 'Dark color',
    193             'maintenance_title_tr' => 'Maintenance title TR',
    194             'maintenance_heading_tr' => 'Maintenance heading TR',
    195             'maintenance_message_tr' => 'Maintenance message TR',
    196             'maintenance_support_label_tr' => 'Maintenance support button TR',
    197             'maintenance_title_en' => 'Maintenance title EN',
    198             'maintenance_heading_en' => 'Maintenance heading EN',
    199             'maintenance_message_en' => 'Maintenance message EN',
    200             'maintenance_support_label_en' => 'Maintenance support button EN',
    201             'login_branding' => 'Login screen theme',
    202             'custom_login_enabled' => 'Custom login URL',
    203             'limit_login' => 'Login attempt limit',
    204             'custom_login_slug' => 'Custom login path',
    205             'custom_login_slug_help' => 'Recommended: login. wp-login.php redirects to this address.',
    206             'login_background' => 'Login background color',
    207             'login_card_background' => 'Form background color',
    208             'login_text_color' => 'Form text color',
    209             'login_limit_attempts' => 'Attempt limit',
    210             'login_limit_minutes' => 'Limit window in minutes',
    211             'clean_urls_enabled' => 'Clean URL layer',
    212             'clean_urls_safe_mode' => 'Safe mode',
    213             'clean_admin_alias_enabled' => 'Admin alias',
    214             'clean_admin_slug' => 'Admin alias path',
    215             'client_mode_enabled' => 'Client mode',
    216             'admin_menu_control_enabled' => 'Enable admin menu management',
    217             'admin_menu_block_direct_access' => 'Block direct access to hidden pages',
    218             'hide_notices_for_clients' => 'Hide technical notices from clients',
    219             'show_admin_bar_for_clients' => 'Show frontend admin bar to clients',
    220             'security_headers' => 'Basic security headers',
    221             'disable_xmlrpc' => 'Disable XML-RPC',
    222             'hide_generator' => 'Remove generator trace',
    223             'harden_rest_users' => 'Restrict REST user endpoints',
    224             'disable_author_scan' => 'Reduce author scans',
    225             'health_widget' => 'Health widget',
    226             'wc_hide_marketing' => 'Hide WooCommerce marketing areas',
    227             'wc_account_branding' => 'Brand My Account forms',
    228             'reset_menu_visibility' => 'Reset Menu Visibility',
    229             'apply_security_standard' => 'Apply Security Standard',
    230             'security_test' => 'Run Security Check',
    231             'diagnostics_test' => 'Log Diagnostics Test',
    232             'clear_logs' => 'Clear Logs',
    233             'woocommerce_status' => 'WooCommerce status',
    234             'active' => 'Active',
    235             'inactive_test' => 'Not active in this test environment',
    236             'wordpress' => 'WordPress',
    237             'theme' => 'Theme',
    238             'core_update' => 'Core update',
    239             'plugin_update' => 'Plugin update',
    240             'theme_update' => 'Theme update',
    241             'file_editor' => 'File editor',
    242             'writable' => 'Writable',
    243             'problem' => 'Problem',
    244             'none' => 'None',
    245             'ready' => 'Ready',
    246             'scheduled' => 'Scheduled',
    247             'default' => 'Default',
    248             'compatible' => 'Compatible',
    249             'different' => 'Different',
    250             'clean' => 'Clean',
    251             'disabled' => 'Disabled',
    252             'enabled' => 'Enabled',
    253             'no_records' => 'No records yet.',
    254             'time' => 'Time',
    255             'type' => 'Type',
    256             'detail' => 'Detail',
    257             'export_settings' => 'Export Settings',
    258             'import_settings' => 'Import Settings',
    259             'reset_appearance' => 'Reset Appearance',
    260             'reset_security' => 'Reset Security',
    261             'reset_all' => 'Reset All Settings',
    262             'tools_import_help' => 'The imported JSON file only moves toolkit settings; it does not change users, content, or WordPress core settings.',
    263             'recovery' => 'Recovery',
    264             'recovery_global_text' => 'Temporarily disables the admin theme, custom login, clean URLs, and critical interventions.',
    265             'recovery_clean_url_text' => 'Temporarily disables the admin alias provided through the WordPress rewrite API.',
    266             'recovery_lock_title' => 'Settings lock',
    267             'recovery_lock_text' => 'Prevents critical settings from being changed in the panel after client handoff.',
    268             'diagnostics_result' => 'Diagnostics Result',
    269             'diagnostics_summary' => '%1$s critical, %2$s warnings',
    270             'clean_urls_status' => 'Clean URL Status',
    271             'rebuild_aliases' => 'Rebuild Aliases',
    272             'enable_recovery_mode' => 'Enable Recovery Mode',
    273             'clean_urls_help' => 'The admin alias uses only the WordPress rewrite API. The toolkit does not modify wp-admin, wp-content, wp-includes, or .htaccess files.',
    274             'clean_urls_recovery_help' => 'Recovery mode enables clean URL safe mode and disables the admin alias.',
    275             'file' => 'File',
    276             'size' => 'Size',
    277             'action' => 'Action',
    278             'restore' => 'Restore',
    279             'settings_locked_notice' => 'Critical settings are locked. Colors and maintenance texts can be edited; URL, login, security, and menu settings are preserved.',
    280             'menu_visibility_title' => 'Admin Menu Visibility',
    281             'menu_visibility_help' => 'Selected menus are hidden. The Opphisse Toolkit menu is excluded from this list for safety.',
    282             'menu_client_title' => 'Client view',
    283             'menu_client_text' => 'Quickly hides technical menus, marketing links, and unnecessary settings screens.',
    284             'menu_block_title' => 'Direct access protection',
    285             'menu_block_text' => 'Redirects to the dashboard if a hidden page is opened directly by URL.',
    286             'menu_restore_title' => 'Restore',
    287             'menu_restore_text' => 'Reset Menu Visibility clears selections in one step.',
    288             'menu_search_placeholder' => 'Search menu',
    289             'filter_all' => 'All',
    290             'filter_content' => 'Content',
    291             'filter_commerce' => 'Commerce',
    292             'filter_technical' => 'Technical',
    293             'client_defaults' => 'Simplify for Client',
    294             'show_all' => 'Show All',
    295             'hide_visible' => 'Hide Visible',
    296             'hidden_items' => 'Hidden Items',
    297             'submenu_visibility_title' => 'Submenu Visibility',
    298             'menu_empty' => 'No menu items found for this filter.',
    299             'menu_none_selected' => 'No selection yet.',
    300             'menu_count' => '%1$s/%2$s visible, %3$s total hidden',
    301         ],
    302     ];
    303 
    3049    public static function t(string $key): string
    30510    {
    306         $locale = self::locale_key();
    307         return self::STRINGS[$locale][$key] ?? self::STRINGS['tr'][$key] ?? $key;
     11        $strings = self::strings();
     12        return $strings[$key] ?? $key;
    30813    }
    30914
    31015    public static function locale_key(): string
    31116    {
    312         $locale = (string) get_option('WPLANG', '');
    313         if ($locale === '' && function_exists('get_locale')) {
    314             $locale = get_locale();
    315         }
    316         if ($locale === '' && function_exists('determine_locale')) {
    317             $locale = determine_locale();
    318         }
    319 
     17        $locale = function_exists('determine_locale') ? determine_locale() : get_locale();
    32018        return stripos((string) $locale, 'tr_') === 0 ? 'tr' : 'en';
    32119    }
     20
     21    private static function strings(): array
     22    {
     23        return [
     24            'login_error' => __('The login details could not be verified. Please try again.', 'opphisse-toolkit'),
     25            'login_limited' => __('Too many attempts. Please try again later.', 'opphisse-toolkit'),
     26            'dashboard_title' => __('Opphisse Site Summary', 'opphisse-toolkit'),
     27            'dashboard_ready' => __('Your admin panel is ready.', 'opphisse-toolkit'),
     28            'dashboard_status' => __('Site management and maintenance status', 'opphisse-toolkit'),
     29            'toolkit_settings' => __('Toolkit Settings', 'opphisse-toolkit'),
     30            'add_page' => __('Add Page', 'opphisse-toolkit'),
     31            'add_product' => __('Add Product', 'opphisse-toolkit'),
     32            'orders' => __('Orders', 'opphisse-toolkit'),
     33            'view_site' => __('View Site', 'opphisse-toolkit'),
     34            'get_support' => __('Get Support', 'opphisse-toolkit'),
     35            'footer_prefix' => __('Toolkit', 'opphisse-toolkit'),
     36            'managed_by' => __('managed by.', 'opphisse-toolkit'),
     37            'menu_blocked' => __('This admin page is hidden by Opphisse menu visibility settings.', 'opphisse-toolkit'),
     38            'settings_imported' => __('Toolkit settings imported.', 'opphisse-toolkit'),
     39            'unauthorized' => __('Unauthorized.', 'opphisse-toolkit'),
     40            'settings_intro' => __('White-label admin, security, health and monitoring layer for agency handoffs.', 'opphisse-toolkit'),
     41            'save_settings' => __('Save Settings', 'opphisse-toolkit'),
     42            'tab_appearance' => __('Appearance', 'opphisse-toolkit'),
     43            'tab_login' => __('Login', 'opphisse-toolkit'),
     44            'tab_urls' => __('URL', 'opphisse-toolkit'),
     45            'tab_menu' => __('Menu', 'opphisse-toolkit'),
     46            'tab_security' => __('Security', 'opphisse-toolkit'),
     47            'tab_diagnostics' => __('Diagnostics', 'opphisse-toolkit'),
     48            'tab_health' => __('Health', 'opphisse-toolkit'),
     49            'tab_woocommerce' => __('WooCommerce', 'opphisse-toolkit'),
     50            'tab_tools' => __('Tools', 'opphisse-toolkit'),
     51            'settings_lock_enabled' => __('Lock critical settings', 'opphisse-toolkit'),
     52            'admin_branding' => __('Admin panel theme', 'opphisse-toolkit'),
     53            'toolbar_logo' => __('Toolbar logo', 'opphisse-toolkit'),
     54            'footer_branding' => __('Footer text', 'opphisse-toolkit'),
     55            'dashboard_cleanup' => __('Dashboard cleanup', 'opphisse-toolkit'),
     56            'maintenance_branding' => __('Maintenance screen branding', 'opphisse-toolkit'),
     57            'maintenance_manual_enabled' => __('Manual maintenance mode', 'opphisse-toolkit'),
     58            'accent_color' => __('Accent color', 'opphisse-toolkit'),
     59            'dark_color' => __('Dark color', 'opphisse-toolkit'),
     60            'maintenance_title_tr' => __('Maintenance title TR', 'opphisse-toolkit'),
     61            'maintenance_heading_tr' => __('Maintenance heading TR', 'opphisse-toolkit'),
     62            'maintenance_message_tr' => __('Maintenance message TR', 'opphisse-toolkit'),
     63            'maintenance_support_label_tr' => __('Maintenance support button TR', 'opphisse-toolkit'),
     64            'maintenance_title_en' => __('Maintenance title EN', 'opphisse-toolkit'),
     65            'maintenance_heading_en' => __('Maintenance heading EN', 'opphisse-toolkit'),
     66            'maintenance_message_en' => __('Maintenance message EN', 'opphisse-toolkit'),
     67            'maintenance_support_label_en' => __('Maintenance support button EN', 'opphisse-toolkit'),
     68            'login_branding' => __('Login screen theme', 'opphisse-toolkit'),
     69            'custom_login_enabled' => __('Custom login URL', 'opphisse-toolkit'),
     70            'limit_login' => __('Login attempt limit', 'opphisse-toolkit'),
     71            'custom_login_slug' => __('Custom login path', 'opphisse-toolkit'),
     72            'custom_login_slug_help' => __('Recommended: login. wp-login.php redirects to this address.', 'opphisse-toolkit'),
     73            'login_background' => __('Login background color', 'opphisse-toolkit'),
     74            'login_card_background' => __('Form background color', 'opphisse-toolkit'),
     75            'login_text_color' => __('Form text color', 'opphisse-toolkit'),
     76            'login_limit_attempts' => __('Attempt limit', 'opphisse-toolkit'),
     77            'login_limit_minutes' => __('Limit window in minutes', 'opphisse-toolkit'),
     78            'clean_urls_enabled' => __('Clean URL layer', 'opphisse-toolkit'),
     79            'clean_urls_safe_mode' => __('Safe mode', 'opphisse-toolkit'),
     80            'clean_admin_alias_enabled' => __('Admin alias', 'opphisse-toolkit'),
     81            'clean_admin_slug' => __('Admin alias path', 'opphisse-toolkit'),
     82            'client_mode_enabled' => __('Client mode', 'opphisse-toolkit'),
     83            'admin_menu_control_enabled' => __('Enable admin menu management', 'opphisse-toolkit'),
     84            'admin_menu_block_direct_access' => __('Block direct access to hidden pages', 'opphisse-toolkit'),
     85            'hide_notices_for_clients' => __('Hide technical notices from clients', 'opphisse-toolkit'),
     86            'show_admin_bar_for_clients' => __('Show frontend admin bar to clients', 'opphisse-toolkit'),
     87            'security_headers' => __('Basic security headers', 'opphisse-toolkit'),
     88            'disable_xmlrpc' => __('Disable XML-RPC', 'opphisse-toolkit'),
     89            'hide_generator' => __('Remove generator trace', 'opphisse-toolkit'),
     90            'harden_rest_users' => __('Restrict REST user endpoints', 'opphisse-toolkit'),
     91            'disable_author_scan' => __('Reduce author scans', 'opphisse-toolkit'),
     92            'health_widget' => __('Health widget', 'opphisse-toolkit'),
     93            'wc_hide_marketing' => __('Hide WooCommerce marketing areas', 'opphisse-toolkit'),
     94            'wc_account_branding' => __('Brand My Account forms', 'opphisse-toolkit'),
     95            'reset_menu_visibility' => __('Reset Menu Visibility', 'opphisse-toolkit'),
     96            'apply_security_standard' => __('Apply Security Standard', 'opphisse-toolkit'),
     97            'security_test' => __('Run Security Check', 'opphisse-toolkit'),
     98            'diagnostics_test' => __('Log Diagnostics Test', 'opphisse-toolkit'),
     99            'clear_logs' => __('Clear Logs', 'opphisse-toolkit'),
     100            'woocommerce_status' => __('WooCommerce status', 'opphisse-toolkit'),
     101            'active' => __('Active', 'opphisse-toolkit'),
     102            'inactive_test' => __('Not active in this test environment', 'opphisse-toolkit'),
     103            'wordpress' => __('WordPress', 'opphisse-toolkit'),
     104            'theme' => __('Theme', 'opphisse-toolkit'),
     105            'core_update' => __('Core update', 'opphisse-toolkit'),
     106            'plugin_update' => __('Plugin update', 'opphisse-toolkit'),
     107            'theme_update' => __('Theme update', 'opphisse-toolkit'),
     108            'file_editor' => __('File editor', 'opphisse-toolkit'),
     109            'writable' => __('Writable', 'opphisse-toolkit'),
     110            'problem' => __('Problem', 'opphisse-toolkit'),
     111            'none' => __('None', 'opphisse-toolkit'),
     112            'ready' => __('Ready', 'opphisse-toolkit'),
     113            'scheduled' => __('Scheduled', 'opphisse-toolkit'),
     114            'default' => __('Default', 'opphisse-toolkit'),
     115            'compatible' => __('Compatible', 'opphisse-toolkit'),
     116            'different' => __('Different', 'opphisse-toolkit'),
     117            'clean' => __('Clean', 'opphisse-toolkit'),
     118            'disabled' => __('Disabled', 'opphisse-toolkit'),
     119            'enabled' => __('Enabled', 'opphisse-toolkit'),
     120            'no_records' => __('No records yet.', 'opphisse-toolkit'),
     121            'time' => __('Time', 'opphisse-toolkit'),
     122            'type' => __('Type', 'opphisse-toolkit'),
     123            'detail' => __('Detail', 'opphisse-toolkit'),
     124            'export_settings' => __('Export Settings', 'opphisse-toolkit'),
     125            'import_settings' => __('Import Settings', 'opphisse-toolkit'),
     126            'reset_appearance' => __('Reset Appearance', 'opphisse-toolkit'),
     127            'reset_security' => __('Reset Security', 'opphisse-toolkit'),
     128            'reset_all' => __('Reset All Settings', 'opphisse-toolkit'),
     129            'tools_import_help' => __('The imported JSON file only moves toolkit settings; it does not change users, content, or WordPress core settings.', 'opphisse-toolkit'),
     130            'recovery' => __('Recovery', 'opphisse-toolkit'),
     131            'recovery_global_text' => __('Temporarily disables the admin theme, custom login, clean URLs, and critical interventions.', 'opphisse-toolkit'),
     132            'recovery_clean_url_text' => __('Temporarily disables the admin alias provided through the WordPress rewrite API.', 'opphisse-toolkit'),
     133            'recovery_lock_title' => __('Settings lock', 'opphisse-toolkit'),
     134            'recovery_lock_text' => __('Prevents critical settings from being changed in the panel after client handoff.', 'opphisse-toolkit'),
     135            'diagnostics_result' => __('Diagnostics Result', 'opphisse-toolkit'),
     136            'diagnostics_summary' => __('%1$s critical, %2$s warnings', 'opphisse-toolkit'),
     137            'clean_urls_status' => __('Clean URL Status', 'opphisse-toolkit'),
     138            'rebuild_aliases' => __('Rebuild Aliases', 'opphisse-toolkit'),
     139            'enable_recovery_mode' => __('Enable Recovery Mode', 'opphisse-toolkit'),
     140            'clean_urls_help' => __('The admin alias uses only the WordPress rewrite API. The toolkit does not modify wp-admin, wp-content, wp-includes, or .htaccess files.', 'opphisse-toolkit'),
     141            'clean_urls_recovery_help' => __('Recovery mode enables clean URL safe mode and disables the admin alias.', 'opphisse-toolkit'),
     142            'file' => __('File', 'opphisse-toolkit'),
     143            'size' => __('Size', 'opphisse-toolkit'),
     144            'action' => __('Action', 'opphisse-toolkit'),
     145            'restore' => __('Restore', 'opphisse-toolkit'),
     146            'settings_locked_notice' => __('Critical settings are locked. Colors and maintenance texts can be edited; URL, login, security, and menu settings are preserved.', 'opphisse-toolkit'),
     147            'menu_visibility_title' => __('Admin Menu Visibility', 'opphisse-toolkit'),
     148            'menu_visibility_help' => __('Selected menus are hidden. The Opphisse Toolkit menu is excluded from this list for safety.', 'opphisse-toolkit'),
     149            'menu_client_title' => __('Client view', 'opphisse-toolkit'),
     150            'menu_client_text' => __('Quickly hides technical menus, marketing links, and unnecessary settings screens.', 'opphisse-toolkit'),
     151            'menu_block_title' => __('Direct access protection', 'opphisse-toolkit'),
     152            'menu_block_text' => __('Redirects to the dashboard if a hidden page is opened directly by URL.', 'opphisse-toolkit'),
     153            'menu_restore_title' => __('Restore', 'opphisse-toolkit'),
     154            'menu_restore_text' => __('Reset Menu Visibility clears selections in one step.', 'opphisse-toolkit'),
     155            'menu_search_placeholder' => __('Search menu', 'opphisse-toolkit'),
     156            'filter_all' => __('All', 'opphisse-toolkit'),
     157            'filter_content' => __('Content', 'opphisse-toolkit'),
     158            'filter_commerce' => __('Commerce', 'opphisse-toolkit'),
     159            'filter_technical' => __('Technical', 'opphisse-toolkit'),
     160            'client_defaults' => __('Simplify for Client', 'opphisse-toolkit'),
     161            'show_all' => __('Show All', 'opphisse-toolkit'),
     162            'hide_visible' => __('Hide Visible', 'opphisse-toolkit'),
     163            'hidden_items' => __('Hidden Items', 'opphisse-toolkit'),
     164            'submenu_visibility_title' => __('Submenu Visibility', 'opphisse-toolkit'),
     165            'menu_empty' => __('No menu items found for this filter.', 'opphisse-toolkit'),
     166            'menu_none_selected' => __('No selection yet.', 'opphisse-toolkit'),
     167            'menu_count' => __('%1$s/%2$s visible, %3$s total hidden', 'opphisse-toolkit'),
     168            'pages' => __('Pages', 'opphisse-toolkit'),
     169            'edit_site_content' => __('Edit site content', 'opphisse-toolkit'),
     170            'media' => __('Media', 'opphisse-toolkit'),
     171            'manage_images' => __('Manage images', 'opphisse-toolkit'),
     172            'menus' => __('Menus', 'opphisse-toolkit'),
     173            'edit_navigation' => __('Edit navigation', 'opphisse-toolkit'),
     174            'products' => __('Products', 'opphisse-toolkit'),
     175            'manage_products' => __('Manage products', 'opphisse-toolkit'),
     176            'track_orders' => __('Track store orders', 'opphisse-toolkit'),
     177        ];
     178    }
    322179}
     180
  • opphisse-toolkit/tags/1.0.1/includes/class-opphisse-toolkit.php

    r3705504 r3757984  
    246246    {
    247247        $shortcuts = [
    248             ['label' => 'Sayfalar', 'text' => 'Site içeriklerini düzenle', 'url' => admin_url('edit.php?post_type=page')],
    249             ['label' => 'Medya', 'text' => 'Görselleri yönet', 'url' => admin_url('upload.php')],
    250             ['label' => 'Menüler', 'text' => 'Navigasyonu düzenle', 'url' => admin_url('nav-menus.php')],
     248            ['label' => Opphisse_Toolkit_I18n::t('pages'), 'text' => Opphisse_Toolkit_I18n::t('edit_site_content'), 'url' => admin_url('edit.php?post_type=page')],
     249            ['label' => Opphisse_Toolkit_I18n::t('media'), 'text' => Opphisse_Toolkit_I18n::t('manage_images'), 'url' => admin_url('upload.php')],
     250            ['label' => Opphisse_Toolkit_I18n::t('menus'), 'text' => Opphisse_Toolkit_I18n::t('edit_navigation'), 'url' => admin_url('nav-menus.php')],
    251251        ];
    252252
    253253        if (class_exists('WooCommerce')) {
    254             $shortcuts[] = ['label' => 'Ürünler', 'text' => 'Ürün listesini yönet', 'url' => admin_url('edit.php?post_type=product')];
    255             $shortcuts[] = ['label' => 'Siparişler', 'text' => 'Mağaza siparişlerini takip et', 'url' => admin_url('admin.php?page=wc-orders')];
     254            $shortcuts[] = ['label' => Opphisse_Toolkit_I18n::t('products'), 'text' => Opphisse_Toolkit_I18n::t('manage_products'), 'url' => admin_url('edit.php?post_type=product')];
     255            $shortcuts[] = ['label' => Opphisse_Toolkit_I18n::t('orders'), 'text' => Opphisse_Toolkit_I18n::t('track_orders'), 'url' => admin_url('admin.php?page=wc-orders')];
    256256        }
    257257
  • opphisse-toolkit/tags/1.0.1/opphisse-toolkit.php

    r3705504 r3757984  
    33 * Plugin Name: Opphisse Toolkit
    44 * Description: Agency white-label, admin experience, security, health and monitoring toolkit for managed WordPress sites.
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Requires at least: 6.4
    77 * Requires PHP: 8.1
    … …  
    1111 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1212 * Text Domain: opphisse-toolkit
     13 * Domain Path: /languages
    1314 */
    1415
    … …  
    1718}
    1819
    19 define('OPPHISSE_TOOLKIT_VERSION', '1.0.0');
     20define('OPPHISSE_TOOLKIT_VERSION', '1.0.1');
    2021define('OPPHISSE_TOOLKIT_FILE', __FILE__);
    2122define('OPPHISSE_TOOLKIT_PATH', plugin_dir_path(__FILE__));
    … …  
    3940require_once OPPHISSE_TOOLKIT_PATH . 'includes/class-opphisse-toolkit.php';
    4041
     42add_action('init', static function (): void {
     43    $locale = determine_locale();
     44    $mofile = OPPHISSE_TOOLKIT_PATH . 'languages/opphisse-toolkit-' . $locale . '.mo';
     45    if (is_readable($mofile) && !is_textdomain_loaded('opphisse-toolkit')) {
     46        load_textdomain('opphisse-toolkit', $mofile);
     47    }
     48}, 1);
     49
    4150register_activation_hook(__FILE__, ['Opphisse_Toolkit', 'activate']);
    4251register_deactivation_hook(__FILE__, ['Opphisse_Toolkit', 'deactivate']);
  • opphisse-toolkit/tags/1.0.1/readme.txt

    r3705504 r3757984  
    55Tested up to: 7.1
    66Requires PHP: 8.1
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    5151== Changelog ==
    5252
     53= 1.0.1 =
     54* Keeps Opphisse Toolkit accessible when the Settings menu or another Settings submenu is hidden.
     55* Adds standard WordPress gettext support and bundled Turkish translations.
     56
    5357= 1.0.0 =
    5458* Initial public release.
    … …  
    7781== Upgrade Notice ==
    7882
     83= 1.0.1 =
     84Keeps the Toolkit recovery screen accessible and adds Turkish localization.
     85
    7986= 1.0.0 =
    8087Initial public release with filesystem-safe URL and maintenance behavior.
  • opphisse-toolkit/trunk/includes/class-opphisse-toolkit-admin-menu.php

    r3705504 r3757984  
    7272        }
    7373
     74        // The Toolkit is the recovery path for menu visibility settings. Keep it
     75        // reachable even when the Settings parent or one of its children is hidden.
     76        if (self::is_toolkit_page()) {
     77            return;
     78        }
     79
    7480        $current = self::current_page_slug();
    7581        $hidden = array_map('strval', (array) ($settings['admin_menu_hidden'] ?? []));
    … …  
    128134    }
    129135
     136    private static function is_toolkit_page(): bool
     137    {
     138        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only current admin screen detection.
     139        $page = isset($_GET['page']) ? sanitize_key(wp_unslash((string) $_GET['page'])) : '';
     140        return $page === 'opphisse-toolkit';
     141    }
     142
    130143    private static function matches_current_slug(string $slug): bool
    131144    {
  • opphisse-toolkit/trunk/includes/class-opphisse-toolkit-i18n.php

    r3705504 r3757984  
    77final class Opphisse_Toolkit_I18n
    88{
    9     private const STRINGS = [
    10         'tr' => [
    11             'login_error' => 'Giriş bilgileri doğrulanamadı. Lütfen tekrar deneyin.',
    12             'login_limited' => 'Çok fazla deneme yapıldı. Lütfen daha sonra tekrar deneyin.',
    13             'dashboard_title' => 'Opphisse Site Özeti',
    14             'dashboard_ready' => 'Yönetim paneliniz hazır.',
    15             'dashboard_status' => 'Site yönetimi ve bakım durumu',
    16             'toolkit_settings' => 'Toolkit Ayarları',
    17             'add_page' => 'Sayfa Ekle',
    18             'add_product' => 'Ürün Ekle',
    19             'orders' => 'Siparişler',
    20             'view_site' => 'Siteyi Görüntüle',
    21             'get_support' => 'Destek Al',
    22             'footer_prefix' => 'Toolkit',
    23             'managed_by' => 'tarafından yönetiliyor.',
    24             'menu_blocked' => 'Bu admin sayfası Opphisse menü görünürlük ayarlarıyla gizlendi.',
    25             'settings_imported' => 'Toolkit ayarları içe aktarıldı.',
    26             'unauthorized' => 'Yetkisiz işlem.',
    27             'settings_intro' => 'Ajans teslimleri için white-label admin, güvenlik, sağlık ve izleme katmanı.',
    28             'save_settings' => 'Ayarları Kaydet',
    29             'tab_appearance' => 'Görünüm',
    30             'tab_login' => 'Giriş',
    31             'tab_urls' => 'URL',
    32             'tab_menu' => 'Menü',
    33             'tab_security' => 'Güvenlik',
    34             'tab_diagnostics' => 'Tanı',
    35             'tab_health' => 'Sağlık',
    36             'tab_woocommerce' => 'WooCommerce',
    37             'tab_tools' => 'Araçlar',
    38             'settings_lock_enabled' => 'Kritik ayarları kilitle',
    39             'admin_branding' => 'Admin panel teması',
    40             'toolbar_logo' => 'Toolbar logosu',
    41             'footer_branding' => 'Footer yazısı',
    42             'dashboard_cleanup' => 'Dashboard sadeleştirme',
    43             'maintenance_branding' => 'Bakım ekranı markalama',
    44             'maintenance_manual_enabled' => 'Manuel bakım modu',
    45             'accent_color' => 'Vurgu rengi',
    46             'dark_color' => 'Koyu renk',
    47             'maintenance_title_tr' => 'Bakım başlığı TR',
    48             'maintenance_heading_tr' => 'Bakım ana metni TR',
    49             'maintenance_message_tr' => 'Bakım açıklaması TR',
    50             'maintenance_support_label_tr' => 'Bakım destek butonu TR',
    51             'maintenance_title_en' => 'Bakım başlığı EN',
    52             'maintenance_heading_en' => 'Bakım ana metni EN',
    53             'maintenance_message_en' => 'Bakım açıklaması EN',
    54             'maintenance_support_label_en' => 'Bakım destek butonu EN',
    55             'login_branding' => 'Giriş ekranı teması',
    56             'custom_login_enabled' => 'Özel giriş adresi',
    57             'limit_login' => 'Login deneme limiti',
    58             'custom_login_slug' => 'Özel giriş yolu',
    59             'custom_login_slug_help' => 'Önerilen: login. wp-login.php bu adrese yönlendirilir.',
    60             'login_background' => 'Giriş arka plan rengi',
    61             'login_card_background' => 'Form arka plan rengi',
    62             'login_text_color' => 'Form metin rengi',
    63             'login_limit_attempts' => 'Deneme limiti',
    64             'login_limit_minutes' => 'Limit süresi dakika',
    65             'clean_urls_enabled' => 'Clean URL katmanı',
    66             'clean_urls_safe_mode' => 'Safe mode',
    67             'clean_admin_alias_enabled' => 'Admin aliası',
    68             'clean_admin_slug' => 'Admin alias yolu',
    69             'client_mode_enabled' => 'Müşteri modu',
    70             'admin_menu_control_enabled' => 'Admin menü düzenlemeyi etkinleştir',
    71             'admin_menu_block_direct_access' => 'Gizlenen sayfalara direkt erişimi engelle',
    72             'hide_notices_for_clients' => 'Müşteriye teknik bildirimleri gizle',
    73             'show_admin_bar_for_clients' => 'Müşteriye frontend admin bar göster',
    74             'security_headers' => 'Temel güvenlik başlıkları',
    75             'disable_xmlrpc' => 'XML-RPC kapat',
    76             'hide_generator' => 'Generator izini kaldır',
    77             'harden_rest_users' => 'REST kullanıcı endpointlerini kısıtla',
    78             'disable_author_scan' => 'Author scan azalt',
    79             'health_widget' => 'Sağlık widgetı',
    80             'wc_hide_marketing' => 'WooCommerce pazarlama alanlarını gizle',
    81             'wc_account_branding' => 'Hesabım formlarını markala',
    82             'reset_menu_visibility' => 'Menüyü Varsayılana Döndür',
    83             'apply_security_standard' => 'Güvenlik Standardını Uygula',
    84             'security_test' => 'Güvenlik Kontrolü Çalıştır',
    85             'diagnostics_test' => 'Tanı Testini Logla',
    86             'clear_logs' => 'Logları Temizle',
    87             'woocommerce_status' => 'WooCommerce durumu',
    88             'active' => 'Aktif',
    89             'inactive_test' => 'Bu test ortamında aktif değil',
    90             'wordpress' => 'WordPress',
    91             'theme' => 'Tema',
    92             'core_update' => 'Core güncelleme',
    93             'plugin_update' => 'Plugin güncelleme',
    94             'theme_update' => 'Tema güncelleme',
    95             'file_editor' => 'Dosya editörü',
    96             'writable' => 'Yazılabilir',
    97             'problem' => 'Sorunlu',
    98             'none' => 'Yok',
    99             'ready' => 'Hazır',
    100             'scheduled' => 'Planlı',
    101             'default' => 'Varsayılan',
    102             'compatible' => 'Uyumlu',
    103             'different' => 'Farklı',
    104             'clean' => 'Temiz',
    105             'disabled' => 'Kapalı',
    106             'enabled' => 'Açık',
    107             'no_records' => 'Henüz kayıt yok.',
    108             'time' => 'Zaman',
    109             'type' => 'Tip',
    110             'detail' => 'Detay',
    111             'export_settings' => 'Ayarları Dışa Aktar',
    112             'import_settings' => 'Ayarları İçe Aktar',
    113             'reset_appearance' => 'Görünümü Sıfırla',
    114             'reset_security' => 'Güvenliği Sıfırla',
    115             'reset_all' => 'Tüm Ayarları Sıfırla',
    116             'tools_import_help' => 'Aktarım JSON dosyası sadece toolkit ayarlarını taşır; kullanıcı, içerik ve WordPress çekirdek ayarlarını değiştirmez.',
    117             'recovery' => 'Kurtarma',
    118             'recovery_global_text' => 'Admin tema, özel giriş, clean URL ve kritik müdahaleleri geçici kapatır.',
    119             'recovery_clean_url_text' => 'WordPress rewrite API ile çalışan admin aliasını geçici olarak pasifleştirir.',
    120             'recovery_lock_title' => 'Ayar kilidi',
    121             'recovery_lock_text' => 'Müşteri tesliminden sonra kritik ayarların panelden değiştirilmesini engeller.',
    122             'diagnostics_result' => 'Tanı Sonucu',
    123             'diagnostics_summary' => '%1$s kritik, %2$s uyarı',
    124             'clean_urls_status' => 'Clean URL Durumu',
    125             'rebuild_aliases' => 'Aliasları Yeniden Kur',
    126             'enable_recovery_mode' => 'Kurtarma Modunu Aç',
    127             'clean_urls_help' => 'Admin aliası yalnızca WordPress rewrite API ile çalışır. Toolkit wp-admin, wp-content, wp-includes veya .htaccess dosyalarını değiştirmez.',
    128             'clean_urls_recovery_help' => 'Kurtarma modu clean URL safe mode açar ve admin aliasını devre dışı bırakır.',
    129             'file' => 'Dosya',
    130             'size' => 'Boyut',
    131             'action' => 'İşlem',
    132             'restore' => 'Geri Yükle',
    133             'settings_locked_notice' => 'Kritik ayarlar kilitli. Renk ve bakım metinleri düzenlenebilir, URL/login/güvenlik/menü ayarları korunur.',
    134             'menu_visibility_title' => 'Admin Menü Görünürlüğü',
    135             'menu_visibility_help' => 'Seçili menüler gizlenir. Opphisse Toolkit menüsü güvenlik için bu listeden hariç tutulur.',
    136             'menu_client_title' => 'Müşteri görünümü',
    137             'menu_client_text' => 'Teknik menüleri, pazarlama bağlantılarını ve gereksiz ayar sayfalarını hızlıca gizler.',
    138             'menu_block_title' => 'Direkt erişim koruması',
    139             'menu_block_text' => 'Gizlenen sayfaya URL ile gidilirse dashboarda yönlendirir.',
    140             'menu_restore_title' => 'Geri dönüş',
    141             'menu_restore_text' => 'Menüyü Varsayılana Döndür ile seçimler tek adımda temizlenir.',
    142             'menu_search_placeholder' => 'Menü ara',
    143             'filter_all' => 'Tümü',
    144             'filter_content' => 'İçerik',
    145             'filter_commerce' => 'Ticaret',
    146             'filter_technical' => 'Teknik',
    147             'client_defaults' => 'Müşteri İçin Sadeleştir',
    148             'show_all' => 'Hepsini Göster',
    149             'hide_visible' => 'Görünenleri Gizle',
    150             'hidden_items' => 'Gizlenenler',
    151             'submenu_visibility_title' => 'Alt Menü Görünürlüğü',
    152             'menu_empty' => 'Bu filtrede menü bulunamadı.',
    153             'menu_none_selected' => 'Henüz seçim yok.',
    154             'menu_count' => '%1$s/%2$s görünürde, toplam %3$s gizlenecek',
    155         ],
    156         'en' => [
    157             'login_error' => 'The login details could not be verified. Please try again.',
    158             'login_limited' => 'Too many attempts. Please try again later.',
    159             'dashboard_title' => 'Opphisse Site Summary',
    160             'dashboard_ready' => 'Your admin panel is ready.',
    161             'dashboard_status' => 'Site management and maintenance status',
    162             'toolkit_settings' => 'Toolkit Settings',
    163             'add_page' => 'Add Page',
    164             'add_product' => 'Add Product',
    165             'orders' => 'Orders',
    166             'view_site' => 'View Site',
    167             'get_support' => 'Get Support',
    168             'footer_prefix' => 'Toolkit',
    169             'managed_by' => 'managed by.',
    170             'menu_blocked' => 'This admin page is hidden by Opphisse menu visibility settings.',
    171             'settings_imported' => 'Toolkit settings imported.',
    172             'unauthorized' => 'Unauthorized.',
    173             'settings_intro' => 'White-label admin, security, health and monitoring layer for agency handoffs.',
    174             'save_settings' => 'Save Settings',
    175             'tab_appearance' => 'Appearance',
    176             'tab_login' => 'Login',
    177             'tab_urls' => 'URL',
    178             'tab_menu' => 'Menu',
    179             'tab_security' => 'Security',
    180             'tab_diagnostics' => 'Diagnostics',
    181             'tab_health' => 'Health',
    182             'tab_woocommerce' => 'WooCommerce',
    183             'tab_tools' => 'Tools',
    184             'settings_lock_enabled' => 'Lock critical settings',
    185             'admin_branding' => 'Admin panel theme',
    186             'toolbar_logo' => 'Toolbar logo',
    187             'footer_branding' => 'Footer text',
    188             'dashboard_cleanup' => 'Dashboard cleanup',
    189             'maintenance_branding' => 'Maintenance screen branding',
    190             'maintenance_manual_enabled' => 'Manual maintenance mode',
    191             'accent_color' => 'Accent color',
    192             'dark_color' => 'Dark color',
    193             'maintenance_title_tr' => 'Maintenance title TR',
    194             'maintenance_heading_tr' => 'Maintenance heading TR',
    195             'maintenance_message_tr' => 'Maintenance message TR',
    196             'maintenance_support_label_tr' => 'Maintenance support button TR',
    197             'maintenance_title_en' => 'Maintenance title EN',
    198             'maintenance_heading_en' => 'Maintenance heading EN',
    199             'maintenance_message_en' => 'Maintenance message EN',
    200             'maintenance_support_label_en' => 'Maintenance support button EN',
    201             'login_branding' => 'Login screen theme',
    202             'custom_login_enabled' => 'Custom login URL',
    203             'limit_login' => 'Login attempt limit',
    204             'custom_login_slug' => 'Custom login path',
    205             'custom_login_slug_help' => 'Recommended: login. wp-login.php redirects to this address.',
    206             'login_background' => 'Login background color',
    207             'login_card_background' => 'Form background color',
    208             'login_text_color' => 'Form text color',
    209             'login_limit_attempts' => 'Attempt limit',
    210             'login_limit_minutes' => 'Limit window in minutes',
    211             'clean_urls_enabled' => 'Clean URL layer',
    212             'clean_urls_safe_mode' => 'Safe mode',
    213             'clean_admin_alias_enabled' => 'Admin alias',
    214             'clean_admin_slug' => 'Admin alias path',
    215             'client_mode_enabled' => 'Client mode',
    216             'admin_menu_control_enabled' => 'Enable admin menu management',
    217             'admin_menu_block_direct_access' => 'Block direct access to hidden pages',
    218             'hide_notices_for_clients' => 'Hide technical notices from clients',
    219             'show_admin_bar_for_clients' => 'Show frontend admin bar to clients',
    220             'security_headers' => 'Basic security headers',
    221             'disable_xmlrpc' => 'Disable XML-RPC',
    222             'hide_generator' => 'Remove generator trace',
    223             'harden_rest_users' => 'Restrict REST user endpoints',
    224             'disable_author_scan' => 'Reduce author scans',
    225             'health_widget' => 'Health widget',
    226             'wc_hide_marketing' => 'Hide WooCommerce marketing areas',
    227             'wc_account_branding' => 'Brand My Account forms',
    228             'reset_menu_visibility' => 'Reset Menu Visibility',
    229             'apply_security_standard' => 'Apply Security Standard',
    230             'security_test' => 'Run Security Check',
    231             'diagnostics_test' => 'Log Diagnostics Test',
    232             'clear_logs' => 'Clear Logs',
    233             'woocommerce_status' => 'WooCommerce status',
    234             'active' => 'Active',
    235             'inactive_test' => 'Not active in this test environment',
    236             'wordpress' => 'WordPress',
    237             'theme' => 'Theme',
    238             'core_update' => 'Core update',
    239             'plugin_update' => 'Plugin update',
    240             'theme_update' => 'Theme update',
    241             'file_editor' => 'File editor',
    242             'writable' => 'Writable',
    243             'problem' => 'Problem',
    244             'none' => 'None',
    245             'ready' => 'Ready',
    246             'scheduled' => 'Scheduled',
    247             'default' => 'Default',
    248             'compatible' => 'Compatible',
    249             'different' => 'Different',
    250             'clean' => 'Clean',
    251             'disabled' => 'Disabled',
    252             'enabled' => 'Enabled',
    253             'no_records' => 'No records yet.',
    254             'time' => 'Time',
    255             'type' => 'Type',
    256             'detail' => 'Detail',
    257             'export_settings' => 'Export Settings',
    258             'import_settings' => 'Import Settings',
    259             'reset_appearance' => 'Reset Appearance',
    260             'reset_security' => 'Reset Security',
    261             'reset_all' => 'Reset All Settings',
    262             'tools_import_help' => 'The imported JSON file only moves toolkit settings; it does not change users, content, or WordPress core settings.',
    263             'recovery' => 'Recovery',
    264             'recovery_global_text' => 'Temporarily disables the admin theme, custom login, clean URLs, and critical interventions.',
    265             'recovery_clean_url_text' => 'Temporarily disables the admin alias provided through the WordPress rewrite API.',
    266             'recovery_lock_title' => 'Settings lock',
    267             'recovery_lock_text' => 'Prevents critical settings from being changed in the panel after client handoff.',
    268             'diagnostics_result' => 'Diagnostics Result',
    269             'diagnostics_summary' => '%1$s critical, %2$s warnings',
    270             'clean_urls_status' => 'Clean URL Status',
    271             'rebuild_aliases' => 'Rebuild Aliases',
    272             'enable_recovery_mode' => 'Enable Recovery Mode',
    273             'clean_urls_help' => 'The admin alias uses only the WordPress rewrite API. The toolkit does not modify wp-admin, wp-content, wp-includes, or .htaccess files.',
    274             'clean_urls_recovery_help' => 'Recovery mode enables clean URL safe mode and disables the admin alias.',
    275             'file' => 'File',
    276             'size' => 'Size',
    277             'action' => 'Action',
    278             'restore' => 'Restore',
    279             'settings_locked_notice' => 'Critical settings are locked. Colors and maintenance texts can be edited; URL, login, security, and menu settings are preserved.',
    280             'menu_visibility_title' => 'Admin Menu Visibility',
    281             'menu_visibility_help' => 'Selected menus are hidden. The Opphisse Toolkit menu is excluded from this list for safety.',
    282             'menu_client_title' => 'Client view',
    283             'menu_client_text' => 'Quickly hides technical menus, marketing links, and unnecessary settings screens.',
    284             'menu_block_title' => 'Direct access protection',
    285             'menu_block_text' => 'Redirects to the dashboard if a hidden page is opened directly by URL.',
    286             'menu_restore_title' => 'Restore',
    287             'menu_restore_text' => 'Reset Menu Visibility clears selections in one step.',
    288             'menu_search_placeholder' => 'Search menu',
    289             'filter_all' => 'All',
    290             'filter_content' => 'Content',
    291             'filter_commerce' => 'Commerce',
    292             'filter_technical' => 'Technical',
    293             'client_defaults' => 'Simplify for Client',
    294             'show_all' => 'Show All',
    295             'hide_visible' => 'Hide Visible',
    296             'hidden_items' => 'Hidden Items',
    297             'submenu_visibility_title' => 'Submenu Visibility',
    298             'menu_empty' => 'No menu items found for this filter.',
    299             'menu_none_selected' => 'No selection yet.',
    300             'menu_count' => '%1$s/%2$s visible, %3$s total hidden',
    301         ],
    302     ];
    303 
    3049    public static function t(string $key): string
    30510    {
    306         $locale = self::locale_key();
    307         return self::STRINGS[$locale][$key] ?? self::STRINGS['tr'][$key] ?? $key;
     11        $strings = self::strings();
     12        return $strings[$key] ?? $key;
    30813    }
    30914
    31015    public static function locale_key(): string
    31116    {
    312         $locale = (string) get_option('WPLANG', '');
    313         if ($locale === '' && function_exists('get_locale')) {
    314             $locale = get_locale();
    315         }
    316         if ($locale === '' && function_exists('determine_locale')) {
    317             $locale = determine_locale();
    318         }
    319 
     17        $locale = function_exists('determine_locale') ? determine_locale() : get_locale();
    32018        return stripos((string) $locale, 'tr_') === 0 ? 'tr' : 'en';
    32119    }
     20
     21    private static function strings(): array
     22    {
     23        return [
     24            'login_error' => __('The login details could not be verified. Please try again.', 'opphisse-toolkit'),
     25            'login_limited' => __('Too many attempts. Please try again later.', 'opphisse-toolkit'),
     26            'dashboard_title' => __('Opphisse Site Summary', 'opphisse-toolkit'),
     27            'dashboard_ready' => __('Your admin panel is ready.', 'opphisse-toolkit'),
     28            'dashboard_status' => __('Site management and maintenance status', 'opphisse-toolkit'),
     29            'toolkit_settings' => __('Toolkit Settings', 'opphisse-toolkit'),
     30            'add_page' => __('Add Page', 'opphisse-toolkit'),
     31            'add_product' => __('Add Product', 'opphisse-toolkit'),
     32            'orders' => __('Orders', 'opphisse-toolkit'),
     33            'view_site' => __('View Site', 'opphisse-toolkit'),
     34            'get_support' => __('Get Support', 'opphisse-toolkit'),
     35            'footer_prefix' => __('Toolkit', 'opphisse-toolkit'),
     36            'managed_by' => __('managed by.', 'opphisse-toolkit'),
     37            'menu_blocked' => __('This admin page is hidden by Opphisse menu visibility settings.', 'opphisse-toolkit'),
     38            'settings_imported' => __('Toolkit settings imported.', 'opphisse-toolkit'),
     39            'unauthorized' => __('Unauthorized.', 'opphisse-toolkit'),
     40            'settings_intro' => __('White-label admin, security, health and monitoring layer for agency handoffs.', 'opphisse-toolkit'),
     41            'save_settings' => __('Save Settings', 'opphisse-toolkit'),
     42            'tab_appearance' => __('Appearance', 'opphisse-toolkit'),
     43            'tab_login' => __('Login', 'opphisse-toolkit'),
     44            'tab_urls' => __('URL', 'opphisse-toolkit'),
     45            'tab_menu' => __('Menu', 'opphisse-toolkit'),
     46            'tab_security' => __('Security', 'opphisse-toolkit'),
     47            'tab_diagnostics' => __('Diagnostics', 'opphisse-toolkit'),
     48            'tab_health' => __('Health', 'opphisse-toolkit'),
     49            'tab_woocommerce' => __('WooCommerce', 'opphisse-toolkit'),
     50            'tab_tools' => __('Tools', 'opphisse-toolkit'),
     51            'settings_lock_enabled' => __('Lock critical settings', 'opphisse-toolkit'),
     52            'admin_branding' => __('Admin panel theme', 'opphisse-toolkit'),
     53            'toolbar_logo' => __('Toolbar logo', 'opphisse-toolkit'),
     54            'footer_branding' => __('Footer text', 'opphisse-toolkit'),
     55            'dashboard_cleanup' => __('Dashboard cleanup', 'opphisse-toolkit'),
     56            'maintenance_branding' => __('Maintenance screen branding', 'opphisse-toolkit'),
     57            'maintenance_manual_enabled' => __('Manual maintenance mode', 'opphisse-toolkit'),
     58            'accent_color' => __('Accent color', 'opphisse-toolkit'),
     59            'dark_color' => __('Dark color', 'opphisse-toolkit'),
     60            'maintenance_title_tr' => __('Maintenance title TR', 'opphisse-toolkit'),
     61            'maintenance_heading_tr' => __('Maintenance heading TR', 'opphisse-toolkit'),
     62            'maintenance_message_tr' => __('Maintenance message TR', 'opphisse-toolkit'),
     63            'maintenance_support_label_tr' => __('Maintenance support button TR', 'opphisse-toolkit'),
     64            'maintenance_title_en' => __('Maintenance title EN', 'opphisse-toolkit'),
     65            'maintenance_heading_en' => __('Maintenance heading EN', 'opphisse-toolkit'),
     66            'maintenance_message_en' => __('Maintenance message EN', 'opphisse-toolkit'),
     67            'maintenance_support_label_en' => __('Maintenance support button EN', 'opphisse-toolkit'),
     68            'login_branding' => __('Login screen theme', 'opphisse-toolkit'),
     69            'custom_login_enabled' => __('Custom login URL', 'opphisse-toolkit'),
     70            'limit_login' => __('Login attempt limit', 'opphisse-toolkit'),
     71            'custom_login_slug' => __('Custom login path', 'opphisse-toolkit'),
     72            'custom_login_slug_help' => __('Recommended: login. wp-login.php redirects to this address.', 'opphisse-toolkit'),
     73            'login_background' => __('Login background color', 'opphisse-toolkit'),
     74            'login_card_background' => __('Form background color', 'opphisse-toolkit'),
     75            'login_text_color' => __('Form text color', 'opphisse-toolkit'),
     76            'login_limit_attempts' => __('Attempt limit', 'opphisse-toolkit'),
     77            'login_limit_minutes' => __('Limit window in minutes', 'opphisse-toolkit'),
     78            'clean_urls_enabled' => __('Clean URL layer', 'opphisse-toolkit'),
     79            'clean_urls_safe_mode' => __('Safe mode', 'opphisse-toolkit'),
     80            'clean_admin_alias_enabled' => __('Admin alias', 'opphisse-toolkit'),
     81            'clean_admin_slug' => __('Admin alias path', 'opphisse-toolkit'),
     82            'client_mode_enabled' => __('Client mode', 'opphisse-toolkit'),
     83            'admin_menu_control_enabled' => __('Enable admin menu management', 'opphisse-toolkit'),
     84            'admin_menu_block_direct_access' => __('Block direct access to hidden pages', 'opphisse-toolkit'),
     85            'hide_notices_for_clients' => __('Hide technical notices from clients', 'opphisse-toolkit'),
     86            'show_admin_bar_for_clients' => __('Show frontend admin bar to clients', 'opphisse-toolkit'),
     87            'security_headers' => __('Basic security headers', 'opphisse-toolkit'),
     88            'disable_xmlrpc' => __('Disable XML-RPC', 'opphisse-toolkit'),
     89            'hide_generator' => __('Remove generator trace', 'opphisse-toolkit'),
     90            'harden_rest_users' => __('Restrict REST user endpoints', 'opphisse-toolkit'),
     91            'disable_author_scan' => __('Reduce author scans', 'opphisse-toolkit'),
     92            'health_widget' => __('Health widget', 'opphisse-toolkit'),
     93            'wc_hide_marketing' => __('Hide WooCommerce marketing areas', 'opphisse-toolkit'),
     94            'wc_account_branding' => __('Brand My Account forms', 'opphisse-toolkit'),
     95            'reset_menu_visibility' => __('Reset Menu Visibility', 'opphisse-toolkit'),
     96            'apply_security_standard' => __('Apply Security Standard', 'opphisse-toolkit'),
     97            'security_test' => __('Run Security Check', 'opphisse-toolkit'),
     98            'diagnostics_test' => __('Log Diagnostics Test', 'opphisse-toolkit'),
     99            'clear_logs' => __('Clear Logs', 'opphisse-toolkit'),
     100            'woocommerce_status' => __('WooCommerce status', 'opphisse-toolkit'),
     101            'active' => __('Active', 'opphisse-toolkit'),
     102            'inactive_test' => __('Not active in this test environment', 'opphisse-toolkit'),
     103            'wordpress' => __('WordPress', 'opphisse-toolkit'),
     104            'theme' => __('Theme', 'opphisse-toolkit'),
     105            'core_update' => __('Core update', 'opphisse-toolkit'),
     106            'plugin_update' => __('Plugin update', 'opphisse-toolkit'),
     107            'theme_update' => __('Theme update', 'opphisse-toolkit'),
     108            'file_editor' => __('File editor', 'opphisse-toolkit'),
     109            'writable' => __('Writable', 'opphisse-toolkit'),
     110            'problem' => __('Problem', 'opphisse-toolkit'),
     111            'none' => __('None', 'opphisse-toolkit'),
     112            'ready' => __('Ready', 'opphisse-toolkit'),
     113            'scheduled' => __('Scheduled', 'opphisse-toolkit'),
     114            'default' => __('Default', 'opphisse-toolkit'),
     115            'compatible' => __('Compatible', 'opphisse-toolkit'),
     116            'different' => __('Different', 'opphisse-toolkit'),
     117            'clean' => __('Clean', 'opphisse-toolkit'),
     118            'disabled' => __('Disabled', 'opphisse-toolkit'),
     119            'enabled' => __('Enabled', 'opphisse-toolkit'),
     120            'no_records' => __('No records yet.', 'opphisse-toolkit'),
     121            'time' => __('Time', 'opphisse-toolkit'),
     122            'type' => __('Type', 'opphisse-toolkit'),
     123            'detail' => __('Detail', 'opphisse-toolkit'),
     124            'export_settings' => __('Export Settings', 'opphisse-toolkit'),
     125            'import_settings' => __('Import Settings', 'opphisse-toolkit'),
     126            'reset_appearance' => __('Reset Appearance', 'opphisse-toolkit'),
     127            'reset_security' => __('Reset Security', 'opphisse-toolkit'),
     128            'reset_all' => __('Reset All Settings', 'opphisse-toolkit'),
     129            'tools_import_help' => __('The imported JSON file only moves toolkit settings; it does not change users, content, or WordPress core settings.', 'opphisse-toolkit'),
     130            'recovery' => __('Recovery', 'opphisse-toolkit'),
     131            'recovery_global_text' => __('Temporarily disables the admin theme, custom login, clean URLs, and critical interventions.', 'opphisse-toolkit'),
     132            'recovery_clean_url_text' => __('Temporarily disables the admin alias provided through the WordPress rewrite API.', 'opphisse-toolkit'),
     133            'recovery_lock_title' => __('Settings lock', 'opphisse-toolkit'),
     134            'recovery_lock_text' => __('Prevents critical settings from being changed in the panel after client handoff.', 'opphisse-toolkit'),
     135            'diagnostics_result' => __('Diagnostics Result', 'opphisse-toolkit'),
     136            'diagnostics_summary' => __('%1$s critical, %2$s warnings', 'opphisse-toolkit'),
     137            'clean_urls_status' => __('Clean URL Status', 'opphisse-toolkit'),
     138            'rebuild_aliases' => __('Rebuild Aliases', 'opphisse-toolkit'),
     139            'enable_recovery_mode' => __('Enable Recovery Mode', 'opphisse-toolkit'),
     140            'clean_urls_help' => __('The admin alias uses only the WordPress rewrite API. The toolkit does not modify wp-admin, wp-content, wp-includes, or .htaccess files.', 'opphisse-toolkit'),
     141            'clean_urls_recovery_help' => __('Recovery mode enables clean URL safe mode and disables the admin alias.', 'opphisse-toolkit'),
     142            'file' => __('File', 'opphisse-toolkit'),
     143            'size' => __('Size', 'opphisse-toolkit'),
     144            'action' => __('Action', 'opphisse-toolkit'),
     145            'restore' => __('Restore', 'opphisse-toolkit'),
     146            'settings_locked_notice' => __('Critical settings are locked. Colors and maintenance texts can be edited; URL, login, security, and menu settings are preserved.', 'opphisse-toolkit'),
     147            'menu_visibility_title' => __('Admin Menu Visibility', 'opphisse-toolkit'),
     148            'menu_visibility_help' => __('Selected menus are hidden. The Opphisse Toolkit menu is excluded from this list for safety.', 'opphisse-toolkit'),
     149            'menu_client_title' => __('Client view', 'opphisse-toolkit'),
     150            'menu_client_text' => __('Quickly hides technical menus, marketing links, and unnecessary settings screens.', 'opphisse-toolkit'),
     151            'menu_block_title' => __('Direct access protection', 'opphisse-toolkit'),
     152            'menu_block_text' => __('Redirects to the dashboard if a hidden page is opened directly by URL.', 'opphisse-toolkit'),
     153            'menu_restore_title' => __('Restore', 'opphisse-toolkit'),
     154            'menu_restore_text' => __('Reset Menu Visibility clears selections in one step.', 'opphisse-toolkit'),
     155            'menu_search_placeholder' => __('Search menu', 'opphisse-toolkit'),
     156            'filter_all' => __('All', 'opphisse-toolkit'),
     157            'filter_content' => __('Content', 'opphisse-toolkit'),
     158            'filter_commerce' => __('Commerce', 'opphisse-toolkit'),
     159            'filter_technical' => __('Technical', 'opphisse-toolkit'),
     160            'client_defaults' => __('Simplify for Client', 'opphisse-toolkit'),
     161            'show_all' => __('Show All', 'opphisse-toolkit'),
     162            'hide_visible' => __('Hide Visible', 'opphisse-toolkit'),
     163            'hidden_items' => __('Hidden Items', 'opphisse-toolkit'),
     164            'submenu_visibility_title' => __('Submenu Visibility', 'opphisse-toolkit'),
     165            'menu_empty' => __('No menu items found for this filter.', 'opphisse-toolkit'),
     166            'menu_none_selected' => __('No selection yet.', 'opphisse-toolkit'),
     167            'menu_count' => __('%1$s/%2$s visible, %3$s total hidden', 'opphisse-toolkit'),
     168            'pages' => __('Pages', 'opphisse-toolkit'),
     169            'edit_site_content' => __('Edit site content', 'opphisse-toolkit'),
     170            'media' => __('Media', 'opphisse-toolkit'),
     171            'manage_images' => __('Manage images', 'opphisse-toolkit'),
     172            'menus' => __('Menus', 'opphisse-toolkit'),
     173            'edit_navigation' => __('Edit navigation', 'opphisse-toolkit'),
     174            'products' => __('Products', 'opphisse-toolkit'),
     175            'manage_products' => __('Manage products', 'opphisse-toolkit'),
     176            'track_orders' => __('Track store orders', 'opphisse-toolkit'),
     177        ];
     178    }
    322179}
     180
  • opphisse-toolkit/trunk/includes/class-opphisse-toolkit.php

    r3705504 r3757984  
    246246    {
    247247        $shortcuts = [
    248             ['label' => 'Sayfalar', 'text' => 'Site içeriklerini düzenle', 'url' => admin_url('edit.php?post_type=page')],
    249             ['label' => 'Medya', 'text' => 'Görselleri yönet', 'url' => admin_url('upload.php')],
    250             ['label' => 'Menüler', 'text' => 'Navigasyonu düzenle', 'url' => admin_url('nav-menus.php')],
     248            ['label' => Opphisse_Toolkit_I18n::t('pages'), 'text' => Opphisse_Toolkit_I18n::t('edit_site_content'), 'url' => admin_url('edit.php?post_type=page')],
     249            ['label' => Opphisse_Toolkit_I18n::t('media'), 'text' => Opphisse_Toolkit_I18n::t('manage_images'), 'url' => admin_url('upload.php')],
     250            ['label' => Opphisse_Toolkit_I18n::t('menus'), 'text' => Opphisse_Toolkit_I18n::t('edit_navigation'), 'url' => admin_url('nav-menus.php')],
    251251        ];
    252252
    253253        if (class_exists('WooCommerce')) {
    254             $shortcuts[] = ['label' => 'Ürünler', 'text' => 'Ürün listesini yönet', 'url' => admin_url('edit.php?post_type=product')];
    255             $shortcuts[] = ['label' => 'Siparişler', 'text' => 'Mağaza siparişlerini takip et', 'url' => admin_url('admin.php?page=wc-orders')];
     254            $shortcuts[] = ['label' => Opphisse_Toolkit_I18n::t('products'), 'text' => Opphisse_Toolkit_I18n::t('manage_products'), 'url' => admin_url('edit.php?post_type=product')];
     255            $shortcuts[] = ['label' => Opphisse_Toolkit_I18n::t('orders'), 'text' => Opphisse_Toolkit_I18n::t('track_orders'), 'url' => admin_url('admin.php?page=wc-orders')];
    256256        }
    257257
  • opphisse-toolkit/trunk/opphisse-toolkit.php

    r3705504 r3757984  
    33 * Plugin Name: Opphisse Toolkit
    44 * Description: Agency white-label, admin experience, security, health and monitoring toolkit for managed WordPress sites.
    5  * Version: 1.0.0
     5 * Version: 1.0.1
    66 * Requires at least: 6.4
    77 * Requires PHP: 8.1
    … …  
    1111 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1212 * Text Domain: opphisse-toolkit
     13 * Domain Path: /languages
    1314 */
    1415
    … …  
    1718}
    1819
    19 define('OPPHISSE_TOOLKIT_VERSION', '1.0.0');
     20define('OPPHISSE_TOOLKIT_VERSION', '1.0.1');
    2021define('OPPHISSE_TOOLKIT_FILE', __FILE__);
    2122define('OPPHISSE_TOOLKIT_PATH', plugin_dir_path(__FILE__));
    … …  
    3940require_once OPPHISSE_TOOLKIT_PATH . 'includes/class-opphisse-toolkit.php';
    4041
     42add_action('init', static function (): void {
     43    $locale = determine_locale();
     44    $mofile = OPPHISSE_TOOLKIT_PATH . 'languages/opphisse-toolkit-' . $locale . '.mo';
     45    if (is_readable($mofile) && !is_textdomain_loaded('opphisse-toolkit')) {
     46        load_textdomain('opphisse-toolkit', $mofile);
     47    }
     48}, 1);
     49
    4150register_activation_hook(__FILE__, ['Opphisse_Toolkit', 'activate']);
    4251register_deactivation_hook(__FILE__, ['Opphisse_Toolkit', 'deactivate']);
  • opphisse-toolkit/trunk/readme.txt

    r3705504 r3757984  
    55Tested up to: 7.1
    66Requires PHP: 8.1
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    5151== Changelog ==
    5252
     53= 1.0.1 =
     54* Keeps Opphisse Toolkit accessible when the Settings menu or another Settings submenu is hidden.
     55* Adds standard WordPress gettext support and bundled Turkish translations.
     56
    5357= 1.0.0 =
    5458* Initial public release.
    … …  
    7781== Upgrade Notice ==
    7882
     83= 1.0.1 =
     84Keeps the Toolkit recovery screen accessible and adds Turkish localization.
     85
    7986= 1.0.0 =
    8087Initial public release with filesystem-safe URL and maintenance behavior.
Note: See TracChangeset for help on using the changeset viewer.