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

@@ -48,12 +48,12 @@ test('front submit follows the reference newposts shell and cards', () => {
assert.match(page, /<\/div>\s*<\/div>\s*<div class="sidebar show-sidebar">/);
assert.match(layout, /if \(is_page_template\('templates\/pages\/page-submit\.php'\)\) \{\s*return true;/);
assert.equal((page.match(/class="sidebar show-sidebar"/g) || []).length, 1);
assert.match(page, /'aksrt-submit',[\s\S]*?\['aksrt-public'\]/);
assert.match(page, /'jio-submit',[\s\S]*?\['jio-public'\]/);
assert.match(main, /zib-widget full-widget-sm editor-main-box/);
assert.match(main, /relative newposts-title/);
assert.match(terms, /newpost-cat-drop drop-select dropdown dependency-box/);
assert.match(terms, /data-toggle-class="open" data-target="\.newpost-cat-drop"/);
assert.match(terms, /aksrt_submit_render_term_checks\(\$ctx\['categories'\], array_map\('intval', \$ctx\['current_cats'\]\), 'category'\)/);
assert.match(terms, /jio_submit_render_term_checks\(\$ctx\['categories'\], array_map\('intval', \$ctx\['current_cats'\]\), 'category'\)/);
assert.doesNotMatch(terms, /aria-expanded=/);
assert.doesNotMatch(submitJs, /bindDropSelect|term-select-box \[data-toggle-class/);
assert.doesNotMatch(submitCss, /\.term-select-box \.dropdown-menu|\.term-select-box \.drop-select\s*{/);
@@ -66,17 +66,17 @@ test('front submit follows the reference newposts shell and cards', () => {
assert.equal((submit.match(/fa-fw/g) || []).length, 2);
assert.doesNotMatch(submit, /fa-(?:dot-circle|check-square) mr6/);
assert.match(publicCss, /\.but-average\s*>\s*\.but\s*{[^}]*flex:\s*auto/);
assert.match(submitCss, /#aksrt-submit-form \.new-posts-submit\s*{[^}]*white-space:\s*nowrap;/);
assert.match(submitCss, /#aksrt-submit-form \.but-average > \.new-posts-submit\s*{[^}]*min-width:\s*0;[^}]*flex:\s*1 1 50%;/);
assert.match(submitCss, /#jio-submit-form \.new-posts-submit\s*{[^}]*white-space:\s*nowrap;/);
assert.match(submitCss, /#jio-submit-form \.but-average > \.new-posts-submit\s*{[^}]*min-width:\s*0;[^}]*flex:\s*1 1 50%;/);
assert.match(mobileSubmitCss, /body \.newposts-wrap\s*{[^}]*float:\s*none;/);
assert.match(mobileSubmitCss, /body \.sidebar\.show-sidebar\s*{[^}]*display:\s*unset;[^}]*width:\s*100%;[^}]*margin-left:\s*0;/);
assert.doesNotMatch(submitCss, /\.newposts-wrap\s*>\s*\.(?:content-layout|sidebar)/);
assert.doesNotMatch(submitCss, /\.newposts-wrap \.new-posts-submit/);
// The form wraps both float columns; flow-root is its only layout job.
assert.match(submitCss, /#aksrt-submit-form\s*{[^}]*display:\s*flow-root;/);
assert.doesNotMatch(submitCss, /#aksrt-submit-form\s*{[^}]*display:\s*(?:grid|flex);/);
assert.match(submitCss, /#jio-submit-form\s*{[^}]*display:\s*flow-root;/);
assert.doesNotMatch(submitCss, /#jio-submit-form\s*{[^}]*display:\s*(?:grid|flex);/);
// Submit chrome gating lives in footer.php; no dead filter/body-class duplicates.
assert.doesNotMatch(read('src/Core/FrontSubmit.php'), /aksrt_floating_buttons_enabled|aksrt_footer_tabbar_enabled|aksrt-hide-float|aksrt-hide-tabbar|disable_chrome_on_submit/);
assert.doesNotMatch(read('src/Core/FrontSubmit.php'), /jio_floating_buttons_enabled|jio_footer_tabbar_enabled|jio-hide-float|jio-hide-tabbar|disable_chrome_on_submit/);
});
test('front submit paid resources use the reference modal editor and compact list', () => {
@@ -86,8 +86,8 @@ test('front submit paid resources use the reference modal editor and compact lis
const downloads = read('assets/js/front-submit-pay-download.js');
const model = read('src/Core/DomainModel.php');
assert.match(page, /aksrt-front-submit-pay-download/);
assert.match(submit, /aksrtSubmitPayDownloads\.init/);
assert.match(page, /jio-front-submit-pay-download/);
assert.match(submit, /jioSubmitPayDownloads\.init/);
assert.match(pay, /data-pay-download-add/);
assert.match(pay, /data-pay-download-edit/);
assert.match(pay, /data-pay-download-remove/);
@@ -126,7 +126,7 @@ test('the post editor resource row mirrors the reference seven fields with icon
// Accordion + drag reorder affordances.
assert.match(meta, /data-group-toggle/);
assert.match(meta, /data-group-drag/);
assert.match(meta, /aksrt-icon-picker_assets\(|aksrt_icon_picker_field\(/);
assert.match(meta, /jio-icon-picker_assets\(|jio_icon_picker_field\(/);
// The swatch palette and the sanitizer share one class whitelist.
assert.match(meta, /DomainModel::DOWNLOAD_BUTTON_CLASSES/);
assert.match(model, /const DOWNLOAD_BUTTON_CLASSES/);
@@ -139,24 +139,24 @@ test('the post editor resource row mirrors the reference seven fields with icon
// Reindexing rewrites the row index for every field and is scoped to its own
// group, so dragging a download row can never renumber attributes/episodes.
const reindex = (group, name, index) =>
name.replace(new RegExp(`aksrt_pay\\[${group}\\]\\[\\d+\\]`), `aksrt_pay[${group}][${index}]`);
name.replace(new RegExp(`jio_pay\\[${group}\\]\\[\\d+\\]`), `jio_pay[${group}][${index}]`);
['url', 'label', 'extract_code', 'copy_key', 'copy_val', 'icon', 'class'].forEach((field) => {
assert.equal(reindex('downloads', `aksrt_pay[downloads][0][${field}]`, 3), `aksrt_pay[downloads][3][${field}]`);
assert.equal(reindex('downloads', `jio_pay[downloads][0][${field}]`, 3), `jio_pay[downloads][3][${field}]`);
});
assert.equal(reindex('downloads', 'aksrt_pay[downloads][5][url]', 1), 'aksrt_pay[downloads][1][url]');
assert.equal(reindex('downloads', 'aksrt_pay[attributes][0][key]', 9), 'aksrt_pay[attributes][0][key]');
assert.equal(reindex('downloads', 'aksrt_pay[video_episode][1][title]', 9), 'aksrt_pay[video_episode][1][title]');
assert.equal(reindex('downloads', 'jio_pay[downloads][5][url]', 1), 'jio_pay[downloads][1][url]');
assert.equal(reindex('downloads', 'jio_pay[attributes][0][key]', 9), 'jio_pay[attributes][0][key]');
assert.equal(reindex('downloads', 'jio_pay[video_episode][1][title]', 9), 'jio_pay[video_episode][1][title]');
assert.match(setup, /'icon' => \['type' => 'string'\]/);
// The icon picker registers itself as depending on the caller's handle, so the
// pay-meta script must NOT declare the icon-picker handle back: that cycle makes
// WP_Dependencies recurse until memory is exhausted on every post editor load.
const picker = read('inc/helpers/aksrt-icon-picker.php');
assert.match(picker, /array_merge\(\['jquery', 'aksrt-svg-sprite'\], \$deps\)/);
assert.match(meta, /aksrt_icon_picker_assets\(\['aksrt-pay-meta-box'\]\)/);
const payScript = meta.match(/wp_enqueue_script\('aksrt-pay-meta-box',[^\n]*\)/)[0];
assert.doesNotMatch(payScript, /aksrt-icon-picker/);
const picker = read('inc/helpers/jio-icon-picker.php');
assert.match(picker, /array_merge\(\['jquery', 'jio-svg-sprite'\], \$deps\)/);
assert.match(meta, /jio_icon_picker_assets\(\['jio-pay-meta-box'\]\)/);
const payScript = meta.match(/wp_enqueue_script\('jio-pay-meta-box',[^\n]*\)/)[0];
assert.doesNotMatch(payScript, /jio-icon-picker/);
});
test('front submit paid-content prices and switch use the reference alignment rules', () => {
@@ -175,18 +175,18 @@ test('front submit image and visibility actions live in the TinyMCE toolbar', ()
const submit = read('assets/js/front-submit.js');
const editor = read('assets/js/front-submit-editor.js');
assert.match(main, /\$toolbar1\[\]\s*=\s*'aksrt_image'/);
assert.match(main, /\$toolbar1\[\]\s*=\s*'aksrt_hide'/);
assert.match(main, /\$toolbar1\[\]\s*=\s*'jio_image'/);
assert.match(main, /\$toolbar1\[\]\s*=\s*'jio_hide'/);
assert.match(main, /mce_external_plugins/);
assert.match(main, /aksrt_editor_tools/);
assert.match(editor, /PluginManager\.add\('aksrt_editor_tools'/);
assert.match(editor, /addButton\('aksrt_image'/);
assert.match(editor, /addButton\('aksrt_hide'/);
assert.match(main, /jio_editor_tools/);
assert.match(editor, /PluginManager\.add\('jio_editor_tools'/);
assert.match(editor, /addButton\('jio_image'/);
assert.match(editor, /addButton\('jio_hide'/);
assert.match(editor, /type:\s*'menubutton'/);
assert.match(editor, /data-editor-media-tab="upload"/);
assert.match(editor, /data-editor-media-tab="external"/);
assert.match(editor, /class="aksrt-editor-media__dialog" tabindex="-1"/);
assert.match(editor, /querySelector\('\.aksrt-editor-media__dialog'\)/);
assert.match(editor, /class="jio-editor-media__dialog" tabindex="-1"/);
assert.match(editor, /querySelector\('\.jio-editor-media__dialog'\)/);
assert.doesNotMatch(editor, /focusTarget\s*=\s*root\.querySelector\('\[data-editor-media-tab\]\.is-active'\)/);
assert.match(editor, /\(cfg\.uploads \|\| \{\}\)\.image/);
assert.match(page, /'canUploadImage'\s*=>\s*!empty\(\$ctx\['can_upload_img'\]\)/);
@@ -202,12 +202,12 @@ test('front submit exposes the complete reference media and formatting toolset',
const editorCss = read('assets/css/frontend/pages/submit-editor.css');
const submit = read('src/Core/FrontSubmit.php');
['aksrt_video', 'aksrt_file', 'aksrt_quote', 'aksrt_precode'].forEach((button) => {
['jio_video', 'jio_file', 'jio_quote', 'jio_precode'].forEach((button) => {
assert.match(main, new RegExp(`['"]${button}['"]`));
assert.match(editor, new RegExp(`addButton\\(['"]${button}['"]`));
});
assert.doesNotMatch(main, /array_merge\(\$toolbar1, \['blockquote'/);
assert.match(main, /\['aksrt_quote', 'aksrt_precode', 'fullscreen', 'wp_adv'\]/);
assert.match(main, /\['jio_quote', 'jio_precode', 'fullscreen', 'wp_adv'\]/);
assert.match(main, /toolbar2[\s\S]*forecolor/);
assert.match(main, /colorpicker,textcolor/);
@@ -256,13 +256,13 @@ test('article paid-content metabox follows the reference field set without shop
'pay_extra_hide',
];
assert.match(meta, /add_meta_box\('aksrt_pay_meta', __\('付费功能'/);
assert.match(meta, /add_meta_box\('jio_pay_meta', __\('付费功能'/);
fields.forEach((field) => assert.match(meta, new RegExp(field)));
// video_scale_height 是参考主题轮播组件 widget 的参数,不属于付费视频字段,
// 当初误搬到付费 metabox 上且从未被消费,已移除。
assert.doesNotMatch(meta, /video_scale_height/);
assert.doesNotMatch(meta, /aksrt_pay_(?:stock|purchase_limit|card_keys|free_preview|require_login|require_captcha)/);
assert.doesNotMatch(meta, /jio_pay_(?:stock|purchase_limit|card_keys|free_preview|require_login|require_captcha)/);
assert.doesNotMatch(meta, /电商增强|parse_json_array/);
});
@@ -279,5 +279,5 @@ test('ordinary article editor chain does not import shop or forum routes', () =>
const source = files.map(read).join('\n');
assert.doesNotMatch(source, /shop_product|forum_post|bbs_/i);
assert.doesNotMatch(source, /aksrtpay_s|featured_payload|vip_1_(?:price|points)|vip_2_(?:price|points)/);
assert.doesNotMatch(source, /jiopay_s|featured_payload|vip_1_(?:price|points)|vip_2_(?:price|points)/);
});