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
@@ -12,18 +12,18 @@ test('message center exposes only the four configured-alias parameter-free route
|
||||
const urls = read('inc/modules/user-parts/urls.php');
|
||||
const registry = read('inc/modules/user-parts/template-registry.php');
|
||||
|
||||
assert.match(urls, /function aksrt_get_messages_rewrite_slug[\s\S]*?Settings::notification_settings\(\)[\s\S]*?\['slug'\]/);
|
||||
assert.match(routing, /\$message_slug = preg_quote\(aksrt_get_messages_rewrite_slug\(\), '#'\)/);
|
||||
assert.match(routing, /add_rewrite_rule\('\^' \. \$message_slug \. '\/\?\$',[\s\S]*?aksrt_message_view=unread/);
|
||||
assert.match(urls, /function jio_get_messages_rewrite_slug[\s\S]*?Settings::notification_settings\(\)[\s\S]*?\['slug'\]/);
|
||||
assert.match(routing, /\$message_slug = preg_quote\(jio_get_messages_rewrite_slug\(\), '#'\)/);
|
||||
assert.match(routing, /add_rewrite_rule\('\^' \. \$message_slug \. '\/\?\$',[\s\S]*?jio_message_view=unread/);
|
||||
assert.match(routing, /add_rewrite_rule\('\^' \. \$message_slug \. '\/\(posts\|like\|system\)\/\?\$'/);
|
||||
assert.match(routing, /message-routing:' \. aksrt_get_messages_rewrite_slug\(\)/);
|
||||
assert.match(routing, /message-routing:' \. jio_get_messages_rewrite_slug\(\)/);
|
||||
assert.doesNotMatch(routing, /add_rewrite_rule\('\^message/);
|
||||
assert.doesNotMatch(routing, /message\/\(\[0-9]|aksrt_message_id/);
|
||||
assert.doesNotMatch(routing, /message\/\(\[0-9]|jio_message_id/);
|
||||
const messageUrlFunction = urls.slice(
|
||||
urls.indexOf('function aksrt_get_messages_page_url'),
|
||||
urls.indexOf('endif;', urls.indexOf('function aksrt_get_messages_page_url')),
|
||||
urls.indexOf('function jio_get_messages_page_url'),
|
||||
urls.indexOf('endif;', urls.indexOf('function jio_get_messages_page_url')),
|
||||
);
|
||||
assert.match(messageUrlFunction, /aksrt_get_messages_rewrite_slug\(\)/);
|
||||
assert.match(messageUrlFunction, /jio_get_messages_rewrite_slug\(\)/);
|
||||
assert.doesNotMatch(messageUrlFunction, /add_query_arg|\/messages\/|\/message\//);
|
||||
assert.doesNotMatch(registry, /'messages'\s*=>/);
|
||||
assert.match(registry, /page-messages\.php'\)\s*\{[\s\S]*?return ''/);
|
||||
@@ -77,7 +77,7 @@ test('message centre shows a skeleton during the AJAX load-more cycle', () => {
|
||||
|
||||
// The skeleton ships inside .messages-list so the loader is anchored to the
|
||||
// end of the list, mirroring the reference post_ajax beforeSend hook.
|
||||
assert.match(list, /aksrt_get_message_placeholder\(4\)/);
|
||||
assert.match(list, /jio_get_message_placeholder\(4\)/);
|
||||
assert.match(placeholder, /message-item--placeholder/);
|
||||
assert.match(placeholder, /class="post_ajax_loader"/);
|
||||
// The message skeleton reuses the shared .placeholder shimmer contract.
|
||||
@@ -113,8 +113,8 @@ test('tabs, pagination, actions, and detail all replace DOM fragments', () => {
|
||||
for (const label of ['未读消息', '文章评论', '点赞喜欢', '系统通知']) {
|
||||
assert.ok(center.includes(label));
|
||||
}
|
||||
assert.match(center, /wp_ajax_aksrt_load_message_center/);
|
||||
assert.match(center, /aksrt_render_message_center_detail/);
|
||||
assert.match(center, /wp_ajax_jio_load_message_center/);
|
||||
assert.match(center, /jio_render_message_center_detail/);
|
||||
assert.match(template, /data-message-content/);
|
||||
assert.match(script, /nav\.innerHTML = result\.data\.nav/);
|
||||
assert.match(script, /content\.innerHTML = result\.data\.content/);
|
||||
@@ -126,11 +126,11 @@ test('tabs, pagination, actions, and detail all replace DOM fragments', () => {
|
||||
|
||||
test('message detail exposes neither internal type labels nor a related-content link', () => {
|
||||
const center = read('inc/modules/message-center.php');
|
||||
const detailStart = center.indexOf('function aksrt_render_message_center_detail');
|
||||
const detailEnd = center.indexOf("add_action('wp_ajax_aksrt_load_message_center'", detailStart);
|
||||
const detailStart = center.indexOf('function jio_render_message_center_detail');
|
||||
const detailEnd = center.indexOf("add_action('wp_ajax_jio_load_message_center'", detailStart);
|
||||
const detail = center.slice(detailStart, detailEnd);
|
||||
|
||||
assert.doesNotMatch(detail, /aksrt_notification_type_label/);
|
||||
assert.doesNotMatch(detail, /jio_notification_type_label/);
|
||||
assert.doesNotMatch(detail, /查看相关内容|message-detail__primary|target_url|\['url'\]/);
|
||||
assert.doesNotMatch(detail, /<a\s/i);
|
||||
});
|
||||
@@ -149,8 +149,8 @@ test('asset notifications are absent and interaction notification hooks are pres
|
||||
]) {
|
||||
assert.equal(combined.includes(retired), false, `${retired} should be absent`);
|
||||
}
|
||||
assert.doesNotMatch(notifications, /add_action\('aksrt_asset_transaction_committed'/);
|
||||
for (const hook of ['aksrt_post_favorited', 'aksrt_post_liked', 'aksrt_comment_liked', 'aksrt_user_followed']) {
|
||||
assert.doesNotMatch(notifications, /add_action\('jio_asset_transaction_committed'/);
|
||||
for (const hook of ['jio_post_favorited', 'jio_post_liked', 'jio_comment_liked', 'jio_user_followed']) {
|
||||
assert.ok(notifications.includes(`add_action('${hook}'`));
|
||||
}
|
||||
});
|
||||
@@ -160,6 +160,6 @@ test('notification storage has no message-center legacy metadata fallback', () =
|
||||
const service = read('src/Messages/Message.php');
|
||||
const combined = `${notifications}\n${service}`;
|
||||
|
||||
assert.doesNotMatch(combined, /aksrt_notifications|aksrt_unread_message_count/);
|
||||
assert.doesNotMatch(combined, /jio_notifications|jio_unread_message_count/);
|
||||
assert.doesNotMatch(combined, /legacy|兼容|降级/i);
|
||||
});
|
||||
Reference in new issue
Block a user