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

@@ -17,21 +17,21 @@ test('the token relay is fully retired', () => {
assert.doesNotMatch(read('functions.php'), /Content\\Download'/);
// The orphaned cleanup cron is still unscheduled on theme switch.
assert.match(read('functions.php'), /aksrt_dl_token_cleanup/);
assert.match(read('functions.php'), /jio_dl_token_cleanup/);
// Header query-var branch and SEO noindex branch are gone with the route.
assert.doesNotMatch(read('inc/helpers/homepage/header-components.php'), /aksrt_dl_token/);
assert.doesNotMatch(read('inc/helpers/homepage/header-components.php'), /jio_dl_token/);
assert.doesNotMatch(read('src/Core/SEOHead.php'), /render_robots/);
assert.doesNotMatch(read('src/Core/SEOHead.php'), /aksrt_dl_token/);
assert.doesNotMatch(read('src/Core/SEOHead.php'), /jio_dl_token/);
});
test('the download box renders direct anchors with inline extract codes', () => {
const box = read('templates/parts/resource-download-box.php');
// No relay button, captcha surface or low-credit data attributes.
assert.doesNotMatch(box, /data-action="aksrt-download"/);
assert.doesNotMatch(box, /data-action="jio-download"/);
assert.doesNotMatch(box, /data-captcha/);
assert.doesNotMatch(box, /data-aksrt-download-captcha/);
assert.doesNotMatch(box, /data-jio-download-captcha/);
assert.doesNotMatch(box, /captcha_active/);
assert.doesNotMatch(box, /data-balance|data-cost/);
@@ -48,7 +48,7 @@ test('the download box renders direct anchors with inline extract codes', () =>
assert.match(box, /data-clipboard-tag="<\?php echo esc_attr\(\$has_copy \?/);
// Custom icon / label / color from the pay meta feed the anchor.
assert.match(box, /aksrt_icon_markup\(\$icon\)/);
assert.match(box, /jio_icon_markup\(\$icon\)/);
assert.match(box, /\$btn_text = \$label;/);
assert.match(box, /resource-download-box__btn--custom/);
@@ -65,10 +65,10 @@ test('the download box renders direct anchors with inline extract codes', () =>
// Hovering the remark shows 点击复制{copy name}, matching the reference theme,
// and only when a copy name exists.
assert.match(box, /\$has_copy && \$copy_key !== ''\) : \?>/);
assert.match(box, /sprintf\(__\('点击复制%s', 'aksrt'\), \$copy_key\)/);
assert.match(box, /sprintf\(__\('点击复制%s', 'jio'\), \$copy_key\)/);
assert.match(box, /data-toggle="tooltip"/);
const pay = read('inc/helpers/aksrt-pay.php');
assert.match(pay, /sprintf\(__\('点击复制%s', 'aksrt'\), \$copy_key\)/);
const pay = read('inc/helpers/jio-pay.php');
assert.match(pay, /sprintf\(__\('点击复制%s', 'jio'\), \$copy_key\)/);
// Bootstrap tooltips must be initialized for the attribute to do anything.
const main = read('assets/js/runtime/main.js');
assert.match(main, /jQuery\("\[data-toggle='tooltip'\]"\)\.tooltip\(/);
@@ -79,11 +79,11 @@ test('the download box renders direct anchors with inline extract codes', () =>
});
test('the paid card download actions render direct anchors', () => {
const pay = read('inc/helpers/aksrt-pay.php');
const pay = read('inc/helpers/jio-pay.php');
assert.doesNotMatch(pay, /data-action="aksrt-download"/);
assert.doesNotMatch(pay, /data-action="jio-download"/);
assert.doesNotMatch(pay, /data-captcha/);
assert.doesNotMatch(pay, /data-aksrt-download-captcha/);
assert.doesNotMatch(pay, /data-jio-download-captcha/);
assert.doesNotMatch(pay, /captcha_active/);
// Direct anchor to the raw source URL, empty sources skipped.
@@ -99,28 +99,28 @@ test('cms-download.js only serves the cashier now', () => {
// The download request flow is gone.
assert.doesNotMatch(js, /download\/request/);
assert.doesNotMatch(js, /data-action="aksrt-download"/);
assert.doesNotMatch(js, /data-action="jio-download"/);
assert.doesNotMatch(js, /renderSuccess|startDownload|performDownloadRequest|requestDownload/);
assert.doesNotMatch(js, /AKSRTCaptcha/);
assert.doesNotMatch(js, /JioCaptcha/);
// Cashier, scan-pay and error views remain.
assert.match(js, /data-aksrt-pay-content/);
assert.match(js, /window\.aksrtOpenCashier = function/);
assert.match(js, /data-jio-pay-content/);
assert.match(js, /window\.jioOpenCashier = function/);
assert.match(js, /function renderCashier/);
assert.match(js, /function renderScanPay/);
assert.match(js, /function renderError/);
// The script is still enqueued for resource / paid singles.
assert.match(read('src/Core/ScriptsPart1b.php'), /'aksrt-cms-download'/);
assert.match(read('src/Core/ScriptsPart1b.php'), /'jio-cms-download'/);
});
test('the admin download-logs page and its wiring are gone', () => {
// 下载记录菜单页面:类文件、菜单注册、init 接线、各入口链接全部移除。
assert.equal(exists('src/Admin/Native/PayDownloadLogs.php'), false);
assert.doesNotMatch(read('src/Admin/Native/PayMenus.php'), /download_logs|aksrt_download_logs|PayDownloadLogs/)
assert.doesNotMatch(read('src/Admin/Native/PayMenus.php'), /download_logs|jio_download_logs|PayDownloadLogs/)
assert.doesNotMatch(read('functions.php'), /PayDownloadLogs/)
assert.doesNotMatch(read('src/Admin/Native/PayProducts.php'), /aksrt_download_logs/)
assert.doesNotMatch(read('src/User/CreditsAdmin.php'), /aksrt_download_logs|下载记录/)
assert.doesNotMatch(read('src/Admin/Native/PayProducts.php'), /jio_download_logs/)
assert.doesNotMatch(read('src/User/CreditsAdmin.php'), /jio_download_logs|下载记录/)
})
test('download log retention settings no longer exist', () => {
@@ -133,11 +133,11 @@ test('download log retention settings no longer exist', () => {
test('downloads stay unrecorded', () => {
// 下载不做记录:没有任何 PHP 写入下载计数或下载令牌。
const php = [
'inc/helpers/aksrt-pay.php',
'inc/helpers/aksrt-resource.php',
'inc/helpers/jio-pay.php',
'inc/helpers/jio-resource.php',
'src/Content/PayRest.php',
'src/Content/Visibility.php',
].map(read).join('\n')
assert.doesNotMatch(php, /update_post_meta\([^)]*download_count/)
assert.doesNotMatch(php, /aksrt_update_post_counter\([^)]*download/)
assert.doesNotMatch(php, /jio_update_post_counter\([^)]*download/)
});