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
@@ -8,13 +8,13 @@ const read = (...segments) => fs.readFileSync(path.join(root, ...segments), 'utf
|
||||
|
||||
test('invite code table has a unique code key and a usage log table', () => {
|
||||
const schema = read('src', 'Core', 'DBMigratorPart2.php')
|
||||
assert.match(schema, /CREATE TABLE \{\$prefix\}aksrt_invite_code \([\s\S]*?UNIQUE KEY uniq_invite_code \(code\)/)
|
||||
assert.match(schema, /CREATE TABLE \{\$prefix\}aksrt_invite_code \([\s\S]*?\) ENGINE=InnoDB/)
|
||||
assert.match(schema, /CREATE TABLE \{\$prefix\}jio_invite_code \([\s\S]*?UNIQUE KEY uniq_invite_code \(code\)/)
|
||||
assert.match(schema, /CREATE TABLE \{\$prefix\}jio_invite_code \([\s\S]*?\) ENGINE=InnoDB/)
|
||||
// 使用记录表:运营需要知道"哪个用户用了哪个码",且 (code_id, user_id) 唯一防重复记账。
|
||||
assert.match(schema, /CREATE TABLE \{\$prefix\}aksrt_invite_code_usage \([\s\S]*?UNIQUE KEY uniq_invite_usage \(code_id, user_id\)/)
|
||||
assert.match(schema, /CREATE TABLE \{\$prefix\}jio_invite_code_usage \([\s\S]*?UNIQUE KEY uniq_invite_usage \(code_id, user_id\)/)
|
||||
const registry = read('src', 'Core', 'DBMigratorPart3.php')
|
||||
assert.match(registry, /'invite_code'\s+=>\s+'aksrt_invite_code'/)
|
||||
assert.match(registry, /'invite_code_usage'\s+=>\s+'aksrt_invite_code_usage'/)
|
||||
assert.match(registry, /'invite_code'\s+=>\s+'jio_invite_code'/)
|
||||
assert.match(registry, /'invite_code_usage'\s+=>\s+'jio_invite_code_usage'/)
|
||||
})
|
||||
|
||||
test('consumption is a single conditional UPDATE, not select-then-update', () => {
|
||||
@@ -50,7 +50,7 @@ test('registration services gate on the invite-code field mode', () => {
|
||||
test('rewards defer to email verification when signup verification is on', () => {
|
||||
const service = read('src', 'Payment', 'InviteCode.php')
|
||||
assert.match(service, /signup_verification_enabled\(\)/)
|
||||
assert.match(service, /aksrt_email_verified/)
|
||||
assert.match(service, /jio_email_verified/)
|
||||
assert.match(service, /META_PENDING/)
|
||||
})
|
||||
|
||||
@@ -71,9 +71,9 @@ test('invite-code surfaces: form field, admin page, menus and both schemas', ()
|
||||
assert.match(page, /orderby-but/)
|
||||
assert.match(page, /bulk_action/)
|
||||
assert.match(page, /paginate_links/)
|
||||
assert.match(page, /aksrt_invite_delete/)
|
||||
assert.match(forms, /aksrt_invite_add/)
|
||||
assert.match(forms, /aksrt_invite_export/)
|
||||
assert.match(page, /jio_invite_delete/)
|
||||
assert.match(forms, /jio_invite_add/)
|
||||
assert.match(forms, /jio_invite_export/)
|
||||
// 列表内不再有列表/添加/导出三视图路由;状态筛选仍是独立的列表筛选器。
|
||||
assert.doesNotMatch(page + forms, /page-title-action|[?&](?:tab|view)=(?:add|export)|tab=(?:list|add|export)/)
|
||||
// 管理页不再依赖 REST 与 wp_rest nonce。
|
||||
@@ -81,7 +81,7 @@ test('invite-code surfaces: form field, admin page, menus and both schemas', ()
|
||||
|
||||
const menus = read('src', 'Admin', 'Native', 'UsersMenus.php')
|
||||
assert.match(menus, /use UsersMenusInviteCode/)
|
||||
assert.match(menus, /aksrt_invite_codes/)
|
||||
assert.match(menus, /jio_invite_codes/)
|
||||
|
||||
const bootstrap = read('functions.php')
|
||||
assert.match(bootstrap, /InviteCode::get_instance\(\)->init\(\)/)
|
||||
@@ -97,14 +97,14 @@ test('invite-code surfaces: form field, admin page, menus and both schemas', ()
|
||||
|
||||
test('admin operations run through admin_post handlers with capability and nonce guards', () => {
|
||||
const service = read('src', 'Payment', 'InviteCode.php')
|
||||
assert.match(service, /admin_post_aksrt_invite_add/)
|
||||
assert.match(service, /admin_post_aksrt_invite_delete/)
|
||||
assert.match(service, /admin_post_aksrt_invite_export/)
|
||||
assert.match(service, /check_admin_referer\('aksrt_invite_admin', 'aksrt_nonce'\)/)
|
||||
assert.match(service, /admin_post_jio_invite_add/)
|
||||
assert.match(service, /admin_post_jio_invite_delete/)
|
||||
assert.match(service, /admin_post_jio_invite_export/)
|
||||
assert.match(service, /check_admin_referer\('jio_invite_admin', 'jio_nonce'\)/)
|
||||
assert.match(service, /current_user_can\('edit_users'\)/)
|
||||
// 管理端 REST 已移除:除公开 verify 外不再注册邀请码路由(导出文件名除外)。
|
||||
assert.doesNotMatch(service, /register_rest_route\('aksrt\/v1', '\/invite-codes/)
|
||||
assert.match(service, /register_rest_route\('aksrt\/v1', '\/invite-code\/verify'/)
|
||||
assert.doesNotMatch(service, /register_rest_route\('jio\/v1', '\/invite-codes/)
|
||||
assert.match(service, /register_rest_route\('jio\/v1', '\/invite-code\/verify'/)
|
||||
// 列表/导出共用状态过滤;批量删除连使用记录一起清。
|
||||
assert.match(service, /private function status_where\(string \$status\): array/)
|
||||
assert.match(service, /'unused' => \['used_count = 0', \[\]\]/)
|
||||
@@ -157,8 +157,8 @@ test('per-code remark persists through generate/import and both exports round-tr
|
||||
assert.match(service, /\$parts === \[\] \? '无'/)
|
||||
// 文本导出与导入格式互通;CSV(Excel)含中文表头与状态列。
|
||||
assert.match(service, /\$row\['code'\] \. \$division \. \$this->reward_param_string/)
|
||||
assert.match(service, /__\('邀请码', 'aksrt'\), __\('使用奖励', 'aksrt'\)/)
|
||||
assert.match(service, /\$used > 0 \? __\('已使用', 'aksrt'\) : __\('未使用', 'aksrt'\)/)
|
||||
assert.match(service, /__\('邀请码', 'jio'\), __\('使用奖励', 'jio'\)/)
|
||||
assert.match(service, /\$used > 0 \? __\('已使用', 'jio'\) : __\('未使用', 'jio'\)/)
|
||||
|
||||
const forms = read('src', 'Admin', 'Native', 'UsersMenusInviteForms.php')
|
||||
// 自动生成标识字段默认 invita_YmdHis;列表标识列可点击定位。
|
||||
|
||||
Reference in new issue
Block a user