refactor: rename the theme brand and every identifier from AKSRT to Jio

Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.

Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
  cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
  window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)

Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
  so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
  (dropped 3 stale entries, added the 17 missing ones)

Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
  get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
  when it is empty

Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.

Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-11-01 20:05:04 +08:00
1 parent 5b16bc6e15
commit 35bb96e82f
997 files changed
+28216 -28188

No files matched your search

+12 -12
View File
@@ -22,7 +22,7 @@ namespace {
function wp_get_current_user() { return (object) ['ID' => 7, 'display_name' => 'Operator']; }
function get_users($args) { return [(object) ['ID' => 7, 'display_name' => 'Operator'], (object) ['ID' => 8, 'display_name' => 'Second']]; }
function get_edit_user_link($id) { return admin_url('user-edit.php?user_id=' . $id); }
function aksrt_get_avatar_url($id, $size) { return 'https://example.test/avatar/' . $id; }
function jio_get_avatar_url($id, $size) { return 'https://example.test/avatar/' . $id; }
function add_query_arg($args, $url, $base = null) {
if (!is_array($args)) { $args = [$args => $url]; $url = $base; }
$parts = parse_url($url);
@@ -30,7 +30,7 @@ namespace {
return $parts['scheme'] . '://' . $parts['host'] . ($parts['path'] ?? '') . '?' . http_build_query(array_merge($query, $args));
}
}
namespace AKSRT\Ticket {
namespace Jio\Ticket {
class TicketSettings {
public static bool $orders = true;
public static function title_max() { return 100; }
@@ -94,8 +94,8 @@ namespace AKSRT\Ticket {
}
}
}
namespace AKSRT\Core {
class DBMigrator { public static function table($name) { return 'wp_aksrt_' . $name; } }
namespace Jio\Core {
class DBMigrator { public static function table($name) { return 'wp_jio_' . $name; } }
}
namespace {
$root = dirname(__DIR__, 2);
@@ -104,12 +104,12 @@ namespace {
}
require $root . '/src/Ticket/TicketQuery.php';
class TicketPage {
use \AKSRT\Admin\Native\UsersMenusTicketsCenter;
use \Jio\Admin\Native\UsersMenusTicketsCenter;
public const CAPABILITY = 'manage_options';
private function ensure_cap() {}
}
class QueryProbe {
use \AKSRT\Ticket\TicketQuery;
use \Jio\Ticket\TicketQuery;
public function where($args) { return $this->ticket_where($args, true); }
public function counts($args) { return $this->ticket_statistic($args, true); }
}
@@ -126,20 +126,20 @@ namespace {
$page->render_tickets_page();
return (string) ob_get_clean();
}
$repo = \AKSRT\Ticket\TicketRepository::class;
$repo = \Jio\Ticket\TicketRepository::class;
$page = new TicketPage();
$list = render_page($page, ['status' => 'handling', 'ticket_type_id' => 1, 's' => 'needle', 'paged' => 99]);
$initial = ['queries' => $repo::$queries, 'counts' => $repo::$counts, 'detail_reads' => $repo::$reads, 'reply_reads' => $repo::$replies_read];
$list_queries = count($repo::$queries);
$open = render_page($page, ['id' => 21, 'status' => 'pending', 's' => 'not in list', 'paged' => 3, 'aksrt_ticket_msg' => 'reply']);
$open = render_page($page, ['id' => 21, 'status' => 'pending', 's' => 'not in list', 'paged' => 3, 'jio_ticket_msg' => 'reply']);
$closed = render_page($page, ['id' => 99]);
$missing = render_page($page, ['id' => 404]);
$detail_list_queries = count($repo::$queries) - $list_queries;
$bogus_notice = render_page($page, ['id' => 21, 'aksrt_ticket_msg' => '<script>']);
\AKSRT\Ticket\TicketTypeService::$empty = true;
$bogus_notice = render_page($page, ['id' => 21, 'jio_ticket_msg' => '<script>']);
\Jio\Ticket\TicketTypeService::$empty = true;
$no_types = render_page($page, []);
\AKSRT\Ticket\TicketTypeService::$empty = false;
\AKSRT\Ticket\TicketSettings::$orders = false;
\Jio\Ticket\TicketTypeService::$empty = false;
\Jio\Ticket\TicketSettings::$orders = false;
$no_orders = render_page($page, []);
$GLOBALS['wpdb'] = new FakeDb();
$query = new QueryProbe();