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
@@ -34,7 +34,7 @@ test('the global avatar shape primitive renders every avatar image circular', ()
|
||||
assert.match(block, /object-fit:\s*cover/);
|
||||
|
||||
// The primitive must follow the existing avatar size system in the same file.
|
||||
const sizeSystem = css.indexOf('.aksrt-avatar--xs {');
|
||||
const sizeSystem = css.indexOf('.jio-avatar--xs {');
|
||||
assert.ok(sizeSystem >= 0 && sizeSystem < start, 'primitive must sit after the avatar size system');
|
||||
});
|
||||
|
||||
@@ -49,8 +49,8 @@ test('the user center and public user home keep their legacy rounded-square avat
|
||||
// img and the upload overlay both inherit the frame radius.
|
||||
assert.match(profile, /\.uc-header__avatar img\s*\{[^}]*border-radius:\s*inherit/s);
|
||||
|
||||
assert.match(userHome, /\.aksrt-author-hero__avatar img\s*\{[^}]*border-radius:\s*var\(--radius\)/s);
|
||||
assert.doesNotMatch(userHome, /\.aksrt-author-hero__avatar img\s*\{[^}]*--radius-avatar/s);
|
||||
assert.match(userHome, /\.jio-author-hero__avatar img\s*\{[^}]*border-radius:\s*var\(--radius\)/s);
|
||||
assert.doesNotMatch(userHome, /\.jio-author-hero__avatar img\s*\{[^}]*--radius-avatar/s);
|
||||
});
|
||||
|
||||
test('every other frontend avatar frame is circular', () => {
|
||||
@@ -79,18 +79,18 @@ test('the VIP modal avatar carries the canonical avatar class', () => {
|
||||
|
||||
test('the VIP icon leaves the avatar corner and leads the badge row', () => {
|
||||
const userRenderer = read('src/WidgetSystem/Renderers/UserRenderer.php');
|
||||
const singleRender = read('inc/helpers/aksrt-single-render.php');
|
||||
const singleRender = read('inc/helpers/jio-single-render.php');
|
||||
const signin = read('src/Credits/Signin.php');
|
||||
|
||||
for (const [file, source] of [['UserRenderer.php', userRenderer], ['aksrt-single-render.php', singleRender]]) {
|
||||
assert.match(source, /aksrt_get_avatar_box\([^)]*'avatar-img avatar-lg',\s*true,\s*false\)/, `${file} must drop the avatar corner badge`);
|
||||
for (const [file, source] of [['UserRenderer.php', userRenderer], ['jio-single-render.php', singleRender]]) {
|
||||
assert.match(source, /jio_get_avatar_box\([^)]*'avatar-img avatar-lg',\s*true,\s*false\)/, `${file} must drop the avatar corner badge`);
|
||||
assert.match(source, /'vip'\s+=>\s+true/, `${file} must render the VIP icon in the name row`);
|
||||
assert.doesNotMatch(source, /'vip'\s+=>\s+false/);
|
||||
}
|
||||
|
||||
assert.match(signin, /aksrt_get_avatar_box\(\$user_id,\s*'avatar-img avatar-mini mr6',\s*false,\s*false\)/);
|
||||
assert.match(signin, /aksrt_get_user_ban_name_badge\(\$user_id\)/);
|
||||
assert.match(signin, /aksrt_get_vip_icon\(\$user_id\)/);
|
||||
assert.match(signin, /jio_get_avatar_box\(\$user_id,\s*'avatar-img avatar-mini mr6',\s*false,\s*false\)/);
|
||||
assert.match(signin, /jio_get_user_ban_name_badge\(\$user_id\)/);
|
||||
assert.match(signin, /jio_get_vip_icon\(\$user_id\)/);
|
||||
assert.match(signin, /\$avatar_img \. esc_html\(\$user->display_name\) \. \$name_badge/);
|
||||
});
|
||||
|
||||
@@ -104,19 +104,19 @@ test('no frontend call site opts into the avatar corner VIP badge', () => {
|
||||
if (entry.isDirectory()) { walk(full); continue; }
|
||||
if (!/\.(php|js)$/.test(entry.name) || entry.name.endsWith('.min.js')) continue;
|
||||
const source = fs.readFileSync(full, 'utf8');
|
||||
const pattern = /aksrt_get_avatar_box\([^;]*?,\s*(?:true|false),\s*true\s*\)/g;
|
||||
const pattern = /jio_get_avatar_box\([^;]*?,\s*(?:true|false),\s*true\s*\)/g;
|
||||
for (const match of source.matchAll(pattern)) {
|
||||
offenders.push(`${path.relative(root, full).split(path.sep).join('/')}: ${match[0]}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
walk(root);
|
||||
assert.deepEqual(offenders, [], 'aksrt_get_avatar_box() must no longer mount a badge on the avatar');
|
||||
assert.deepEqual(offenders, [], 'jio_get_avatar_box() must no longer mount a badge on the avatar');
|
||||
});
|
||||
|
||||
test('the avatar helper keeps its corner badge contract for callers that still want it', () => {
|
||||
const avatar = read('inc/helpers/aksrt-avatar.php');
|
||||
assert.match(avatar, /function aksrt_get_avatar_box\(\$id_or_email, string \$class = 'avatar-img', bool \$link = true, bool \$vip = true\)/);
|
||||
const avatar = read('inc/helpers/jio-avatar.php');
|
||||
assert.match(avatar, /function jio_get_avatar_box\(\$id_or_email, string \$class = 'avatar-img', bool \$link = true, bool \$vip = true\)/);
|
||||
assert.match(avatar, /class="avatar-badge"/);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user