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
@@ -2,12 +2,12 @@
|
||||
/**
|
||||
* Fixed homepage layout renderer.
|
||||
*
|
||||
* @package AKSRT
|
||||
* @package Jio
|
||||
*/
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('aksrt_homepage_render_layout')) {
|
||||
if (!function_exists('jio_homepage_render_layout')) {
|
||||
/**
|
||||
* Render the fixed homepage layout (legacy latest-first content stream).
|
||||
*
|
||||
@@ -15,82 +15,82 @@ if (!function_exists('aksrt_homepage_render_layout')) {
|
||||
* fluid top → main.container → top content → tabs/list → bottom content → sidebar
|
||||
* → fluid bottom. Hero/header-slider is rendered from header.php, not here.
|
||||
*/
|
||||
function aksrt_homepage_render_layout(): void {
|
||||
$main_list_enabled = !class_exists('\AKSRT\Settings\Settings') || \AKSRT\Settings\Settings::home_posts_list_enabled();
|
||||
function jio_homepage_render_layout(): void {
|
||||
$main_list_enabled = !class_exists('\Jio\Settings\Settings') || \Jio\Settings\Settings::home_posts_list_enabled();
|
||||
|
||||
// Fluid zones live outside <main>, once only (removed from header.php).
|
||||
aksrt_homepage_render_widget_zone(
|
||||
jio_homepage_render_widget_zone(
|
||||
['home_top_fluid'],
|
||||
'fluid-widget-wrap aksrt-homepage__fluid-zone aksrt-homepage__fluid-zone--top'
|
||||
'fluid-widget-wrap jio-homepage__fluid-zone jio-homepage__fluid-zone--top'
|
||||
);
|
||||
?>
|
||||
<main id="main-content" role="main" class="container site-main aksrt-homepage" tabindex="-1">
|
||||
<div class="content-wrap aksrt-homepage__shell">
|
||||
<div class="content-layout aksrt-homepage__content-layout aksrt-homepage__primary">
|
||||
<main id="main-content" role="main" class="container site-main jio-homepage" tabindex="-1">
|
||||
<div class="content-wrap jio-homepage__shell">
|
||||
<div class="content-layout jio-homepage__content-layout jio-homepage__primary">
|
||||
<?php
|
||||
aksrt_homepage_render_widget_zone(
|
||||
jio_homepage_render_widget_zone(
|
||||
['home_top_content'],
|
||||
'aksrt-homepage__content-zone aksrt-homepage__content-zone--top'
|
||||
'jio-homepage__content-zone jio-homepage__content-zone--top'
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($main_list_enabled) :
|
||||
$tab_configs = aksrt_homepage_get_current_page() === 1 ? aksrt_homepage_get_tab_configs() : [];
|
||||
$tab_configs = jio_homepage_get_current_page() === 1 ? jio_homepage_get_tab_configs() : [];
|
||||
?>
|
||||
<div class="home-tab-content">
|
||||
<?php echo aksrt_homepage_get_tab_header_html($tab_configs); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo jio_homepage_get_tab_header_html($tab_configs); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<div class="tab-content">
|
||||
<div class="posts-row ajaxpager tab-pane fade in active" id="index-tab-main">
|
||||
<?php aksrt_homepage_render_ajax_option_menu(); ?>
|
||||
<?php aksrt_homepage_render_posts_grid(aksrt_homepage_get_latest_query(), true); ?>
|
||||
<?php jio_homepage_render_ajax_option_menu(); ?>
|
||||
<?php jio_homepage_render_posts_grid(jio_homepage_get_latest_query(), true); ?>
|
||||
</div>
|
||||
<?php echo aksrt_homepage_get_tab_panes_html($tab_configs); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo jio_homepage_get_tab_panes_html($tab_configs); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
aksrt_homepage_render_widget_zone(
|
||||
jio_homepage_render_widget_zone(
|
||||
['home_bottom_content'],
|
||||
'aksrt-homepage__content-zone aksrt-homepage__content-zone--bottom'
|
||||
'jio-homepage__content-zone jio-homepage__content-zone--bottom'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php aksrt_homepage_render_sidebar(); ?>
|
||||
<?php jio_homepage_render_sidebar(); ?>
|
||||
</main>
|
||||
<?php
|
||||
aksrt_homepage_render_widget_zone(
|
||||
jio_homepage_render_widget_zone(
|
||||
['home_bottom_fluid'],
|
||||
'fluid-widget-wrap aksrt-homepage__fluid-zone aksrt-homepage__fluid-zone--bottom'
|
||||
'fluid-widget-wrap jio-homepage__fluid-zone jio-homepage__fluid-zone--bottom'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_homepage_get_tab_header_html')) {
|
||||
if (!function_exists('jio_homepage_get_tab_header_html')) {
|
||||
/**
|
||||
* legacy zib_index_tab_html:tab 导航 / 翻页标题条 / 空占位 三态。
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $tab_configs Configured term tabs.
|
||||
*/
|
||||
function aksrt_homepage_get_tab_header_html(array $tab_configs): string {
|
||||
$list_title = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::home_list_title()
|
||||
function jio_homepage_get_tab_header_html(array $tab_configs): string {
|
||||
$list_title = class_exists('\Jio\Settings\Settings')
|
||||
? \Jio\Settings\Settings::home_list_title()
|
||||
: '';
|
||||
$fallback_title = $list_title !== '' ? $list_title : __('最新发布', 'aksrt');
|
||||
$paged = aksrt_homepage_get_current_page();
|
||||
$fallback_title = $list_title !== '' ? $list_title : __('最新发布', 'jio');
|
||||
$paged = jio_homepage_get_current_page();
|
||||
|
||||
//不是第一页
|
||||
if ($paged > 1) {
|
||||
return '<div class="box-body notop nobottom"><div class="title-theme">' . $fallback_title
|
||||
. '<small class="ml10">' . esc_html(sprintf(__('第%s页', 'aksrt'), $paged)) . '</small></div></div>';
|
||||
. '<small class="ml10">' . esc_html(sprintf(__('第%s页', 'jio'), $paged)) . '</small></div></div>';
|
||||
}
|
||||
|
||||
$index_tab_nav = '';
|
||||
foreach ($tab_configs as $index => $tab_cfg) {
|
||||
$index_tab_nav .= '<li><a data-toggle="tab" data-ajax="' . esc_url(aksrt_homepage_get_tab_link($tab_cfg))
|
||||
$index_tab_nav .= '<li><a data-toggle="tab" data-ajax="' . esc_url(jio_homepage_get_tab_link($tab_cfg))
|
||||
. '" href="#index-tab-' . (int) $index . '">' . wp_kses_post($tab_cfg['title']) . '</a></li>';
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ if (!function_exists('aksrt_homepage_get_tab_header_html')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_homepage_get_tab_panes_html')) {
|
||||
if (!function_exists('jio_homepage_get_tab_panes_html')) {
|
||||
/**
|
||||
* legacy zib_index_tab('content'):每个栏目的原位刷新 pane。
|
||||
*
|
||||
@@ -115,18 +115,18 @@ if (!function_exists('aksrt_homepage_get_tab_panes_html')) {
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $tab_configs Configured term tabs.
|
||||
*/
|
||||
function aksrt_homepage_get_tab_panes_html(array $tab_configs): string {
|
||||
function jio_homepage_get_tab_panes_html(array $tab_configs): string {
|
||||
if (!$tab_configs) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$html = '';
|
||||
foreach ($tab_configs as $index => $tab_cfg) {
|
||||
$config = aksrt_archive_get_render_config(['context' => 'category', 'term_id' => (int) $tab_cfg['term_id']]);
|
||||
$config = jio_archive_get_render_config(['context' => 'category', 'term_id' => (int) $tab_cfg['term_id']]);
|
||||
$is_card = ($config['mode'] ?? 'list') === 'card';
|
||||
$placeholder = aksrt_render_placeholder($is_card ? 'card' : 'list', $is_card ? (wp_is_mobile() ? 4 : 12) : (wp_is_mobile() ? 4 : 6));
|
||||
$placeholder = jio_render_placeholder($is_card ? 'card' : 'list', $is_card ? (wp_is_mobile() ? 4 : 12) : (wp_is_mobile() ? 4 : 6));
|
||||
$html .= '<div class="ajaxpager tab-pane fade" id="index-tab-' . (int) $index . '">';
|
||||
$html .= '<span class="post_ajax_trigger"><a class="ajax_load ajax-next ajax-open" href="' . esc_url(aksrt_homepage_get_tab_link($tab_cfg)) . '"></a></span>';
|
||||
$html .= '<span class="post_ajax_trigger"><a class="ajax_load ajax-next ajax-open" href="' . esc_url(jio_homepage_get_tab_link($tab_cfg)) . '"></a></span>';
|
||||
$html .= '<div class="post_ajax_loader">' . $placeholder . '</div>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
@@ -135,13 +135,13 @@ if (!function_exists('aksrt_homepage_get_tab_panes_html')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_homepage_get_tab_link')) {
|
||||
if (!function_exists('jio_homepage_get_tab_link')) {
|
||||
/**
|
||||
* 栏目 tab 的加载链接:栏目页 + nofilter(抑制响应页的筛选菜单)。
|
||||
*
|
||||
* @param array<string, mixed> $tab_cfg Tab config with term and orderby.
|
||||
*/
|
||||
function aksrt_homepage_get_tab_link(array $tab_cfg): string {
|
||||
function jio_homepage_get_tab_link(array $tab_cfg): string {
|
||||
$term = $tab_cfg['term'] ?? null;
|
||||
if (!$term instanceof WP_Term) {
|
||||
return home_url('/');
|
||||
@@ -161,17 +161,17 @@ if (!function_exists('aksrt_homepage_get_tab_link')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('aksrt_render_fixed_homepage')) {
|
||||
if (!function_exists('jio_render_fixed_homepage')) {
|
||||
/**
|
||||
* Render the new fixed homepage layout.
|
||||
*/
|
||||
function aksrt_render_fixed_homepage(): bool {
|
||||
if (!aksrt_is_fixed_homepage_request()) {
|
||||
function jio_render_fixed_homepage(): bool {
|
||||
if (!jio_is_fixed_homepage_request()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
get_header();
|
||||
aksrt_homepage_render_layout();
|
||||
jio_homepage_render_layout();
|
||||
get_footer();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user