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

+37 -37
View File
@@ -37,7 +37,7 @@ function add_query_arg($key, $value = null, $url = ''): string {
}
return rtrim($url, '/') . '/?' . http_build_query($args);
}
function get_bloginfo($key): string { return $key === 'name' ? 'AKSRT' : ''; }
function get_bloginfo($key): string { return $key === 'name' ? 'Jio' : ''; }
function number_format_i18n($number): string { return number_format((float) $number); }
function wp_kses_post($html): string { return strip_tags((string) $html, '<a><b><span><i><div><p><ul><li>'); }
function is_wp_error($value): bool { return false; }
@@ -46,20 +46,20 @@ function dynamic_sidebar($id): void {}
function get_header(): void {}
function get_sidebar(): void {}
function get_footer(): void {}
function aksrt_save_history_search(string $value): void {}
function aksrt_update_search_keywords(string $value): void {}
function aksrt_search_history_enabled(): bool { return false; }
function aksrt_get_search_hot_keywords(): array { return []; }
function aksrt_get_search_type_options(): array { return ['post' => '文章', 'user' => '用户']; }
function aksrt_get_search_form_type(): string { return (string) ($_REQUEST['type'] ?? 'post'); }
function aksrt_get_search_form_state(): array {
return ['type' => aksrt_get_search_form_type(), 'types' => aksrt_get_search_type_options(), 'category_id' => 0, 'category_enabled' => false, 'categories' => []];
function jio_save_history_search(string $value): void {}
function jio_update_search_keywords(string $value): void {}
function jio_search_history_enabled(): bool { return false; }
function jio_get_search_hot_keywords(): array { return []; }
function jio_get_search_type_options(): array { return ['post' => '文章', 'user' => '用户']; }
function jio_get_search_form_type(): string { return (string) ($_REQUEST['type'] ?? 'post'); }
function jio_get_search_form_state(): array {
return ['type' => jio_get_search_form_type(), 'types' => jio_get_search_type_options(), 'category_id' => 0, 'category_enabled' => false, 'categories' => []];
}
class WP_Term {
public function __construct(public int $term_id, public string $name, public string $taxonomy = 'category') {}
}
function aksrt_get_search_categories(?array $ids = null): array {
function jio_get_search_categories(?array $ids = null): array {
return array_map(static fn($id) => new WP_Term((int) $id, (int) $id === 7 ? 'Tech' : 'News'), $ids ?? []);
}
function get_term($id) { return new WP_Term((int) $id, 'Tech'); }
@@ -78,40 +78,40 @@ class WP_User_Query {
public function get_total(): int { return $GLOBALS['user_total']; }
}
function get_userdata($id) { return $GLOBALS['user_data'][(int) $id] ?? false; }
function aksrt_get_user_home_url($id): string { return 'https://example.test/user/' . (int) $id; }
function get_author_posts_url($id): string { return aksrt_get_user_home_url($id); }
function aksrt_get_avatar_url($id, $args = []): string { return 'https://example.test/avatar/' . (int) $id . '.png'; }
function aksrt_get_lazy_attr($mode, $url, $class = '', $placeholder = ''): string {
function jio_get_user_home_url($id): string { return 'https://example.test/user/' . (int) $id; }
function get_author_posts_url($id): string { return jio_get_user_home_url($id); }
function jio_get_avatar_url($id, $args = []): string { return 'https://example.test/avatar/' . (int) $id . '.png'; }
function jio_get_lazy_attr($mode, $url, $class = '', $placeholder = ''): string {
return ' class="' . esc_attr($class) . '" src="' . esc_attr($url) . '"';
}
function aksrt_get_lazy_thumb($size): string { return ''; }
function aksrt_get_user_name($args): string {
function jio_get_lazy_thumb($size): string { return ''; }
function jio_get_user_name($args): string {
$user = get_userdata((int) $args['id']);
$name = function_exists('aksrt_renderer_highlight_text')
? aksrt_renderer_highlight_text((string) $user->display_name, (string) ($args['highlight_query'] ?? ''))
$name = function_exists('jio_renderer_highlight_text')
? jio_renderer_highlight_text((string) $user->display_name, (string) ($args['highlight_query'] ?? ''))
: esc_html($user->display_name);
return '<name class="flex ac flex1"><a class="display-name" href="' . esc_url(aksrt_get_user_home_url($user->ID)) . '">' . $name . '</a></name>';
return '<name class="flex ac flex1"><a class="display-name" href="' . esc_url(jio_get_user_home_url($user->ID)) . '">' . $name . '</a></name>';
}
function aksrt_get_user_follow($class, $id): string { return '<a class="follow flex0" data-follow="' . (int) $id . '">Follow</a>'; }
function aksrt_get_user_description($id): string { return (string) (get_userdata($id)->description ?? ''); }
function jio_get_user_follow($class, $id): string { return '<a class="follow flex0" data-follow="' . (int) $id . '">Follow</a>'; }
function jio_get_user_description($id): string { return (string) (get_userdata($id)->description ?? ''); }
function get_user_meta($id, $key, $single = true): string { return ''; }
function aksrt_get_ajax_null(?string $text = null, $margin = 60, string $img = 'null.svg', int $width = 280): string {
return '<div class="ajax-item aksrt-ajax-null" data-img="' . esc_attr($img) . '" data-width="' . $width . '">' . esc_html((string) $text) . '</div>';
function jio_get_ajax_null(?string $text = null, $margin = 60, string $img = 'null.svg', int $width = 280): string {
return '<div class="ajax-item jio-ajax-null" data-img="' . esc_attr($img) . '" data-width="' . $width . '">' . esc_html((string) $text) . '</div>';
}
function aksrt_get_null($text = null, $margin = 60, string $img = 'null.svg', string $class = '', int $width = 280): string { return ''; }
function aksrt_get_search_tab_nav_filter(string $type): string { return ''; }
function aksrt_archive_get_render_config(array $args): array { return $args + ['mode' => 'list']; }
function aksrt_render_post_list(array $args, WP_Query $query): void {
function jio_get_null($text = null, $margin = 60, string $img = 'null.svg', string $class = '', int $width = 280): string { return ''; }
function jio_get_search_tab_nav_filter(string $type): string { return ''; }
function jio_archive_get_render_config(array $args): array { return $args + ['mode' => 'list']; }
function jio_render_post_list(array $args, WP_Query $query): void {
$title = $query->posts[0]->post_title ?? '';
echo '<div class="posts-item list ajax-item">' . aksrt_renderer_highlight_text((string) $title, (string) ($args['highlight_query'] ?? '')) . '</div>';
echo '<div class="posts-item list ajax-item">' . jio_renderer_highlight_text((string) $title, (string) ($args['highlight_query'] ?? '')) . '</div>';
}
function aksrt_render_pagination($query, array $args): void {}
function aksrt_render_placeholder($kind, $count): string { return ''; }
function jio_render_pagination($query, array $args): void {}
function jio_render_placeholder($kind, $count): string { return ''; }
require ABSPATH . 'inc/helpers/posts-renderer/config.php';
require ABSPATH . 'inc/helpers/aksrt-graphic-card.php';
require ABSPATH . 'inc/helpers/aksrt-ajax-list.php';
require ABSPATH . 'inc/helpers/search/aksrt-search-box.php';
require ABSPATH . 'inc/helpers/jio-graphic-card.php';
require ABSPATH . 'inc/helpers/jio-ajax-list.php';
require ABSPATH . 'inc/helpers/search/jio-search-box.php';
function render_search_case(string $query, string $type, array $users = [], int $user_total = 0, array $posts = []): string {
$GLOBALS['search_text'] = $query;
@@ -152,13 +152,13 @@ if (($GLOBALS['last_user_query_args']['orderby'] ?? '') !== 'display_name') {
throw new RuntimeException('User name ordering is not mapped to WP_User_Query.');
}
$highlight = aksrt_renderer_highlight_text('<b>A&B</b> "Z" <script>x</script>', $query);
$highlight = jio_renderer_highlight_text('<b>A&B</b> "Z" <script>x</script>', $query);
$plain = html_entity_decode(strip_tags($highlight), ENT_QUOTES | ENT_HTML5, 'UTF-8');
if ($plain !== 'A&B "Z" x' || !str_contains($highlight, '<b class="focus-color">')) {
throw new RuntimeException('Keyword highlighting does not preserve safe text.');
}
$form_with_category = aksrt_get_search_box([
$form_with_category = jio_get_search_box([
'class' => 'main-search page-search-box',
's' => '',
'show_keywords' => false,
@@ -169,7 +169,7 @@ $form_with_category = aksrt_get_search_box([
'show_type' => true,
'in_type' => 'post',
], false);
$form_without_category = aksrt_get_search_box([
$form_without_category = jio_get_search_box([
'class' => 'main-search page-search-box',
's' => '',
'show_keywords' => false,
@@ -192,7 +192,7 @@ if (!str_contains((string) $form_with_category, 'class="line-form-input" tabinde
foreach (['post' => 'null-post.svg', 'user' => 'null-user.svg'] as $type => $image) {
$no_results = render_search_case('No matches', $type);
if (!str_contains($no_results, 'class="ajax-item aksrt-ajax-null"') || !str_contains($no_results, $image)) {
if (!str_contains($no_results, 'class="ajax-item jio-ajax-null"') || !str_contains($no_results, $image)) {
throw new RuntimeException('Empty results must remain an AJAX replaceable illustrated item.');
}
}