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 -17
View File
@@ -9,7 +9,7 @@ const root = path.resolve(__dirname, '..', '..');
const read = (file) => fs.readFileSync(path.join(root, file), 'utf8');
test('icon card renderers keep vertical and horizontal legacy DOM contracts separate', () => {
const helper = read('inc/helpers/aksrt-icon-cards.php');
const helper = read('inc/helpers/jio-icon-cards.php');
const widgets = read('src/WidgetSystem/Renderers/GeneralRenderer.php');
const header = read('inc/helpers/homepage/header-components.php');
const mediaBrand = read('inc/helpers/template-tags/media-brand.php');
@@ -18,13 +18,13 @@ test('icon card renderers keep vertical and horizontal legacy DOM contracts sepa
assert.match(helper, /<div class="icon-cover-card flex ac /);
assert.match(helper, /icon-cover-icon badg cir/);
assert.match(helper, /icon-cover-desc ml10 flex1 px12-sm/);
assert.doesNotMatch(helper, /aksrt-icon-cover-card/);
assert.doesNotMatch(helper, /jio-icon-cover-card/);
assert.match(widgets, /'customize_icon' => \$card\['customize_icon'\] \?\? ''/);
assert.doesNotMatch(widgets, /\$card\['custom_icon'\]/);
// combo_info legitimately renders icon_image cards; icon cards must not leak media-card fields.
assert.doesNotMatch(widgets, /\$card\['description'\]/);
assert.match(header, /empty\(\$card\['custom_icon'\]\)/);
assert.doesNotMatch(mediaBrand, /function aksrt_render_icon_cover_card/);
assert.doesNotMatch(mediaBrand, /function jio_render_icon_cover_card/);
});
test('homepage horizontal cards render fully from legacy CSS with no dedicated stylesheet', () => {
@@ -35,7 +35,7 @@ test('homepage horizontal cards render fully from legacy CSS with no dedicated s
const scripts = read('src/Core/ScriptsPart1b.php');
assert.equal(fs.existsSync(path.join(root, 'assets/css/frontend/header-cards.css')), false);
assert.doesNotMatch(baseCss, /\.icon-cover-card\.aksrt-icon-cover-card/);
assert.doesNotMatch(baseCss, /\.icon-cover-card\.jio-icon-cover-card/);
assert.doesNotMatch(baseCss, /\.header-components-card/);
assert.doesNotMatch(baseCss, /\.header-slider-card\s+\.icon-cover-card\s*\{[^}]*font-size:/s);
assert.doesNotMatch(legacyUtilities, /\.px12-sm\s*\{[^}]*font-size:\s*12px/);
@@ -45,7 +45,7 @@ test('homepage horizontal cards render fully from legacy CSS with no dedicated s
assert.match(mainCss.slice(mobileBreakpoint, mobileTextSize + 120), /max-width:\s*640px/);
assert.match(mainCss.slice(mobileTextSize, mobileTextSize + 120), /font-size:\s*12px/);
assert.doesNotMatch(scripts, /header-cards/);
assert.doesNotMatch(widgetCss, /aksrt-widget-icon-cards \.icon-cover-card/);
assert.doesNotMatch(widgetCss, /jio-widget-icon-cards \.icon-cover-card/);
});
test('widget icon cards restore the reference surface height without compact overrides', () => {
@@ -78,22 +78,22 @@ test('header icon-card defaults use bundled Font Awesome icons', () => {
});
test('icon card renderers route every picker format through the shared icon renderer', () => {
const helper = read('inc/helpers/aksrt-icon-cards.php');
const helper = read('inc/helpers/jio-icon-cards.php');
// One resolver owns the icon-value contract for both card shapes.
assert.match(helper, /function aksrt_card_icon_inner\(string \$value, string \$extra = ''\): string/);
assert.match(helper, /if \(function_exists\('aksrt_icon_markup'\)\) \{\s*return aksrt_icon_markup\(\$value, \$extra\);/s);
assert.match(helper, /function jio_card_icon_inner\(string \$value, string \$extra = ''\): string/);
assert.match(helper, /if \(function_exists\('jio_icon_markup'\)\) \{\s*return jio_icon_markup\(\$value, \$extra\);/s);
// Both renderers must delegate: emitting a bare FA class string produced
// `<i class="fa fas fa-zibsvg-hot">`, i.e. an invisible glyph, for the two
// SVG formats the admin picker can store.
assert.match(helper, /\$icon_inner = aksrt_card_icon_inner\(\$icon_fa, 'em09'\);/);
assert.match(helper, /\$icon_inner = aksrt_card_icon_inner\(\$icon_fa\);/);
assert.match(helper, /\$icon_inner = jio_card_icon_inner\(\$icon_fa, 'em09'\);/);
assert.match(helper, /\$icon_inner = jio_card_icon_inner\(\$icon_fa\);/);
// The picker prefixes must drive the SVG branches, and the stale
// `aksrtsvg-` prefix (never emitted by any picker) must be gone.
// `jiosvg-` prefix (never emitted by any picker) must be gone.
assert.match(helper, /str_starts_with\(\$value, 'zibsvg-'\) \|\| str_starts_with\(\$value, 'customsvg-'\)/);
assert.doesNotMatch(helper, /aksrtsvg-/);
assert.doesNotMatch(helper, /jiosvg-/);
assert.doesNotMatch(helper, /'fa fas fa-'\s*\.\s*\$icon_fa/);
assert.doesNotMatch(helper, /<i class="'\s*\.\s*esc_attr\(\$icon_fa\)\s*\.\s*' em09"/);
});
@@ -104,14 +104,14 @@ test('custom SVG payloads survive the admin save path for nested icon sub-fields
// header_slider_card_option.cards[].icon is a group sub-field: plain
// sanitize_text_field stripped "customsvg-<svg>" down to a bare prefix.
assert.match(provider, /if \(\$type === 'icon'\) \{\s*return function_exists\('aksrt_sanitize_icon_value'\)/s);
assert.match(metaBox, /'icon'\s*=>\s*function_exists\('aksrt_sanitize_icon_value'\)/);
assert.match(provider, /if \(\$type === 'icon'\) \{\s*return function_exists\('jio_sanitize_icon_value'\)/s);
assert.match(metaBox, /'icon'\s*=>\s*function_exists\('jio_sanitize_icon_value'\)/);
assert.doesNotMatch(metaBox, /'icon'\s*=>\s*sanitize_text_field\(\(string\) \(\$card\['icon'\]/);
});
test('inline custom SVG shapes survive the kses allow list', () => {
const icons = read('inc/helpers/aksrt-icons.php');
const start = icons.indexOf('function aksrt_svg_kses_tags');
const icons = read('inc/helpers/jio-icons.php');
const start = icons.indexOf('function jio_svg_kses_tags');
const ksesBody = icons.slice(start, icons.indexOf('endif;', start));
// Any element the picker's cleanSvg() lets through must also be accepted
@@ -126,7 +126,7 @@ test('inline custom SVG shapes survive the kses allow list', () => {
}
for (const tag of ['circle', 'ellipse', 'rect', 'polygon', 'line', 'path', 'g', 'use']) {
assert.match(ksesBody, new RegExp(`'${tag}'\\s*=>`), `aksrt_svg_kses_tags() is missing <${tag}>`);
assert.match(ksesBody, new RegExp(`'${tag}'\\s*=>`), `jio_svg_kses_tags() is missing <${tag}>`);
}
assert.match(ksesBody, /'viewbox'/);
assert.match(ksesBody, /'xlink:href'/);