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

+2 -2
View File
@@ -1,9 +1,9 @@
<?php
/**
* @package AKSRT
* @package Jio
*/
namespace AKSRT\Finance;
namespace Jio\Finance;
defined('ABSPATH') || exit;
+16 -16
View File
@@ -1,11 +1,11 @@
<?php
/**
* @package AKSRT
* @package Jio
*/
namespace AKSRT\Finance;
namespace Jio\Finance;
use AKSRT\Ledger\LedgerCommand;
use Jio\Ledger\LedgerCommand;
defined('ABSPATH') || exit;
@@ -74,9 +74,9 @@ final class FinancialFlowService {
$user_id = max(0, (int) ($withdrawal['user_id'] ?? 0));
$number = sanitize_text_field((string) ($withdrawal['withdrawal_number'] ?? ''));
try {
$amount_minor = \AKSRT\Ledger\AssetAmount::balance((string) ($withdrawal['amount'] ?? ''))->minor();
$amount_minor = \Jio\Ledger\AssetAmount::balance((string) ($withdrawal['amount'] ?? ''))->minor();
} catch (\InvalidArgumentException $e) {
return new \WP_Error('aksrt_flow_amount', __('提现流水金额无效', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_amount', __('提现流水金额无效', 'jio'), ['status' => 500]);
}
return $this->record([
@@ -93,7 +93,7 @@ final class FinancialFlowService {
'direction' => 'in',
'entry_type' => 'payout',
'delta_minor' => $amount_minor,
'remark' => __('提现打款完成', 'aksrt'),
'remark' => __('提现打款完成', 'jio'),
]], $caller_transaction);
}
@@ -108,7 +108,7 @@ final class FinancialFlowService {
$operation_key = substr(sanitize_text_field((string) ($flow['operation_key'] ?? '')), 0, 191);
$event_type = sanitize_key((string) ($flow['event_type'] ?? ''));
if ($operation_key === '' || $event_type === '' || ($entries === [] && !$allow_empty_entries)) {
return new \WP_Error('aksrt_flow_invalid', __('资金流水参数无效', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_invalid', __('资金流水参数无效', 'jio'), ['status' => 500]);
}
$prepared_entries = $this->prepare_entries($entries);
@@ -122,7 +122,7 @@ final class FinancialFlowService {
}
$owns_transaction = !$caller_transaction;
if ($owns_transaction && $wpdb->query('START TRANSACTION') === false) {
return new \WP_Error('aksrt_flow_db', __('无法开启资金流水事务', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_db', __('无法开启资金流水事务', 'jio'), ['status' => 500]);
}
$flow_id = 0;
@@ -159,7 +159,7 @@ final class FinancialFlowService {
if ($owns_transaction) {
$wpdb->query('ROLLBACK');
}
return new \WP_Error('aksrt_flow_number', __('无法生成唯一流水号', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_number', __('无法生成唯一流水号', 'jio'), ['status' => 500]);
}
foreach ($prepared_entries as $index => $entry) {
@@ -179,12 +179,12 @@ final class FinancialFlowService {
if ($owns_transaction) {
$wpdb->query('ROLLBACK');
}
return new \WP_Error('aksrt_flow_entry', __('资金流水分录写入失败', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_entry', __('资金流水分录写入失败', 'jio'), ['status' => 500]);
}
}
if ($owns_transaction && $wpdb->query('COMMIT') === false) {
$wpdb->query('ROLLBACK');
return new \WP_Error('aksrt_flow_db', __('资金流水提交失败', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_db', __('资金流水提交失败', 'jio'), ['status' => 500]);
}
return $flow_number;
@@ -203,10 +203,10 @@ final class FinancialFlowService {
$asset = sanitize_key((string) ($entry['asset'] ?? ''));
$direction = sanitize_key((string) ($entry['direction'] ?? ($delta > 0 ? 'in' : 'out')));
if (!in_array($asset, ['cash', 'balance', 'points'], true) || $delta === 0) {
return new \WP_Error('aksrt_flow_entry', __('资金流水分录无效', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_entry', __('资金流水分录无效', 'jio'), ['status' => 500]);
}
if (!in_array($direction, ['in', 'out'], true) || ($delta > 0) !== ($direction === 'in')) {
return new \WP_Error('aksrt_flow_entry', __('资金流水方向无效', 'aksrt'), ['status' => 500]);
return new \WP_Error('jio_flow_entry', __('资金流水方向无效', 'jio'), ['status' => 500]);
}
$prepared[] = [
'user_id' => max(0, (int) ($entry['user_id'] ?? 0)),
@@ -243,7 +243,7 @@ final class FinancialFlowService {
private function resolve_withdrawal_number(LedgerCommand $command, int $transaction_id): string {
global $wpdb;
$table = \AKSRT\Core\DBMigrator::table('withdrawal');
$table = \Jio\Core\DBMigrator::table('withdrawal');
$withdrawal_id = max(0, (int) ($command->metadata['withdrawal_id'] ?? 0));
if ($withdrawal_id <= 0 && ctype_digit($command->ref_key)) {
$withdrawal_id = (int) $command->ref_key;
@@ -255,11 +255,11 @@ final class FinancialFlowService {
}
private function flow_table(): string {
return \AKSRT\Core\DBMigrator::table('financial_flow');
return \Jio\Core\DBMigrator::table('financial_flow');
}
private function entry_table(): string {
return \AKSRT\Core\DBMigrator::table('financial_flow_entry');
return \Jio\Core\DBMigrator::table('financial_flow_entry');
}
private static function utc_now(): string {