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

+15 -15
View File
@@ -84,10 +84,10 @@ function extractCalls(source, marker) {
/** 收集一行渲染调用携带的依赖规则与显示标签。 */
function rowsWithDeps(source) {
const markers = [
{ marker: '->field_row(', label: (t) => (t.match(/__\(\s*'([^']*)'\s*,\s*'aksrt'\s*\)/) || [])[1] },
{ marker: '->field_row(', label: (t) => (t.match(/__\(\s*'([^']*)'\s*,\s*'jio'\s*\)/) || [])[1] },
{
marker: '->submessage_row(',
label: (t) => (t.match(/<b>'\s*\.\s*esc_html__\(\s*'([^']*)'\s*,\s*'aksrt'\s*\)/) || [])[1],
label: (t) => (t.match(/<b>'\s*\.\s*esc_html__\(\s*'([^']*)'\s*,\s*'jio'\s*\)/) || [])[1],
},
];
const calls = [];
@@ -147,7 +147,7 @@ function createForm() {
const document = {
readyState: 'loading',
querySelectorAll(sel) {
if (sel === '.aksrt-cardpass-form [name]') return inputs;
if (sel === '.jio-cardpass-form [name]') return inputs;
if (sel === '[data-dep]') return rows.map((row) => row.el);
return [];
},
@@ -220,10 +220,10 @@ test('两种行渲染都接入服务端预隐藏,避免首帧铺开', () => {
// wp-admin/js/common.js 会把页面上的 notice 搬到页头,见下一条用例),
// 它仍能被求值并保持隐藏。
assert.match(page, /<td colspan="2"><div'\s*\.\s*\$dep_attr/, '提示块必须自带 data-dep');
assert.match(page, /class="aksrt-submsg"'\s*\.\s*\$hidden/, '提示块必须自带初始隐藏状态');
assert.match(page, /class="jio-submsg"'\s*\.\s*\$hidden/, '提示块必须自带初始隐藏状态');
// 求值范围不限域:提示块被移出表格/表单子树后仍必须被求值。
assert.match(script, /querySelectorAll\('\[data-dep\]'\)/, '求值必须全文档查找 data-dep');
assert.doesNotMatch(script, /querySelectorAll\('\.aksrt-cardpass-form \[data-dep\]'\)/, '求值不得限域在表单内');
assert.doesNotMatch(script, /querySelectorAll\('\.jio-cardpass-form \[data-dep\]'\)/, '求值不得限域在表单内');
});
test('导入提示不得使用 WP 的 .notice 类(否则被 common.js 搬到页面顶部)', () => {
@@ -234,19 +234,19 @@ test('导入提示不得使用 WP 的 .notice 类(否则被 common.js 搬到
// 且搬迁发生在 evalDeps 之后,行内显隐逻辑无法纠正(历史故障:提示一直显示在页面最上方)。
assert.match(
page,
/private function submessage_row\([\s\S]*?class="aksrt-submsg"/,
'提示块只应带自有类名 aksrt-submsg'
/private function submessage_row\([\s\S]*?class="jio-submsg"/,
'提示块只应带自有类名 jio-submsg'
);
assert.doesNotMatch(
page,
/class="aksrt-submsg[^"]*\bnotice\b/,
/class="jio-submsg[^"]*\bnotice\b/,
'提示块不得带 notice 类:会被 common.js 搬到页面顶部'
);
// 外观改由自有类名承担,删掉样式规则会让提示失去底色与左侧色条。
assert.match(
page,
/\.aksrt-submsg \{[^}]*background:[^}]*border-left:/,
'.aksrt-submsg 必须自带 background 与 border-left 外观'
/\.jio-submsg \{[^}]*background:[^}]*border-left:/,
'.jio-submsg 必须自带 background 与 border-left 外观'
);
// 允许(且要求)真正需要置顶的提示保留 notice:确认本用例没有误伤其它通知输出。
assert.match(page, /class="notice notice-error"/, '页面级错误通知仍应使用 notice');
@@ -266,17 +266,17 @@ test('导入提示的条目列表由 <ul> 承载,圆点不越出文字边界',
checked++;
assert.match(
call.text,
/<ul class="aksrt-submsg-list">/,
'提示内的 <li> 必须包在 <ul class="aksrt-submsg-list"> 中'
/<ul class="jio-submsg-list">/,
'提示内的 <li> 必须包在 <ul class="jio-submsg-list"> 中'
);
assert.equal([...call.text.matchAll(/<ul class="aksrt-submsg-list">/g)].length, 1, '每条提示只应有一个条目列表');
assert.equal([...call.text.matchAll(/<ul class="jio-submsg-list">/g)].length, 1, '每条提示只应有一个条目列表');
assert.equal(opens, [...call.text.matchAll(/<\/li>/g)].length, '<li> 标签必须成对');
assert.equal([...call.text.matchAll(/<\/ul>/g)].length, 1, '</ul> 必须成对');
}
assert.equal(checked, 4, '四条导入提示都应带条目列表');
assert.match(page, /\.aksrt-submsg-list \{[^}]*padding-left:/, '.aksrt-submsg-list 必须给出 padding-left,圆点才有落点');
assert.match(page, /\.aksrt-submsg-list \{[^}]*list-style:\s*disc/, '.aksrt-submsg-list 应显式声明圆点样式,不依赖 UA 默认值');
assert.match(page, /\.jio-submsg-list \{[^}]*padding-left:/, '.jio-submsg-list 必须给出 padding-left,圆点才有落点');
assert.match(page, /\.jio-submsg-list \{[^}]*list-style:\s*disc/, '.jio-submsg-list 应显式声明圆点样式,不依赖 UA 默认值');
});
test('行内脚本不再保留解析期的空操作求值(死代码)', () => {