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

@@ -13,7 +13,7 @@
* 3) 插入表情(comment_smilie)、评论地理位置(comment_city_s/comment_city_type,
* 由扩展&增强/IP归属地实现)不在本页;
* 4) 快捷回复按评论区硬切换契约保持移除(comment_quick_* 不存在);
* 5) 旧 AKSRT 私有字段(comment_order / comment_per_page / comment_pagination_type /
* 5) 旧 Jio 私有字段(comment_order / comment_per_page / comment_pagination_type /
* comment_nested_depth / comment_avatar_size / comment_close_comments /
* comment_edit_window / comment_hot_threshold / comment_empty_text /
* post_close_comments)已彻底移除,无双路兼容;
@@ -29,7 +29,7 @@ const root = path.resolve(__dirname, '..', '..');
const php = fs.readFileSync(path.join(root, 'src/Admin/Schema/SchemaPostList.php'), 'utf8');
const js = fs.readFileSync(path.join(root, 'assets/admin/src/schema/sections/post-list/comment.js'), 'utf8');
const runtime = fs.readFileSync(path.join(root, 'src/Settings/PostDisplay.php'), 'utf8');
const commentsHelper = fs.readFileSync(path.join(root, 'inc/helpers/aksrt-comments.php'), 'utf8');
const commentsHelper = fs.readFileSync(path.join(root, 'inc/helpers/jio-comments.php'), 'utf8');
const geoHelper = fs.readFileSync(path.join(root, 'inc/helpers/comments/geo.php'), 'utf8');
const actionsHelper = fs.readFileSync(path.join(root, 'inc/helpers/comments/actions.php'), 'utf8');
@@ -62,7 +62,7 @@ const EXCLUDED_KEYS = [
'comment_quick_often',
];
// 旧 AKSRT 私有字段(含已并入 WP 讨论设置与死字段 post_close_comments)。
// 旧 Jio 私有字段(含已并入 WP 讨论设置与死字段 post_close_comments)。
const LEGACY_KEYS = [
'comment_order',
'comment_per_page',
@@ -204,7 +204,7 @@ test('旧字段在 schema 与运行时中均已移除(无双路)', () => {
assert.ok(!php.includes(legacy), `PHP schema 残留旧字段: ${legacy}`);
// 运行时按主题设置读取的形态 $settings['<legacy>'] 必须消失
// (comment_order 允许以 WP 讨论选项 get_option('comment_order') 形态存在)。
for (const source of [['PostDisplay', runtime], ['aksrt-comments.php', commentsHelper], ['comments/geo.php', geoHelper], ['comments/actions.php', actionsHelper]]) {
for (const source of [['PostDisplay', runtime], ['jio-comments.php', commentsHelper], ['comments/geo.php', geoHelper], ['comments/actions.php', actionsHelper]]) {
assert.ok(!source[1].includes(`$settings['${legacy}']`), `${source[0]} 残留旧字段读取: ${legacy}`);
}
}
@@ -217,8 +217,8 @@ test('旧字段在 schema 与运行时中均已移除(无双路)', () => {
// 排序回退到 WP 讨论设置(参考主题行为)。
assert.match(runtime, /get_option\('comment_order', 'desc'\)/);
// 评论区位置显示交由扩展 IP 归属地控制。
assert.match(geoHelper, /aksrt_ip_geo_display_enabled\('comment'\)/);
assert.match(geoHelper, /aksrt_ip_geo_format_key/);
assert.match(geoHelper, /jio_ip_geo_display_enabled\('comment'\)/);
assert.match(geoHelper, /jio_ip_geo_format_key/);
// 编辑权限使用 user_edit 总开关。
assert.match(actionsHelper, /\$display\['user_edit'\]/);
});