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:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -1,14 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: AKSRT - Categories
|
||||
* Template Name: Jio - Categories
|
||||
* Template Post Type: page
|
||||
*
|
||||
* 分类汇总页面:列出全站所有分类。
|
||||
*
|
||||
* 用法:在后台新建一个 Page,标题任意(默认显示页面标题,否则用"分类目录"),
|
||||
* 模板选择 "AKSRT - Categories";或将 slug 设为 "categories" 自动匹配。
|
||||
* 模板选择 "Jio - Categories";或将 slug 设为 "categories" 自动匹配。
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
@@ -42,13 +42,13 @@ $total_posts = $total_counts && isset($total_counts->publish) ? (int) $total_co
|
||||
|
||||
$page_title = trim((string) get_the_title());
|
||||
if ($page_title === '') {
|
||||
$page_title = __('分类目录', 'aksrt');
|
||||
$page_title = __('分类目录', 'jio');
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (function_exists('aksrt_archive_open_shell')) {
|
||||
aksrt_archive_open_shell([
|
||||
if (function_exists('jio_archive_open_shell')) {
|
||||
jio_archive_open_shell([
|
||||
'main_class' => 'site-main container ',
|
||||
'has_sidebar' => false,
|
||||
'page_kind' => 'categories',
|
||||
@@ -56,11 +56,11 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
}
|
||||
?>
|
||||
<div class="content-main content-main--page content-main--categories">
|
||||
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
|
||||
<?php if (function_exists('jio_breadcrumbs')) { jio_breadcrumbs(); } ?>
|
||||
<?php
|
||||
$cats_meta = sprintf(
|
||||
/* translators: 1: total category count, 2: total published post count */
|
||||
esc_html__('共 %1$d 个分类 · 共 %2$d 篇文章', 'aksrt'),
|
||||
esc_html__('共 %1$d 个分类 · 共 %2$d 篇文章', 'jio'),
|
||||
$total_cats,
|
||||
$total_posts
|
||||
);
|
||||
@@ -71,44 +71,44 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
?>
|
||||
|
||||
<?php if (!empty($top_level)) : ?>
|
||||
<section class="aksrt-cats-grid" aria-label="<?php esc_attr_e('分类列表', 'aksrt'); ?>">
|
||||
<section class="jio-cats-grid" aria-label="<?php esc_attr_e('分类列表', 'jio'); ?>">
|
||||
<?php foreach ($top_level as $cat) :
|
||||
$cat_id = (int) $cat->term_id;
|
||||
$cat_link = get_category_link($cat_id);
|
||||
$cover_url = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::get_category_cover_url($cat_id)
|
||||
$cover_url = class_exists('\Jio\Settings\Settings')
|
||||
? \Jio\Settings\Settings::get_category_cover_url($cat_id)
|
||||
: (get_template_directory_uri() . '/assets/img/placeholder.svg');
|
||||
$desc = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::get_category_recommend_desc($cat_id)
|
||||
$desc = class_exists('\Jio\Settings\Settings')
|
||||
? \Jio\Settings\Settings::get_category_recommend_desc($cat_id)
|
||||
: (string) $cat->description;
|
||||
$children = $children_by_parent[$cat_id] ?? [];
|
||||
?>
|
||||
<article class="aksrt-cat-card">
|
||||
<a class="aksrt-cat-card__cover"
|
||||
<article class="jio-cat-card">
|
||||
<a class="jio-cat-card__cover"
|
||||
href="<?php echo esc_url($cat_link); ?>"
|
||||
style="background-image: url('<?php echo esc_url($cover_url); ?>');"
|
||||
aria-label="<?php echo esc_attr($cat->name); ?>">
|
||||
<span class="aksrt-cat-card__count-badge">
|
||||
<?php printf(esc_html__('%d 篇', 'aksrt'), (int) $cat->count); ?>
|
||||
<span class="jio-cat-card__count-badge">
|
||||
<?php printf(esc_html__('%d 篇', 'jio'), (int) $cat->count); ?>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<div class="aksrt-cat-card__body">
|
||||
<h2 class="aksrt-cat-card__title">
|
||||
<div class="jio-cat-card__body">
|
||||
<h2 class="jio-cat-card__title">
|
||||
<a href="<?php echo esc_url($cat_link); ?>"><?php echo esc_html($cat->name); ?></a>
|
||||
</h2>
|
||||
|
||||
<?php if ($desc !== '') : ?>
|
||||
<p class="aksrt-cat-card__desc"><?php echo esc_html(wp_trim_words(wp_strip_all_tags($desc), 40, '…')); ?></p>
|
||||
<p class="jio-cat-card__desc"><?php echo esc_html(wp_trim_words(wp_strip_all_tags($desc), 40, '…')); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($children)) : ?>
|
||||
<ul class="aksrt-cat-card__children" aria-label="<?php esc_attr_e('子分类', 'aksrt'); ?>">
|
||||
<ul class="jio-cat-card__children" aria-label="<?php esc_attr_e('子分类', 'jio'); ?>">
|
||||
<?php foreach ($children as $child) : ?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url(get_category_link((int) $child->term_id)); ?>">
|
||||
<span class="aksrt-cat-card__child-name"><?php echo esc_html($child->name); ?></span>
|
||||
<span class="aksrt-cat-card__child-count"><?php echo (int) $child->count; ?></span>
|
||||
<span class="jio-cat-card__child-name"><?php echo esc_html($child->name); ?></span>
|
||||
<span class="jio-cat-card__child-count"><?php echo (int) $child->count; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
@@ -119,21 +119,21 @@ if (function_exists('aksrt_archive_open_shell')) {
|
||||
<?php endforeach; ?>
|
||||
</section>
|
||||
<?php else : ?>
|
||||
<div class="no-results aksrt-cats-empty">
|
||||
<p><?php esc_html_e('暂无分类。', 'aksrt'); ?></p>
|
||||
<div class="no-results jio-cats-empty">
|
||||
<p><?php esc_html_e('暂无分类。', 'jio'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="aksrt-cats-footer">
|
||||
<p class="jio-cats-footer">
|
||||
<a class="btn-outline" href="<?php echo esc_url(home_url('/')); ?>">
|
||||
<?php esc_html_e('返回首页', 'aksrt'); ?>
|
||||
<?php esc_html_e('返回首页', 'jio'); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (function_exists('aksrt_archive_close_shell')) {
|
||||
aksrt_archive_close_shell(['has_sidebar' => false]);
|
||||
if (function_exists('jio_archive_close_shell')) {
|
||||
jio_archive_close_shell(['has_sidebar' => false]);
|
||||
}
|
||||
|
||||
get_footer();
|
||||
Reference in new issue
Block a user