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,12 +2,12 @@
/**
* Free points tasks list + daily free detail (legacy points free tab).
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
if (!class_exists('\AKSRT\Credits\PointsFree') || !\AKSRT\Credits\PointsFree::enabled()) {
if (!class_exists('\Jio\Credits\PointsFree') || !\Jio\Credits\PointsFree::enabled()) {
return;
}
@@ -16,23 +16,23 @@ if (!class_exists('\AKSRT\Credits\PointsFree') || !\AKSRT\Credits\PointsFree::en
*
* @return array{type:string,label:string,href?:string}
*/
$aksrt_points_task_action = static function (string $key): array {
$jio_points_task_action = static function (string $key): array {
$home = home_url('/');
$submit = '';
if (function_exists('aksrt_get_page_url_by_template')) {
$submit = (string) aksrt_get_page_url_by_template('templates/pages/page-submit.php');
if (function_exists('jio_get_page_url_by_template')) {
$submit = (string) jio_get_page_url_by_template('templates/pages/page-submit.php');
}
switch ($key) {
case 'sign_in':
return [
'type' => 'signin',
'label' => __('去签到', 'aksrt'),
'label' => __('去签到', 'jio'),
];
case 'post_new':
return [
'type' => 'link',
'label' => __('去完成', 'aksrt'),
'label' => __('去完成', 'jio'),
'href' => $submit !== '' ? $submit : $home,
];
case 'comment_new':
@@ -46,13 +46,13 @@ $aksrt_points_task_action = static function (string $key): array {
}
return [
'type' => 'link',
'label' => __('去完成', 'aksrt'),
'label' => __('去完成', 'jio'),
'href' => $href,
];
case 'login':
return [
'type' => 'none',
'label' => __('登录即可领取', 'aksrt'),
'label' => __('登录即可领取', 'jio'),
];
case 'post_like':
case 'post_favorite':
@@ -67,14 +67,14 @@ $aksrt_points_task_action = static function (string $key): array {
}
return [
'type' => 'link',
'label' => __('去看看', 'aksrt'),
'label' => __('去看看', 'jio'),
'href' => $href,
];
case 'followed':
$center = function_exists('aksrt_get_user_center_url') ? (string) aksrt_get_user_center_url() : $home;
$center = function_exists('jio_get_user_center_url') ? (string) jio_get_user_center_url() : $home;
return [
'type' => 'link',
'label' => __('去主页', 'aksrt'),
'label' => __('去主页', 'jio'),
'href' => $center !== '' ? $center : $home,
];
default:
@@ -83,21 +83,21 @@ $aksrt_points_task_action = static function (string $key): array {
};
$user_id = (int) ($user_id ?? get_current_user_id());
$today = \AKSRT\Credits\PointsFree::today_total($user_id);
$day_max = (int) \AKSRT\Credits\PointsFree::settings()['day_max'];
$tasks = \AKSRT\Credits\PointsFree::task_list_for_user($user_id);
$detail = \AKSRT\Credits\PointsFree::date_detail($user_id);
$today = \Jio\Credits\PointsFree::today_total($user_id);
$day_max = (int) \Jio\Credits\PointsFree::settings()['day_max'];
$tasks = \Jio\Credits\PointsFree::task_list_for_user($user_id);
$detail = \Jio\Credits\PointsFree::date_detail($user_id);
$pane = isset($points_tasks_pane) ? sanitize_key((string) $points_tasks_pane) : 'tasks';
// 文案里的货币名统一走自定义名称(后台「积分配置 → 自定义货币名称」)。
$currency = (string) ($currency_name ?? __('积分', 'aksrt'));
$currency = (string) ($currency_name ?? __('积分', 'jio'));
?>
<?php if ($pane === 'date') : ?>
<div class="uc-points-date">
<div class="flex jsb ac mb10">
<div class="font-bold"><?php printf(esc_html__('每日免费%s明细', 'aksrt'), esc_html($currency)); ?></div>
<button type="button" class="muted-2-color" data-aksrt-asset-tab="points_free">
<?php esc_html_e('返回任务', 'aksrt'); ?><i class="fa fas fa-angle-right ml6 em12" aria-hidden="true"></i>
<div class="font-bold"><?php printf(esc_html__('每日免费%s明细', 'jio'), esc_html($currency)); ?></div>
<button type="button" class="muted-2-color" data-jio-asset-tab="points_free">
<?php esc_html_e('返回任务', 'jio'); ?><i class="fa fas fa-angle-right ml6 em12" aria-hidden="true"></i>
</button>
</div>
<?php if ($detail) : ?>
@@ -108,7 +108,7 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="uc-transactions__empty"><p><?php printf(esc_html__('暂无免费%s获取明细', 'aksrt'), esc_html($currency)); ?></p></div>
<div class="uc-transactions__empty"><p><?php printf(esc_html__('暂无免费%s获取明细', 'jio'), esc_html($currency)); ?></p></div>
<?php endif; ?>
</div>
<?php else : ?>
@@ -121,7 +121,7 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
<?php
printf(
/* translators: %s: points */
esc_html__('今日累计 %s', 'aksrt'),
esc_html__('今日累计 %s', 'jio'),
'<span class="focus-color">+' . esc_html((string) $today) . '</span>'
);
?>
@@ -130,18 +130,18 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
<?php
if ($day_max > 0) {
if ($today >= $day_max) {
printf(esc_html__('今日获取的免费%s已达到 %s,将不再获取', 'aksrt'), esc_html($currency), esc_html((string) $day_max));
printf(esc_html__('今日获取的免费%s已达到 %s,将不再获取', 'jio'), esc_html($currency), esc_html((string) $day_max));
} else {
printf(esc_html__('每日可免费获取 %1$s %2$s,超过后将不再获取', 'aksrt'), esc_html((string) $day_max), esc_html($currency));
printf(esc_html__('每日可免费获取 %1$s %2$s,超过后将不再获取', 'jio'), esc_html((string) $day_max), esc_html($currency));
}
} else {
printf(esc_html__('免费%s无每日上限', 'aksrt'), esc_html($currency));
printf(esc_html__('免费%s无每日上限', 'jio'), esc_html($currency));
}
?>
</div>
</div>
<button type="button" class="muted-2-color shrink0" data-aksrt-asset-tab="points_date">
<?php esc_html_e('每日详情', 'aksrt'); ?><i class="fa fas fa-angle-right ml6 em12" aria-hidden="true"></i>
<button type="button" class="muted-2-color shrink0" data-jio-asset-tab="points_date">
<?php esc_html_e('每日详情', 'jio'); ?><i class="fa fas fa-angle-right ml6 em12" aria-hidden="true"></i>
</button>
</div>
</div>
@@ -151,7 +151,7 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
<?php foreach ($tasks as $task) : ?>
<?php
$task_key = sanitize_key((string) ($task['key'] ?? ''));
$action = $aksrt_points_task_action($task_key);
$action = $jio_points_task_action($task_key);
$status = sanitize_key((string) ($task['status'] ?? 'todo'));
$done = in_array($status, ['done_today', 'done'], true);
?>
@@ -179,9 +179,9 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
<i class="fa fas fa-money-bill mr6 em09" aria-hidden="true"></i>+ <?php echo esc_html((string) (int) $task['points']); ?>
</div>
<?php if ($done) : ?>
<span class="uc-points-tasks__action muted-color em09 mt6"><?php esc_html_e('今日已完成', 'aksrt'); ?></span>
<span class="uc-points-tasks__action muted-color em09 mt6"><?php esc_html_e('今日已完成', 'jio'); ?></span>
<?php elseif (($action['type'] ?? 'none') === 'signin') : ?>
<button type="button" class="uc-points-tasks__action muted-color em09 mt6" data-aksrt-signin-goto>
<button type="button" class="uc-points-tasks__action muted-color em09 mt6" data-jio-signin-goto>
<?php echo esc_html((string) $action['label']); ?><i class="fa fas fa-angle-right em12 ml3" aria-hidden="true"></i>
</button>
<?php elseif (($action['type'] ?? 'none') === 'link' && !empty($action['href'])) : ?>
@@ -195,7 +195,7 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="uc-transactions__empty"><p><?php printf(esc_html__('暂无可用%s任务', 'aksrt'), esc_html($currency)); ?></p></div>
<div class="uc-transactions__empty"><p><?php printf(esc_html__('暂无可用%s任务', 'jio'), esc_html($currency)); ?></p></div>
<?php endif; ?>
</div>
<?php endif; ?>