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

@@ -55,7 +55,7 @@ function runtime({ autoopen = false, empty = false } = {}) {
const window = new Element();
doc.documentElement = new Element();
doc.getElementById = (id) => ids.get(id) || null;
doc.querySelector = (selector) => selector === '.aksrt-messages-admin' ? root : null;
doc.querySelector = (selector) => selector === '.jio-messages-admin' ? root : null;
const dialogs = [];
function dialog(id) {
const node = new Element();
@@ -65,23 +65,23 @@ function runtime({ autoopen = false, empty = false } = {}) {
node.cancel = () => { node.fire('cancel'); node.close(); };
node.closeButton = new Element();
node.closeButton.addEventListener('click', () => {});
node.map('[data-aksrt-dialog-close]', [node.closeButton]);
node.map('[data-jio-dialog-close]', [node.closeButton]);
ids.set(id, node);
dialogs.push(node);
return node;
}
const compose = dialog('aksrt-msg-compose');
const detail = dialog('aksrt-msg-detail');
const confirm = dialog('aksrt-msg-confirm');
const compose = dialog('jio-msg-compose');
const detail = dialog('jio-msg-detail');
const confirm = dialog('jio-msg-confirm');
confirm.attrs = { 'data-i18n-delete-title': '删除消息', 'data-i18n-delete-text': '删除 {count} 条消息', 'data-i18n-delete-send': '确认删除' };
const accept = new Element();
const cancel = confirm.closeButton;
const confirmation = new Element();
confirm.map('[data-aksrt-msg-confirm]', accept).map('[data-aksrt-dialog-title]', new Element()).map('#aksrt-msg-confirm-text', confirmation).map('[data-aksrt-dialog-close][autofocus]', cancel);
confirm.map('[data-jio-msg-confirm]', accept).map('[data-jio-dialog-title]', new Element()).map('#jio-msg-confirm-text', confirmation).map('[data-jio-dialog-close][autofocus]', cancel);
const detailBody = new Element();
detail.map('[data-aksrt-msg-detail-body]', detailBody);
ids.set('aksrt-msg-detail-8', { content: { cloneNode: () => ({ text: 'Full <script> message' }) } });
root.map('.aksrt-msg-dialog', dialogs);
detail.map('[data-jio-msg-detail-body]', detailBody);
ids.set('jio-msg-detail-8', { content: { cloneNode: () => ({ text: 'Full <script> message' }) } });
root.map('.jio-msg-dialog', dialogs);
const originalQuery = root.querySelector.bind(root);
root.querySelector = (selector) => selector === 'dialog[open]' ? dialogs.find((node) => node.open) || null : originalQuery(selector);
@@ -112,16 +112,16 @@ function runtime({ autoopen = false, empty = false } = {}) {
const list = form({ bulk_action: field('bulk_action'), message_id: field('message_id') }, checks);
const checkAll = new Element();
const selection = new Element({ 'data-label': '已选 %d 条' });
const bulkRead = new Element({ 'data-aksrt-msg-action': 'mark_read' });
const bulkDelete = new Element({ 'data-aksrt-msg-action': 'delete' });
const rowRead = new Element({ 'data-aksrt-msg-action': 'mark_read', 'data-id': '8' });
const rowDelete = new Element({ 'data-aksrt-msg-action': 'delete', 'data-id': '8' });
const view = new Element({ 'data-aksrt-msg-view': '8' });
const bulkRead = new Element({ 'data-jio-msg-action': 'mark_read' });
const bulkDelete = new Element({ 'data-jio-msg-action': 'delete' });
const rowRead = new Element({ 'data-jio-msg-action': 'mark_read', 'data-id': '8' });
const rowDelete = new Element({ 'data-jio-msg-action': 'delete', 'data-id': '8' });
const view = new Element({ 'data-jio-msg-view': '8' });
const actions = [bulkRead, bulkDelete, rowRead, rowDelete];
list.map('[data-aksrt-msg-check]', checks).map('[data-aksrt-msg-check-all]', checkAll).map('[data-aksrt-msg-selection]', selection)
.map('[data-aksrt-msg-action]:not([data-id])', [bulkRead, bulkDelete]).map('[data-aksrt-msg-action]', actions)
.map('button', [...actions, view]).map('button[data-id], button[data-aksrt-msg-view]', [rowRead, rowDelete, view]);
root.map('[data-aksrt-msg-list]', list).map('[data-aksrt-msg-view]', [view]);
list.map('[data-jio-msg-check]', checks).map('[data-jio-msg-check-all]', checkAll).map('[data-jio-msg-selection]', selection)
.map('[data-jio-msg-action]:not([data-id])', [bulkRead, bulkDelete]).map('[data-jio-msg-action]', actions)
.map('button', [...actions, view]).map('button[data-id], button[data-jio-msg-view]', [rowRead, rowDelete, view]);
root.map('[data-jio-msg-list]', list).map('[data-jio-msg-view]', [view]);
const role = field('role', '', true);
role.options = [new Element({ 'data-count': '0' }), new Element({ 'data-count': '3', 'data-label': '订阅者' })];
@@ -138,8 +138,8 @@ function runtime({ autoopen = false, empty = false } = {}) {
const usersRadio = new Element({ value: 'users' });
usersRadio.checked = true;
const roleRadio = new Element({ value: 'role' });
const usersPane = new Element({ 'data-aksrt-msg-pane': 'users' });
const rolePane = new Element({ 'data-aksrt-msg-pane': 'role' });
const usersPane = new Element({ 'data-jio-msg-pane': 'users' });
const rolePane = new Element({ 'data-jio-msg-pane': 'role' });
usersPane.map('input, select, textarea', [composeForm.elements.users]);
rolePane.map('input, select, textarea', [role]);
const titleCount = new Element();
@@ -148,15 +148,15 @@ function runtime({ autoopen = false, empty = false } = {}) {
const send = new Element();
composeForm.elements.title.attrs['data-count-limit'] = '191';
composeForm.elements.content.attrs['data-count-limit'] = '2000';
composeForm.map('[data-aksrt-msg-send]', send).map('[data-count-limit]', [composeForm.elements.title, composeForm.elements.content])
.map('[data-count-for="title"]', titleCount).map('[data-count-for="content"]', contentCount).map('[data-aksrt-msg-role-hint]', roleHint)
.map('[data-aksrt-msg-pane]', [usersPane, rolePane]).map('input[name="recipient_mode"]', [usersRadio, roleRadio]);
composeForm.map('[data-jio-msg-send]', send).map('[data-count-limit]', [composeForm.elements.title, composeForm.elements.content])
.map('[data-count-for="title"]', titleCount).map('[data-count-for="content"]', contentCount).map('[data-jio-msg-role-hint]', roleHint)
.map('[data-jio-msg-pane]', [usersPane, rolePane]).map('input[name="recipient_mode"]', [usersRadio, roleRadio]);
const formQuery = composeForm.querySelector.bind(composeForm);
composeForm.querySelector = (selector) => selector === 'input[name="recipient_mode"]:checked' ? (usersRadio.checked ? usersRadio : roleRadio) : formQuery(selector);
compose.map('[data-aksrt-msg-compose]', composeForm);
if (autoopen) compose.attrs['data-aksrt-dialog-autoopen'] = '';
compose.map('[data-jio-msg-compose]', composeForm);
if (autoopen) compose.attrs['data-jio-dialog-autoopen'] = '';
const trigger = new Element();
root.map('[data-aksrt-dialog-open]', [trigger]);
root.map('[data-jio-dialog-open]', [trigger]);
vm.runInNewContext(fs.readFileSync(path.resolve(__dirname, '../../assets/js/admin-messages.js'), 'utf8'), { document: doc, window });
function chooseRole() {
@@ -266,7 +266,7 @@ test('role sending uses a nested confirmation with the confirmed role and count'
r.cancel.fire('click');
assert.equal(r.compose.open, true);
assert.equal(r.composeForm.submissions.length, 0);
assert.equal(r.doc.documentElement.classList.contains('aksrt-msg-modal-open'), true);
assert.equal(r.doc.documentElement.classList.contains('jio-msg-modal-open'), true);
r.composeForm.requestSubmit(r.send); r.accept.fire('click');
assert.equal(r.composeForm.submissions.length, 1);
assert.equal(r.composeForm.submissions[0].confirmed_role, 'subscriber');
@@ -317,5 +317,5 @@ test('failed sends reopen compose and backdrop clicks must start outside the dia
r.compose.fire('pointerdown', { clientX: 0, clientY: 0 });
r.compose.fire('click', { clientX: 0, clientY: 0 });
assert.equal(r.compose.open, false);
assert.equal(r.doc.documentElement.classList.contains('aksrt-msg-modal-open'), false);
assert.equal(r.doc.documentElement.classList.contains('jio-msg-modal-open'), false);
});