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

+28 -28
View File
@@ -2,7 +2,7 @@
/**
* legacy-contract search results template.
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
@@ -10,15 +10,15 @@ defined('ABSPATH') || exit;
global $wp_query;
$search_query = trim(wp_strip_all_tags(get_search_query(false)));
$search_type = function_exists('aksrt_get_search_form_type') ? aksrt_get_search_form_type() : 'post';
$search_types = function_exists('aksrt_get_search_type_options') ? aksrt_get_search_type_options() : ['post' => __('文章', 'aksrt')];
$search_type = function_exists('jio_get_search_form_type') ? jio_get_search_form_type() : 'post';
$search_types = function_exists('jio_get_search_type_options') ? jio_get_search_type_options() : ['post' => __('文章', 'jio')];
$search_category = isset($_REQUEST['trem']) ? absint(wp_unslash($_REQUEST['trem'])) : 0;
$search_user = isset($_REQUEST['user']) ? absint(wp_unslash($_REQUEST['user'])) : 0;
$paged = max(1, (int) get_query_var('paged'));
$history_value = $search_query . ($search_type !== '' ? '&type=' . $search_type : '');
if ($search_query !== '' && function_exists('aksrt_save_history_search')) {
aksrt_save_history_search($history_value);
if ($search_query !== '' && function_exists('jio_save_history_search')) {
jio_save_history_search($history_value);
}
$user_query = null;
@@ -38,8 +38,8 @@ if ($search_type === 'user' && $search_query !== '') {
}
$search_total = $user_query instanceof WP_User_Query ? (int) $user_query->get_total() : (int) $wp_query->found_posts;
if ($search_query !== '' && $search_total > 0 && $paged <= 1 && function_exists('aksrt_update_search_keywords')) {
aksrt_update_search_keywords($history_value);
if ($search_query !== '' && $search_total > 0 && $paged <= 1 && function_exists('jio_update_search_keywords')) {
jio_update_search_keywords($history_value);
}
get_header();
@@ -64,8 +64,8 @@ if (is_active_sidebar('all_top_fluid') || is_active_sidebar('search_top_fluid'))
'in_user' => $search_user,
's' => $search_query,
];
echo '<div class="aksrt-panel"' . ($paged < 2 ? ' win-ajax-replace="search"' : '') . '>';
if (function_exists('aksrt_get_main_search')) aksrt_get_main_search($search_args, true);
echo '<div class="jio-panel"' . ($paged < 2 ? ' win-ajax-replace="search"' : '') . '>';
if (function_exists('jio_get_main_search')) jio_get_main_search($search_args, true);
echo '</div>';
$base_url = add_query_arg(['s' => $search_query, 'user' => $search_user], home_url('/'));
@@ -74,7 +74,7 @@ if (is_active_sidebar('all_top_fluid') || is_active_sidebar('search_top_fluid'))
if ($search_type === $key) {
$tab_nav .= '<li class="active"><a class="focus-color" href="javascript:;">' . esc_html($label) . '</a></li>';
} else {
$route_title = $search_query . ' ' . __('搜索', 'aksrt') . $label . ' - ' . get_bloginfo('name');
$route_title = $search_query . ' ' . __('搜索', 'jio') . $label . ' - ' . get_bloginfo('name');
$tab_nav .= '<li><a ajax-replace="true" route="1" route-title="' . esc_attr($route_title) . '" class="ajax-next" href="' . esc_url(add_query_arg('type', $key, $base_url)) . '">' . esc_html($label) . '</a></li>';
}
}
@@ -83,8 +83,8 @@ if (is_active_sidebar('all_top_fluid') || is_active_sidebar('search_top_fluid'))
if ($search_user > 0) {
$filtered_user = get_userdata($search_user);
if ($filtered_user) {
$user_home = function_exists('aksrt_get_user_home_url') ? aksrt_get_user_home_url($search_user) : get_author_posts_url($search_user);
$search_scope_parts[] = __('用户', 'aksrt') . ' <a class="focus-color" href="' . esc_url($user_home) . '"><b>' . esc_html($filtered_user->display_name) . '</b></a>';
$user_home = function_exists('jio_get_user_home_url') ? jio_get_user_home_url($search_user) : get_author_posts_url($search_user);
$search_scope_parts[] = __('用户', 'jio') . ' <a class="focus-color" href="' . esc_url($user_home) . '"><b>' . esc_html($filtered_user->display_name) . '</b></a>';
}
}
if ($search_category > 0) {
@@ -93,56 +93,56 @@ if (is_active_sidebar('all_top_fluid') || is_active_sidebar('search_top_fluid'))
$term_url = get_term_link($filtered_term);
if (!is_wp_error($term_url)) {
$taxonomy = get_taxonomy($filtered_term->taxonomy);
$taxonomy_label = $taxonomy && !empty($taxonomy->labels->singular_name) ? $taxonomy->labels->singular_name : __('分类', 'aksrt');
$taxonomy_label = $taxonomy && !empty($taxonomy->labels->singular_name) ? $taxonomy->labels->singular_name : __('分类', 'jio');
$search_scope_parts[] = esc_html($taxonomy_label) . ' <a class="focus-color" href="' . esc_url($term_url) . '"><b>' . esc_html($filtered_term->name) . '</b></a>';
}
}
}
$description = ($search_scope_parts ? sprintf(__('在%s中,', 'aksrt'), implode(__('、', 'aksrt'), $search_scope_parts)) : '')
$description = ($search_scope_parts ? sprintf(__('在%s中,', 'jio'), implode(__('、', 'jio'), $search_scope_parts)) : '')
. sprintf(
__('搜索 %1$s ,共找到 %2$s 个%3$s', 'aksrt'),
__('搜索 %1$s ,共找到 %2$s 个%3$s', 'jio'),
'<b class="search-key focus-color">' . esc_html($search_query) . '</b>',
'<b class="focus-color">' . esc_html(number_format_i18n($search_total)) . '</b>',
esc_html($search_types[$search_type] ?? __('内容', 'aksrt'))
esc_html($search_types[$search_type] ?? __('内容', 'jio'))
);
?>
<?php if ($search_query === '') : ?>
<div class="aksrt-panel search-content"><?php echo function_exists('aksrt_get_ajax_null') ? aksrt_get_ajax_null(__('请输入搜索关键词', 'aksrt'), 60, 'null-search.svg', 300) : '<div class="ajax-item text-center muted-2-color padding-20">' . esc_html__('请输入搜索关键词', 'aksrt') . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
<div class="jio-panel search-content"><?php echo function_exists('jio_get_ajax_null') ? jio_get_ajax_null(__('请输入搜索关键词', 'jio'), 60, 'null-search.svg', 300) : '<div class="ajax-item text-center muted-2-color padding-20">' . esc_html__('请输入搜索关键词', 'jio') . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
<?php else : ?>
<div class="ajaxpager search-page-ajaxpager">
<div class="ajax-item-header type-<?php echo esc_attr($search_type); ?>">
<div class="search-desc-text mb10 mt10 muted-2-color"><?php echo wp_kses_post($description); ?></div>
<div class="search-tab-header aksrt-panel relative padding-h10"><div><?php echo $tab_nav; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div><div class="search-tab-filter"><?php echo function_exists('aksrt_get_search_tab_nav_filter') ? aksrt_get_search_tab_nav_filter($search_type) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div></div>
<div class="search-tab-header jio-panel relative padding-h10"><div><?php echo $tab_nav; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div><div class="search-tab-filter"><?php echo function_exists('jio_get_search_tab_nav_filter') ? jio_get_search_tab_nav_filter($search_type) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div></div>
</div>
<?php if ($user_query instanceof WP_User_Query && $user_query->get_results()) : ?>
<?php foreach ($user_query->get_results() as $result_user) :
$user_id = (int) $result_user->ID;
?>
<?php echo function_exists('aksrt_author_minicard') ? aksrt_author_minicard($user_id, 'ajax-item', false, $search_query) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo function_exists('jio_author_minicard') ? jio_author_minicard($user_id, 'ajax-item', false, $search_query) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endforeach; ?>
<?php
if (function_exists('aksrt_get_ajax_next_paginate')) {
if (function_exists('jio_get_ajax_next_paginate')) {
$user_next_url = add_query_arg([
's' => $search_query,
'type' => 'user',
'orderby' => $orderby,
'user_paged' => $user_page + 1,
], home_url('/'));
echo aksrt_get_ajax_next_paginate($search_total, $user_page, 12, $user_next_url, 'text-center theme-pagination ajax-pag', 'next-page ajax-next'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo jio_get_ajax_next_paginate($search_total, $user_page, 12, $user_next_url, 'text-center theme-pagination ajax-pag', 'next-page ajax-next'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
?>
<?php elseif ($search_type === 'post' && $wp_query->have_posts()) : ?>
<?php
$config = function_exists('aksrt_archive_get_render_config') ? aksrt_archive_get_render_config(['context' => 'search', 'highlight_query' => $search_query, 'no_margin' => false]) : ['context' => 'search', 'mode' => 'list'];
aksrt_render_post_list(array_merge($config, ['skip_wrapper' => true]), $wp_query);
$config = function_exists('jio_archive_get_render_config') ? jio_archive_get_render_config(['context' => 'search', 'highlight_query' => $search_query, 'no_margin' => false]) : ['context' => 'search', 'mode' => 'list'];
jio_render_post_list(array_merge($config, ['skip_wrapper' => true]), $wp_query);
?>
<?php aksrt_render_pagination($wp_query, ['query_context' => 'search', 'render_config' => $config]); ?>
<?php jio_render_pagination($wp_query, ['query_context' => 'search', 'render_config' => $config]); ?>
<?php else : ?>
<?php echo function_exists('aksrt_get_ajax_null')
? aksrt_get_ajax_null($search_type === 'user' ? __('未找到相关用户', 'aksrt') : __('暂无内容', 'aksrt'), $search_type === 'user' ? 75 : 100, $search_type === 'user' ? 'null-user.svg' : 'null-post.svg')
: '<div class="ajax-item text-center muted-2-color padding-20">' . esc_html($search_type === 'user' ? __('未找到相关用户', 'aksrt') : __('暂无内容', 'aksrt')) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo function_exists('jio_get_ajax_null')
? jio_get_ajax_null($search_type === 'user' ? __('未找到相关用户', 'jio') : __('暂无内容', 'jio'), $search_type === 'user' ? 75 : 100, $search_type === 'user' ? 'null-user.svg' : 'null-post.svg')
: '<div class="ajax-item text-center muted-2-color padding-20">' . esc_html($search_type === 'user' ? __('未找到相关用户', 'jio') : __('暂无内容', 'jio')) . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php endif; ?>
<div class="post_ajax_loader search-loader"><?php echo function_exists('aksrt_render_placeholder') ? aksrt_render_placeholder('list', 6) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- 固定骨架结构。 ?></div>
<div class="post_ajax_loader search-loader"><?php echo function_exists('jio_render_placeholder') ? jio_render_placeholder('list', 6) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- 固定骨架结构。 ?></div>
</div>
<?php endif; ?>
<?php if (is_active_sidebar('search_bottom_content')) dynamic_sidebar('search_bottom_content'); ?>