Files
kate522andClaude Opus 5 35bb96e82f 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>
2026-11-01 20:05:04 +08:00

132 lines
4.8 KiB
PHP

<?php
/**
* Tag archive template.
*
* @package Jio
*/
defined('ABSPATH') || exit;
get_header();
$term = get_queried_object();
if (!$term instanceof WP_Term) {
get_footer();
return;
}
$archive_settings = class_exists('\Jio\Core\TermMeta')
? \Jio\Core\TermMeta::resolve_archive_settings($term)
: [
'header_style' => 'simple',
'show_sidebar' => true,
'show_cover' => false,
'show_desc' => !empty($term->description),
'cover_url' => '',
'description' => (string) $term->description,
];
$has_sidebar = function_exists('jio_archive_has_sidebar')
? jio_archive_has_sidebar(!empty($archive_settings['show_sidebar']))
: (!empty($archive_settings['show_sidebar']) && is_active_sidebar('tag_sidebar'));
$description = !empty($archive_settings['show_desc']) ? wp_kses_post((string) $archive_settings['description']) : '';
$header_style = (string) $archive_settings['header_style'];
$ajax_filter = !empty($archive_settings['filter_bar']);
$sort_state = function_exists('jio_archive_get_sort_state')
? jio_archive_get_sort_state((array) ($archive_settings['orderby_option'] ?? []))
: ['current' => 'date', 'links' => []];
$current_sort = $sort_state['current'];
$sort_links = $sort_state['links'];
$render_config = function_exists('jio_archive_get_render_config')
? jio_archive_get_render_config(['context' => 'tag'])
: ['context' => 'tag'];
$filter_groups = [];
if (!empty($archive_settings['ajax_category_enabled']) && function_exists('jio_archive_build_term_filter_group')) {
$group = jio_archive_build_term_filter_group('category', (array) ($archive_settings['ajax_category'] ?? []), __('分类', 'jio'));
if ($group !== []) {
$filter_groups[] = $group;
}
}
if (!empty($archive_settings['ajax_tag_enabled']) && function_exists('jio_archive_build_term_filter_group')) {
$group = jio_archive_build_term_filter_group('post_tag', (array) ($archive_settings['ajax_tag'] ?? []), __('标签', 'jio'));
if ($group !== []) {
$filter_groups[] = $group;
}
}
if (!empty($archive_settings['custom_filter_enabled']) && function_exists('jio_archive_build_custom_filter_groups')) {
$filter_groups = array_merge(
$filter_groups,
jio_archive_build_custom_filter_groups(
(array) ($archive_settings['custom_dimensions'] ?? []),
$archive_settings['custom_filter_keys'] ?? 'all'
)
);
}
if (function_exists('jio_archive_open_shell')) {
jio_archive_open_shell([
'main_class' => 'site-main container',
'has_sidebar' => $has_sidebar,
'top_fluid' => ['tag_top_fluid'],
'page_kind' => 'tag',
]);
}
?>
<?php if (function_exists('jio_archive_render_widget_zone')) { jio_archive_render_widget_zone(['tag_top_content']); } elseif (is_active_sidebar('tag_top_content')) { dynamic_sidebar('tag_top_content'); } ?>
<div class="content-main content-main--archive content-main--tag">
<?php if (function_exists('jio_breadcrumbs')) { jio_breadcrumbs(); } ?>
<?php
if (function_exists('jio_archive_render_term_header')) {
jio_archive_render_term_header([
'header_style' => $header_style,
'show_cover' => !empty($archive_settings['show_cover']),
'cover_url' => (string) ($archive_settings['cover_url'] ?? ''),
'post_count' => !empty($archive_settings['post_count']),
'title' => single_tag_title('', false),
'description' => $description,
'admin_path' => 'page-display/tag',
'admin_label' => __('标签页设置', 'jio'),
]);
}
?>
<?php
if (!empty($archive_settings['filter_bar']) && function_exists('jio_archive_render_filter_bar')) {
jio_archive_render_filter_bar([
'aria_label' => __('标签工具条', 'jio'),
'groups' => $filter_groups,
'sort_enabled' => !empty($archive_settings['orderby_enabled']),
'sort_current' => $current_sort,
'sort_links' => $sort_links,
'sort_labels' => class_exists('\Jio\Settings\Settings') ? \Jio\Settings\Settings::homepage_sort_labels() : [],
'sort_option' => (array) $archive_settings['orderby_option'],
]);
}
?>
<?php
if (function_exists('jio_archive_render_stream')) {
jio_archive_render_stream(null, $render_config, [
'page_kind' => 'tag',
'query_context' => 'archive',
'stream_class' => 'archive__ajax-wrap content-stream--archive content-stream--tag',
'empty_text' => __('该标签下暂无文章', 'jio'),
]);
}
?>
<?php if (function_exists('jio_archive_render_widget_zone')) { jio_archive_render_widget_zone(['tag_bottom_content']); } elseif (is_active_sidebar('tag_bottom_content')) { dynamic_sidebar('tag_bottom_content'); } ?>
</div>
<?php
if (function_exists('jio_archive_close_shell')) {
jio_archive_close_shell([
'has_sidebar' => $has_sidebar,
'bottom_fluid' => ['tag_bottom_fluid'],
]);
}
get_footer();