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

+36 -36
View File
@@ -1,8 +1,8 @@
/**
* Nav menu senior submenu visual editors (graphic cards / multi-column).
* Enhances WP Appearance → Menus fields for aksrt_menu_options JSON.
* Enhances WP Appearance → Menus fields for jio_menu_options JSON.
*
* @package AKSRT
* @package Jio
*/
(function ($) {
'use strict';
@@ -42,10 +42,10 @@
function field(name, label, value, type, withMedia) {
type = type || 'text';
var mediaBtn = withMedia
? ' <button type="button" class="button aksrt-sme-pick-img" data-for="' + name + '">选择图片</button>'
? ' <button type="button" class="button jio-sme-pick-img" data-for="' + name + '">选择图片</button>'
: '';
return (
'<label class="aksrt-sme-field"><span>' +
'<label class="jio-sme-field"><span>' +
label +
mediaBtn +
'</span><input type="' +
@@ -59,18 +59,18 @@
}
function renderGraphicUI($wrap, data) {
var html = '<div class="aksrt-sme-toolbar">';
html += '<button type="button" class="button aksrt-sme-add-card">添加卡片</button>';
var html = '<div class="jio-sme-toolbar">';
html += '<button type="button" class="button jio-sme-add-card">添加卡片</button>';
html += ' <label style="margin-left:8px;">排列 ';
html += '<select data-name="arrangement">';
html += '<option value=""' + (!data.arrangement ? ' selected' : '') + '>自动换行</option>';
html += '<option value="swiper"' + (data.arrangement === 'swiper' ? ' selected' : '') + '>单行滚动</option>';
html += '</select></label>';
html += '</div><div class="aksrt-sme-cards">';
html += '</div><div class="jio-sme-cards">';
(data.items || []).forEach(function (item, i) {
html += '<div class="aksrt-sme-card" data-index="' + i + '">';
html += '<div class="aksrt-sme-card-head"><strong>卡片 #' + (i + 1) + '</strong>';
html += ' <button type="button" class="button-link-delete aksrt-sme-del-card">删除</button></div>';
html += '<div class="jio-sme-card" data-index="' + i + '">';
html += '<div class="jio-sme-card-head"><strong>卡片 #' + (i + 1) + '</strong>';
html += ' <button type="button" class="button-link-delete jio-sme-del-card">删除</button></div>';
html += field('img', '图片 URL', item.img || '', 'text', true);
html += field('title', '标题', item.title || '');
html += field('badge', '徽章', item.badge || '');
@@ -85,25 +85,25 @@
}
function renderMultiUI($wrap, data) {
var html = '<div class="aksrt-sme-toolbar">';
html += '<button type="button" class="button aksrt-sme-add-col">添加栏目</button>';
html += '</div><div class="aksrt-sme-cols">';
var html = '<div class="jio-sme-toolbar">';
html += '<button type="button" class="button jio-sme-add-col">添加栏目</button>';
html += '</div><div class="jio-sme-cols">';
(data.columns || []).forEach(function (col, i) {
html += '<div class="aksrt-sme-col" data-index="' + i + '">';
html += '<div class="aksrt-sme-card-head"><strong>栏目 #' + (i + 1) + '</strong>';
html += ' <button type="button" class="button-link-delete aksrt-sme-del-col">删除栏目</button></div>';
html += '<div class="jio-sme-col" data-index="' + i + '">';
html += '<div class="jio-sme-card-head"><strong>栏目 #' + (i + 1) + '</strong>';
html += ' <button type="button" class="button-link-delete jio-sme-del-col">删除栏目</button></div>';
html += field('title', '栏目标题', col.title || '');
html += field('icon', '图标 class', col.icon || '');
html += field('link.url', '栏目链接', (col.link && col.link.url) || '');
html += '<div class="aksrt-sme-items">';
html += '<div class="jio-sme-items">';
(col.items || []).forEach(function (item, j) {
html += '<div class="aksrt-sme-item" data-j="' + j + '">';
html += '<div class="jio-sme-item" data-j="' + j + '">';
html += field('items.' + j + '.title', '链接标题', item.title || '');
html += field('items.' + j + '.link.url', '链接 URL', (item.link && item.link.url) || '');
html += field('items.' + j + '.icon', '图标', item.icon || '');
html += '</div>';
});
html += '<button type="button" class="button aksrt-sme-add-item">添加链接</button>';
html += '<button type="button" class="button jio-sme-add-item">添加链接</button>';
html += '</div></div>';
});
html += '</div>';
@@ -116,7 +116,7 @@
data.size = $wrap.find('[data-name="size"]').val() || 'md';
data.img_scale = parseInt($wrap.find('[data-name="img_scale"]').val(), 10) || 100;
data.items = [];
$wrap.find('.aksrt-sme-card').each(function () {
$wrap.find('.jio-sme-card').each(function () {
var $c = $(this);
data.items.push({
img: $c.find('[data-name="img"]').val() || '',
@@ -131,7 +131,7 @@
function readMulti($wrap) {
var data = { columns: [] };
$wrap.find('.aksrt-sme-col').each(function () {
$wrap.find('.jio-sme-col').each(function () {
var $col = $(this);
var col = {
title: $col.find('[data-name="title"]').first().val() || '',
@@ -140,7 +140,7 @@
link: { url: $col.find('[data-name="link.url"]').first().val() || '', text: '', target: '' },
items: [],
};
$col.find('.aksrt-sme-item').each(function () {
$col.find('.jio-sme-item').each(function () {
var $it = $(this);
col.items.push({
title: $it.find('input[data-name$=".title"]').val() || '',
@@ -155,15 +155,15 @@
}
function enhanceItem($item) {
if ($item.data('aksrtSme')) return;
$item.data('aksrtSme', 1);
if ($item.data('jioSme')) return;
$item.data('jioSme', 1);
var $graphicTa = $item.find('textarea[name*="[graphic_card_opts_json]"]');
var $multiTa = $item.find('textarea[name*="[multi_column_links_opts_json]"]');
var $type = $item.find('select[name*="[submenu_type]"]');
if (!$graphicTa.length && !$multiTa.length) return;
var $ui = $('<div class="aksrt-sme-ui" style="margin:8px 0;padding:10px;border:1px solid #dcdcde;background:#fff;border-radius:4px;"></div>');
var $ui = $('<div class="jio-sme-ui" style="margin:8px 0;padding:10px;border:1px solid #dcdcde;background:#fff;border-radius:4px;"></div>');
$graphicTa.closest('p').before($ui);
function sync() {
@@ -188,17 +188,17 @@
}
$type.on('change', sync);
$ui.on('click', '.aksrt-sme-add-card', function (e) {
$ui.on('click', '.jio-sme-add-card', function (e) {
e.preventDefault();
var g = readGraphic($ui);
g.items.push({ img: '', title: '', badge: '', badge_class: 'jb-red', link: { url: '', text: '', target: '' } });
renderGraphicUI($ui, g);
});
$ui.on('click', '.aksrt-sme-del-card', function (e) {
$ui.on('click', '.jio-sme-del-card', function (e) {
e.preventDefault();
$(this).closest('.aksrt-sme-card').remove();
$(this).closest('.jio-sme-card').remove();
});
$ui.on('click', '.aksrt-sme-add-col', function (e) {
$ui.on('click', '.jio-sme-add-col', function (e) {
e.preventDefault();
var m = readMulti($ui);
m.columns.push({
@@ -210,13 +210,13 @@
});
renderMultiUI($ui, m);
});
$ui.on('click', '.aksrt-sme-del-col', function (e) {
$ui.on('click', '.jio-sme-del-col', function (e) {
e.preventDefault();
$(this).closest('.aksrt-sme-col').remove();
$(this).closest('.jio-sme-col').remove();
});
$ui.on('click', '.aksrt-sme-add-item', function (e) {
$ui.on('click', '.jio-sme-add-item', function (e) {
e.preventDefault();
var $col = $(this).closest('.aksrt-sme-col');
var $col = $(this).closest('.jio-sme-col');
var m = readMulti($ui);
var idx = $col.index();
if (m.columns[idx]) {
@@ -226,7 +226,7 @@
});
// Before save, write UI → textarea
$('#update-nav-menu').on('submit.aksrtSme', function () {
$('#update-nav-menu').on('submit.jioSme', function () {
var type = $type.val();
if (type === 'graphic_card') {
$graphicTa.val(JSON.stringify(readGraphic($ui), null, 2));
@@ -247,11 +247,11 @@
}
$(document).on('click', '.aksrt-sme-pick-img', function (e) {
$(document).on('click', '.jio-sme-pick-img', function (e) {
e.preventDefault();
var $btn = $(this);
var name = $btn.data('for');
var $input = $btn.closest('.aksrt-sme-field').find('input[data-name="' + name + '"]');
var $input = $btn.closest('.jio-sme-field').find('input[data-name="' + name + '"]');
if (typeof wp === 'undefined' || !wp.media) {
window.alert('媒体库不可用');
return;