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

+14 -14
View File
@@ -3,16 +3,16 @@
* Document Chapter Navigation
*
* Shows previous/next chapter navigation at the bottom of a document page.
* Uses \AKSRT\Core\DocsPresenter for chapter resolution.
* Uses \Jio\Core\DocsPresenter for chapter resolution.
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
$current_id = get_the_ID();
$presenter = class_exists('\AKSRT\Core\DocsPresenter') ? \AKSRT\Core\DocsPresenter::get_instance() : null;
$presenter = class_exists('\Jio\Core\DocsPresenter') ? \Jio\Core\DocsPresenter::get_instance() : null;
if ($presenter) {
$nav = $presenter->get_chapter_nav($current_id);
@@ -43,28 +43,28 @@ if ($presenter) {
if (!$prev_page && !$next_page) return;
?>
<nav class="aksrt-doc-chapter-nav" aria-label="<?php esc_attr_e('章节导航', 'aksrt'); ?>">
<nav class="jio-doc-chapter-nav" aria-label="<?php esc_attr_e('章节导航', 'jio'); ?>">
<?php if ($prev_page) : ?>
<a href="<?php echo esc_url(get_permalink($prev_page->ID)); ?>" class="aksrt-doc-chapter-nav__prev">
<span class="aksrt-doc-chapter-nav__label">
<a href="<?php echo esc_url(get_permalink($prev_page->ID)); ?>" class="jio-doc-chapter-nav__prev">
<span class="jio-doc-chapter-nav__label">
<i class="fa fas fa-arrow-left"></i>
<?php esc_html_e('上一篇', 'aksrt'); ?>
<?php esc_html_e('上一篇', 'jio'); ?>
</span>
<span class="aksrt-doc-chapter-nav__title"><?php echo esc_html($prev_page->post_title); ?></span>
<span class="jio-doc-chapter-nav__title"><?php echo esc_html($prev_page->post_title); ?></span>
</a>
<?php else : ?>
<div class="aksrt-doc-chapter-nav__prev aksrt-doc-chapter-nav__prev--disabled"></div>
<div class="jio-doc-chapter-nav__prev jio-doc-chapter-nav__prev--disabled"></div>
<?php endif; ?>
<?php if ($next_page) : ?>
<a href="<?php echo esc_url(get_permalink($next_page->ID)); ?>" class="aksrt-doc-chapter-nav__next">
<span class="aksrt-doc-chapter-nav__label">
<?php esc_html_e('下一篇', 'aksrt'); ?>
<a href="<?php echo esc_url(get_permalink($next_page->ID)); ?>" class="jio-doc-chapter-nav__next">
<span class="jio-doc-chapter-nav__label">
<?php esc_html_e('下一篇', 'jio'); ?>
<i class="fa fas fa-arrow-right"></i>
</span>
<span class="aksrt-doc-chapter-nav__title"><?php echo esc_html($next_page->post_title); ?></span>
<span class="jio-doc-chapter-nav__title"><?php echo esc_html($next_page->post_title); ?></span>
</a>
<?php else : ?>
<div class="aksrt-doc-chapter-nav__next aksrt-doc-chapter-nav__next--disabled"></div>
<div class="jio-doc-chapter-nav__next jio-doc-chapter-nav__next--disabled"></div>
<?php endif; ?>
</nav>
+13 -13
View File
@@ -5,7 +5,7 @@
* Shows a card for a document page on the document navigation index.
* Used in the document navigation page to list available documents.
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
@@ -21,35 +21,35 @@ $child_count = count($children);
$thumb = get_the_post_thumbnail_url($page_id, 'medium');
$excerpt = wp_trim_words(get_the_excerpt(), 30, '...');
?>
<a href="<?php the_permalink(); ?>" class="aksrt-doc-index-card">
<a href="<?php the_permalink(); ?>" class="jio-doc-index-card">
<?php if ($thumb) : ?>
<div class="aksrt-doc-index-card__thumb">
<img<?php echo aksrt_get_lazy_attr('lazy_other', (string) $thumb); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> alt="">
<div class="jio-doc-index-card__thumb">
<img<?php echo jio_get_lazy_attr('lazy_other', (string) $thumb); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> alt="">
</div>
<?php else : ?>
<div class="aksrt-doc-index-card__icon">
<div class="jio-doc-index-card__icon">
<i class="fa fas fa-book"></i>
</div>
<?php endif; ?>
<div class="aksrt-doc-index-card__body">
<h3 class="aksrt-doc-index-card__title"><?php the_title(); ?></h3>
<div class="jio-doc-index-card__body">
<h3 class="jio-doc-index-card__title"><?php the_title(); ?></h3>
<?php if ($excerpt) : ?>
<p class="aksrt-doc-index-card__desc"><?php echo esc_html($excerpt); ?></p>
<p class="jio-doc-index-card__desc"><?php echo esc_html($excerpt); ?></p>
<?php endif; ?>
<div class="aksrt-doc-index-card__meta">
<div class="jio-doc-index-card__meta">
<?php if ($child_count > 0) : ?>
<span class="aksrt-doc-index-card__count">
<span class="jio-doc-index-card__count">
<i class="fa fas fa-file-alt"></i>
<?php printf(esc_html__('%d 篇文章', 'aksrt'), $child_count); ?>
<?php printf(esc_html__('%d 篇文章', 'jio'), $child_count); ?>
</span>
<?php endif; ?>
<span class="aksrt-doc-index-card__date">
<span class="jio-doc-index-card__date">
<i class="fa far fa-clock" aria-hidden="true"></i>
<?php echo esc_html(get_the_date('', $page_id)); ?>
</span>
</div>
</div>
<i class="fa fas fa-chevron-right aksrt-doc-index-card__arrow"></i>
<i class="fa fas fa-chevron-right jio-doc-index-card__arrow"></i>
</a>
+16 -16
View File
@@ -3,9 +3,9 @@
* Docs Mode: Sidebar Navigation
*
* 文档模式侧边栏:显示文档目录树,当前章节高亮。
* Uses \AKSRT\Core\DocsPresenter for tree construction.
* Uses \Jio\Core\DocsPresenter for tree construction.
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
@@ -14,7 +14,7 @@ $current_id = get_the_ID();
$parent_id = wp_get_post_parent_id($current_id);
$root_id = $parent_id ?: $current_id;
$presenter = class_exists('\AKSRT\Core\DocsPresenter') ? \AKSRT\Core\DocsPresenter::get_instance() : null;
$presenter = class_exists('\Jio\Core\DocsPresenter') ? \Jio\Core\DocsPresenter::get_instance() : null;
if ($presenter) {
$doc_pages = $presenter->get_flat_tree($root_id, 3);
@@ -30,29 +30,29 @@ if ($presenter) {
$root_page = get_post($root_id);
?>
<aside class="aksrt-doc-sidebar" role="navigation" aria-label="<?php esc_attr_e('文档导航', 'aksrt'); ?>">
<div class="aksrt-doc-sidebar__header">
<a href="<?php echo esc_url(get_permalink($root_id)); ?>" class="aksrt-doc-sidebar__root">
<i class="fa fas fa-book aksrt-doc-sidebar__root-icon"></i>
<span><?php echo esc_html($root_page->post_title ?? __('文档', 'aksrt')); ?></span>
<aside class="jio-doc-sidebar" role="navigation" aria-label="<?php esc_attr_e('文档导航', 'jio'); ?>">
<div class="jio-doc-sidebar__header">
<a href="<?php echo esc_url(get_permalink($root_id)); ?>" class="jio-doc-sidebar__root">
<i class="fa fas fa-book jio-doc-sidebar__root-icon"></i>
<span><?php echo esc_html($root_page->post_title ?? __('文档', 'jio')); ?></span>
</a>
</div>
<div class="aksrt-doc-sidebar__search">
<input type="text" class="aksrt-doc-sidebar__search-input" placeholder="<?php esc_attr_e('搜索文档...', 'aksrt'); ?>" aria-label="<?php esc_attr_e('搜索文档', 'aksrt'); ?>">
<i class="fa fas fa-search aksrt-doc-sidebar__search-icon"></i>
<div class="jio-doc-sidebar__search">
<input type="text" class="jio-doc-sidebar__search-input" placeholder="<?php esc_attr_e('搜索文档...', 'jio'); ?>" aria-label="<?php esc_attr_e('搜索文档', 'jio'); ?>">
<i class="fa fas fa-search jio-doc-sidebar__search-icon"></i>
</div>
<?php if (!empty($doc_pages)) : ?>
<ul class="aksrt-doc-sidebar__nav">
<ul class="jio-doc-sidebar__nav">
<?php foreach ($doc_pages as $dp) :
$depth = isset($dp->_depth) ? (int) $dp->_depth : 0;
$is_current = ((int) $dp->ID === $current_id);
$is_ancestor = ((int) $dp->ID === $parent_id);
$li_class = 'aksrt-doc-sidebar__item';
$li_class = 'jio-doc-sidebar__item';
if ($is_current) $li_class .= ' is-current';
if ($is_ancestor) $li_class .= ' is-ancestor';
if ($depth > 0) $li_class .= ' aksrt-doc-sidebar__item--depth-' . $depth;
if ($depth > 0) $li_class .= ' jio-doc-sidebar__item--depth-' . $depth;
$has_children = false;
if ($presenter) {
@@ -65,9 +65,9 @@ $root_page = get_post($root_id);
$is_open = $is_current || $is_ancestor;
?>
<li class="<?php echo esc_attr($li_class); ?>" style="<?php echo $depth > 0 ? 'padding-left:' . ($depth * 16) . 'px;' : ''; ?>">
<a href="<?php echo esc_url(get_permalink($dp->ID)); ?>" class="aksrt-doc-sidebar__link<?php echo $is_current ? ' is-active' : ''; ?>">
<a href="<?php echo esc_url(get_permalink($dp->ID)); ?>" class="jio-doc-sidebar__link<?php echo $is_current ? ' is-active' : ''; ?>">
<?php if ($has_children) : ?>
<i class="fa fas fa-chevron-<?php echo $is_open ? 'down' : 'right'; ?> aksrt-doc-sidebar__toggle" aria-hidden="true"></i>
<i class="fa fas fa-chevron-<?php echo $is_open ? 'down' : 'right'; ?> jio-doc-sidebar__toggle" aria-hidden="true"></i>
<?php endif; ?>
<span><?php echo esc_html($dp->post_title); ?></span>
</a>
+5 -5
View File
@@ -4,7 +4,7 @@
*
* 文档模式目录:从文章内容中提取 h2/h3 生成右侧目录。
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
@@ -29,11 +29,11 @@ if (preg_match_all('/<h([2-3])[^>]*(?:id="([^"]*)")?[^>]*>(.*?)<\/h\1>/is', $con
if (empty($headings)) return;
?>
<nav class="aksrt-doc-toc" aria-label="<?php esc_attr_e('文章目录', 'aksrt'); ?>">
<div class="aksrt-doc-toc__title"><?php esc_html_e('目录', 'aksrt'); ?></div>
<ul class="aksrt-doc-toc__list">
<nav class="jio-doc-toc" aria-label="<?php esc_attr_e('文章目录', 'jio'); ?>">
<div class="jio-doc-toc__title"><?php esc_html_e('目录', 'jio'); ?></div>
<ul class="jio-doc-toc__list">
<?php foreach ($headings as $h) : ?>
<li class="aksrt-doc-toc__item aksrt-doc-toc__item--h<?php echo esc_attr((string) $h['level']); ?>">
<li class="jio-doc-toc__item jio-doc-toc__item--h<?php echo esc_attr((string) $h['level']); ?>">
<a href="#<?php echo esc_attr($h['id']); ?>"><?php echo esc_html($h['text']); ?></a>
</li>
<?php endforeach; ?>
+9 -9
View File
@@ -4,13 +4,13 @@
*
* 文档模式树形导航:递归展示文档层级结构。
*
* @package AKSRT
* @package Jio
*/
defined('ABSPATH') || exit;
if (!function_exists('aksrt_render_doc_tree')) {
function aksrt_render_doc_tree($parent_id, $current_id, $depth = 0) {
if (!function_exists('jio_render_doc_tree')) {
function jio_render_doc_tree($parent_id, $current_id, $depth = 0) {
$children = get_pages([
'parent' => $parent_id,
'sort_column' => 'menu_order, post_title',
@@ -19,14 +19,14 @@ if (!function_exists('aksrt_render_doc_tree')) {
if (empty($children)) return;
$indent = str_repeat(' ', $depth);
echo $indent . '<ul class="aksrt-doc-tree__level aksrt-doc-tree__level--' . esc_attr((string) ($depth + 1)) . '">';
echo $indent . '<ul class="jio-doc-tree__level jio-doc-tree__level--' . esc_attr((string) ($depth + 1)) . '">';
foreach ($children as $child) {
$is_current = ($child->ID === $current_id);
$has_children = (int) get_pages(['child_of' => $child->ID, 'parent' => $child->ID, 'hide_empty' => true, 'fields' => 'ids']) > 0;
echo $indent . ' <li class="aksrt-doc-tree__item' . ($is_current ? ' is-current' : '') . '">';
echo $indent . ' <li class="jio-doc-tree__item' . ($is_current ? ' is-current' : '') . '">';
echo '<a href="' . esc_url(get_permalink($child->ID)) . '">' . esc_html($child->post_title) . '</a>';
if ($has_children && $depth < 3) {
aksrt_render_doc_tree($child->ID, $current_id, $depth + 1);
jio_render_doc_tree($child->ID, $current_id, $depth + 1);
}
echo '</li>';
}
@@ -38,9 +38,9 @@ $current_id = get_the_ID();
$root_id = wp_get_post_parent_id($current_id) ?: $current_id;
?>
<nav class="aksrt-doc-tree" aria-label="<?php esc_attr_e('文档树', 'aksrt'); ?>">
<div class="aksrt-doc-tree__root">
<nav class="jio-doc-tree" aria-label="<?php esc_attr_e('文档树', 'jio'); ?>">
<div class="jio-doc-tree__root">
<a href="<?php echo esc_url(get_permalink($root_id)); ?>"><?php echo esc_html(get_the_title($root_id)); ?></a>
</div>
<?php aksrt_render_doc_tree($root_id, $current_id); ?>
<?php jio_render_doc_tree($root_id, $current_id); ?>
</nav>