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

@@ -5,10 +5,10 @@
namespace {
define('ABSPATH', __DIR__);
$GLOBALS['aksrt_test_options'] = [];
$GLOBALS['aksrt_test_manage_options'] = false;
$GLOBALS['aksrt_visibility_query'] = '';
$GLOBALS['aksrt_visibility_page_config'] = [];
$GLOBALS['jio_test_options'] = [];
$GLOBALS['jio_test_manage_options'] = false;
$GLOBALS['jio_visibility_query'] = '';
$GLOBALS['jio_visibility_page_config'] = [];
final class WP_Query {
/** @var array<string,mixed> */
@@ -62,7 +62,7 @@ namespace {
}
function get_template_directory_uri(): string {
return 'https://example.test/wp-content/themes/aksrt';
return 'https://example.test/wp-content/themes/jio';
}
function home_url($path = ''): string {
@@ -70,27 +70,27 @@ namespace {
}
function get_bloginfo($show = ''): string {
return $show === 'title' ? 'AKSRT' : 'AKSRT';
return $show === 'title' ? 'Jio' : 'Jio';
}
function get_option($key, $default = false) {
return array_key_exists($key, $GLOBALS['aksrt_test_options']) ? $GLOBALS['aksrt_test_options'][$key] : $default;
return array_key_exists($key, $GLOBALS['jio_test_options']) ? $GLOBALS['jio_test_options'][$key] : $default;
}
function get_query_var(string $key) {
if ($key === 'aksrt_message_view' && $GLOBALS['aksrt_visibility_query'] === 'message') {
if ($key === 'jio_message_view' && $GLOBALS['jio_visibility_query'] === 'message') {
return 'unread';
}
return '';
}
function update_option($key, $value): bool {
$GLOBALS['aksrt_test_options'][$key] = $value;
$GLOBALS['jio_test_options'][$key] = $value;
return true;
}
function current_user_can($capability): bool {
return $capability === 'manage_options' && !empty($GLOBALS['aksrt_test_manage_options']);
return $capability === 'manage_options' && !empty($GLOBALS['jio_test_manage_options']);
}
function is_admin(): bool { return false; }
@@ -98,37 +98,37 @@ namespace {
function is_home(): bool {
// Custom rewrites can leave WordPress's posts-page flag set even though
// the theme resolves the request to another front-end surface.
return in_array($GLOBALS['aksrt_visibility_query'], [
return in_array($GLOBALS['jio_visibility_query'], [
'home', 'page', 'message', 'user_home', 'user_center', 'user_home_page', 'user_center_page',
], true);
}
function is_front_page(): bool { return $GLOBALS['aksrt_visibility_query'] === 'home'; }
function is_category(): bool { return $GLOBALS['aksrt_visibility_query'] === 'category'; }
function is_tag(): bool { return $GLOBALS['aksrt_visibility_query'] === 'tag'; }
function is_author(): bool { return $GLOBALS['aksrt_visibility_query'] === 'author'; }
function is_singular(string $type = ''): bool { return $type === 'post' && $GLOBALS['aksrt_visibility_query'] === 'single'; }
function is_search(): bool { return $GLOBALS['aksrt_visibility_query'] === 'search'; }
function is_front_page(): bool { return $GLOBALS['jio_visibility_query'] === 'home'; }
function is_category(): bool { return $GLOBALS['jio_visibility_query'] === 'category'; }
function is_tag(): bool { return $GLOBALS['jio_visibility_query'] === 'tag'; }
function is_author(): bool { return $GLOBALS['jio_visibility_query'] === 'author'; }
function is_singular(string $type = ''): bool { return $type === 'post' && $GLOBALS['jio_visibility_query'] === 'single'; }
function is_search(): bool { return $GLOBALS['jio_visibility_query'] === 'search'; }
function is_page(): bool {
return in_array($GLOBALS['aksrt_visibility_query'], ['page', 'user_home_page', 'user_center_page'], true);
return in_array($GLOBALS['jio_visibility_query'], ['page', 'user_home_page', 'user_center_page'], true);
}
function is_page_template(string $template): bool { return false; }
function get_queried_object_id(): int { return 42; }
/** @return mixed */
function get_post_meta(int $post_id, string $key, bool $single = false) {
return $GLOBALS['aksrt_visibility_page_config'];
return $GLOBALS['jio_visibility_page_config'];
}
function aksrt_is_user_home_page(): bool {
return in_array($GLOBALS['aksrt_visibility_query'], ['user_home', 'user_home_page'], true);
function jio_is_user_home_page(): bool {
return in_array($GLOBALS['jio_visibility_query'], ['user_home', 'user_home_page'], true);
}
function aksrt_is_user_center_page(): bool {
return in_array($GLOBALS['aksrt_visibility_query'], ['user_center', 'user_center_page'], true);
function jio_is_user_center_page(): bool {
return in_array($GLOBALS['jio_visibility_query'], ['user_center', 'user_center_page'], true);
}
}
namespace AKSRT\Settings {
namespace Jio\Settings {
class Settings {
/** @var array<string,mixed> */
public static array $headerSlider = [];
@@ -154,13 +154,13 @@ namespace {
require_once dirname(__DIR__, 2) . '/src/Admin/ControllerBase.php';
require_once dirname(__DIR__, 2) . '/inc/helpers/homepage/header-components.php';
$controller = new class extends \AKSRT\Admin\ControllerBase {
$controller = new class extends \Jio\Admin\ControllerBase {
public function register_routes(): void {}
};
$provider = \AKSRT\Admin\SchemaProvider::get_instance();
$provider = \Jio\Admin\SchemaProvider::get_instance();
$permission_denied = !$controller->check_permission();
$GLOBALS['aksrt_test_manage_options'] = true;
$GLOBALS['jio_test_manage_options'] = true;
$permission_allowed = $controller->check_permission();
$unknown_section = $provider->get_section_schema('page_display', 'missing') === null;
$homepage_defaults = $provider->get_defaults('page_display', 'homepage');
@@ -220,15 +220,15 @@ namespace {
* @param list<string> $show_on
* @param array<string,mixed> $page_config
*/
function aksrt_visibility_case(string $query, array $show_on, array $page_config = [], int $paged = 0): bool {
$GLOBALS['aksrt_visibility_query'] = $query;
$GLOBALS['aksrt_visibility_page_config'] = $page_config;
function jio_visibility_case(string $query, array $show_on, array $page_config = [], int $paged = 0): bool {
$GLOBALS['jio_visibility_query'] = $query;
$GLOBALS['jio_visibility_page_config'] = $page_config;
$GLOBALS['wp_query'] = new WP_Query(['paged' => $paged]);
\AKSRT\Settings\Settings::$headerSlider = [
\Jio\Settings\Settings::$headerSlider = [
'show_on_pages' => $show_on,
'show_type' => '',
];
return aksrt_header_slide_is_show();
return jio_header_slide_is_show();
}
$enabled_page_override = [
@@ -236,22 +236,22 @@ namespace {
'header_slider_show_type' => '',
];
$visibility = [
'disabled' => aksrt_visibility_case('home', []),
'disabled_with_page_override' => aksrt_visibility_case('page', [], $enabled_page_override),
'page_enabled' => aksrt_visibility_case('page', ['page'], $enabled_page_override),
'public_user_home' => aksrt_visibility_case('user_home', ['user_home']),
'user_center' => aksrt_visibility_case('user_center', ['user_center']),
'legacy_author_public_home' => aksrt_visibility_case('user_home', ['author']),
'generic_page_excludes_home' => aksrt_visibility_case('user_home_page', ['page']),
'generic_page_excludes_center' => aksrt_visibility_case('user_center_page', ['page']),
'templated_public_user_home' => aksrt_visibility_case('user_home_page', ['user_home']),
'templated_user_center' => aksrt_visibility_case('user_center_page', ['user_center']),
'home_excludes_page' => aksrt_visibility_case('page', ['home']),
'message_uses_other_page' => aksrt_visibility_case('message', ['page']),
'message_excludes_home' => aksrt_visibility_case('message', ['home']),
'home_excludes_public_home' => aksrt_visibility_case('user_home', ['home']),
'home_excludes_user_center' => aksrt_visibility_case('user_center', ['home']),
'paged_archive_hidden' => aksrt_visibility_case('home', ['home'], [], 2),
'disabled' => jio_visibility_case('home', []),
'disabled_with_page_override' => jio_visibility_case('page', [], $enabled_page_override),
'page_enabled' => jio_visibility_case('page', ['page'], $enabled_page_override),
'public_user_home' => jio_visibility_case('user_home', ['user_home']),
'user_center' => jio_visibility_case('user_center', ['user_center']),
'legacy_author_public_home' => jio_visibility_case('user_home', ['author']),
'generic_page_excludes_home' => jio_visibility_case('user_home_page', ['page']),
'generic_page_excludes_center' => jio_visibility_case('user_center_page', ['page']),
'templated_public_user_home' => jio_visibility_case('user_home_page', ['user_home']),
'templated_user_center' => jio_visibility_case('user_center_page', ['user_center']),
'home_excludes_page' => jio_visibility_case('page', ['home']),
'message_uses_other_page' => jio_visibility_case('message', ['page']),
'message_excludes_home' => jio_visibility_case('message', ['home']),
'home_excludes_public_home' => jio_visibility_case('user_home', ['home']),
'home_excludes_user_center' => jio_visibility_case('user_center', ['home']),
'paged_archive_hidden' => jio_visibility_case('home', ['home'], [], 2),
];
echo json_encode([