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:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* 硬约束:
|
||||
* 1) 「我的服务 / 功能设置」两个网格使用参考主题的 icon-but-box / user-icon-but-box
|
||||
* 外壳,图标全部来自主题内置 SVG sprite(aksrt_icon_markup('zibsvg-*')),
|
||||
* 外壳,图标全部来自主题内置 SVG sprite(jio_icon_markup('zibsvg-*')),
|
||||
* 不再出现 Font Awesome 字形。
|
||||
* 2) 侧栏其余部件(余额/积分卡、创作/推广卡、VIP 入口、抽屉触发器)同样只使用
|
||||
* sprite 图标,箭头统一为 zibsvg-right,保证侧栏只剩一种图标族。
|
||||
@@ -34,7 +34,7 @@ test('服务/设置网格使用参考主题 icon-but-box 外壳与 sprite 图标
|
||||
assert.match(nav, /class="flex ac hh text-center icon-but-box user-icon-but-box"/);
|
||||
assert.match(nav, /<div class="em16"><\?php echo \$icon_html;/);
|
||||
assert.match(nav, /<div class="px12 muted-color mt3">/);
|
||||
assert.match(nav, /aksrt_icon_markup\('zibsvg-' \. \(string\) \$item\['icon'\]\)/);
|
||||
assert.match(nav, /jio_icon_markup\('zibsvg-' \. \(string\) \$item\['icon'\]\)/);
|
||||
|
||||
// 参考主题选型:我的服务 = trend-color / user-auth / order-color。
|
||||
assert.match(nav, /'icon'\s+=>\s+'trend-color'/);
|
||||
@@ -50,7 +50,7 @@ test('服务/设置网格使用参考主题 icon-but-box 外壳与 sprite 图标
|
||||
assert.match(nav, new RegExp(`'tab'\\s+=>\\s+'${tab}'`), `missing tab key: ${tab}`);
|
||||
}
|
||||
|
||||
// AKSRT 的跳转契约保留 <a href> + data-tab,不搬参考主题的 <item data-onclick>。
|
||||
// Jio 的跳转契约保留 <a href> + data-tab,不搬参考主题的 <item data-onclick>。
|
||||
assert.match(nav, /<a class="<\?php echo esc_attr\(\$item_class\);/);
|
||||
assert.match(nav, /data-tab="<\?php echo esc_attr\(\$tab\); \?>/);
|
||||
assert.doesNotMatch(nav, /data-onclick/);
|
||||
@@ -68,13 +68,13 @@ test('侧栏部件(VIP 与创作/推广卡除外)不再出现 Font Awesome
|
||||
|
||||
test('其余侧栏部件按参考主题选型替换为 sprite 图标', () => {
|
||||
const commerce = read(sidebarDir + 'sidebar-commerce.php');
|
||||
assert.match(commerce, /aksrt_icon_markup\('zibsvg-money-color-2'\)/);
|
||||
assert.match(commerce, /aksrt_icon_markup\('zibsvg-points-color'\)/);
|
||||
assert.match(commerce, /aksrt_icon_markup\('zibsvg-right'\)/);
|
||||
assert.match(commerce, /jio_icon_markup\('zibsvg-money-color-2'\)/);
|
||||
assert.match(commerce, /jio_icon_markup\('zibsvg-points-color'\)/);
|
||||
assert.match(commerce, /jio_icon_markup\('zibsvg-right'\)/);
|
||||
|
||||
const creator = read(sidebarDir + 'sidebar-creator.php');
|
||||
assert.match(creator, /aksrt_icon_markup\('zibsvg-merchant-color', 'mr6'\)/);
|
||||
assert.match(creator, /aksrt_icon_markup\('zibsvg-money-color', 'mr6'\)/);
|
||||
assert.match(creator, /jio_icon_markup\('zibsvg-merchant-color', 'mr6'\)/);
|
||||
assert.match(creator, /jio_icon_markup\('zibsvg-money-color', 'mr6'\)/);
|
||||
assert.match(creator, /class="mb10-sm zib-widget padding-10 flex1 pointer"/);
|
||||
assert.match(creator, /flex ab jsb col-ml6/);
|
||||
assert.match(creator, /<i class="ml6 fa fas fa-angle-right em12"/);
|
||||
@@ -82,7 +82,7 @@ test('其余侧栏部件按参考主题选型替换为 sprite 图标', () => {
|
||||
assert.match(creator, /'推广中心'/);
|
||||
assert.match(creator, /'现金收益'/);
|
||||
// 收益单位名跟随自定义货币名称,不再硬编码「积分收益」。
|
||||
assert.match(creator, /sprintf\(__\('%s收益', 'aksrt'\), \$currency_name\)/);
|
||||
assert.match(creator, /sprintf\(__\('%s收益', 'jio'\), \$currency_name\)/);
|
||||
for (const label of ['比例', '待提现', '累计佣金']) {
|
||||
assert.ok(creator.includes(`'${label}'`), `creator card missing label: ${label}`);
|
||||
}
|
||||
@@ -93,8 +93,8 @@ test('其余侧栏部件按参考主题选型替换为 sprite 图标', () => {
|
||||
assert.doesNotMatch(creator, /data-onclick/);
|
||||
|
||||
const vip = read(sidebarDir + 'sidebar-vip.php');
|
||||
assert.match(vip, /aksrt_icon_markup\('zibsvg-vip_1', 'em12 mr6'\)/);
|
||||
assert.match(vip, /aksrt_icon_markup\('zibsvg-time', 'mr3'\)/);
|
||||
assert.match(vip, /jio_icon_markup\('zibsvg-vip_1', 'em12 mr6'\)/);
|
||||
assert.match(vip, /jio_icon_markup\('zibsvg-time', 'mr3'\)/);
|
||||
assert.match(vip, /mb20 mb10-sm main-radius payvip-icon btn-block badg pointer/);
|
||||
assert.match(vip, /style="padding: 14px 10px;"/);
|
||||
assert.match(vip, /fa-chevron-circle-right abs-right/);
|
||||
@@ -103,7 +103,7 @@ test('其余侧栏部件按参考主题选型替换为 sprite 图标', () => {
|
||||
assert.doesNotMatch(vip, /data-onclick/);
|
||||
|
||||
const profile = read(sidebarDir + 'profile-sidebar.php');
|
||||
assert.match(profile, /aksrt_icon_markup\('zibsvg-menu'\)/);
|
||||
assert.match(profile, /jio_icon_markup\('zibsvg-menu'\)/);
|
||||
});
|
||||
|
||||
test('旧 uc-service-grid 外壳与色调底色已彻底移除', () => {
|
||||
@@ -145,7 +145,7 @@ test('旧 uc-service-grid 外壳与色调底色已彻底移除', () => {
|
||||
const stats = read(sidebarDir + 'sidebar-stats.php');
|
||||
assert.match(stats, /mb10-sm mb20 flex ac jsa zib-widget padding-10 text-center/);
|
||||
assert.match(stats, /<a class="user-statistics-item"/);
|
||||
assert.match(stats, /<div class="em14"><\?php echo esc_html\(aksrt_cut_count\(/);
|
||||
assert.match(stats, /<div class="em14"><\?php echo esc_html\(jio_cut_count\(/);
|
||||
assert.match(stats, /<div class="em09 opacity5 mt6">/);
|
||||
assert.doesNotMatch(stats, /uc-stats|uc-sidebar__section/);
|
||||
assert.doesNotMatch(shell, /\.uc-stats/);
|
||||
@@ -160,18 +160,18 @@ test('所用 sprite key 均在前端 sprite 中定义', () => {
|
||||
'money-color-2', 'points-color', 'merchant-color', 'money-color', 'vip_1', 'time', 'menu', 'right', 'comment-color',
|
||||
];
|
||||
for (const key of keys) {
|
||||
assert.match(sprite, new RegExp(`aksrt_svgs\\['${key}'\\]\\s*=`), `sprite key missing: ${key}`);
|
||||
assert.match(sprite, new RegExp(`jio_svgs\\['${key}'\\]\\s*=`), `sprite key missing: ${key}`);
|
||||
}
|
||||
});
|
||||
|
||||
test('导航栏用户浮层的余额/积分磁贴与侧栏使用同一组 sprite key', () => {
|
||||
const nav = read(sidebarDir + 'sidebar-commerce.php');
|
||||
const wallet = read('inc/helpers/aksrt-header-userbox.php');
|
||||
const wallet = read('inc/helpers/jio-header-userbox.php');
|
||||
|
||||
assert.match(wallet, /aksrt_icon_markup\('zibsvg-money-color-2', 'em14'\)/);
|
||||
assert.match(wallet, /aksrt_icon_markup\('zibsvg-points-color', 'em14'\)/);
|
||||
assert.match(nav, /aksrt_icon_markup\('zibsvg-money-color-2'\)/);
|
||||
assert.match(nav, /aksrt_icon_markup\('zibsvg-points-color'\)/);
|
||||
assert.match(wallet, /jio_icon_markup\('zibsvg-money-color-2', 'em14'\)/);
|
||||
assert.match(wallet, /jio_icon_markup\('zibsvg-points-color', 'em14'\)/);
|
||||
assert.match(nav, /jio_icon_markup\('zibsvg-money-color-2'\)/);
|
||||
assert.match(nav, /jio_icon_markup\('zibsvg-points-color'\)/);
|
||||
|
||||
// 磁贴箭头沿用参考主题的 fa-angle-right,不做多余替换。
|
||||
assert.match(wallet, /fa fas fa-angle-right em12/);
|
||||
|
||||
Reference in new issue
Block a user