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>
87 lines
3.1 KiB
PHP
87 lines
3.1 KiB
PHP
<?php
|
|
/**
|
|
* Category archive template.
|
|
*
|
|
* @package Jio
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
get_header();
|
|
|
|
$term = get_queried_object();
|
|
if (class_exists('\Jio\Core\DocsPresenter')) {
|
|
$docs_presenter = \Jio\Core\DocsPresenter::get_instance();
|
|
if ($term instanceof WP_Term && $term->taxonomy === 'category') {
|
|
$doc_candidates = get_posts([
|
|
'post_type' => 'page',
|
|
'post_status' => 'publish',
|
|
'posts_per_page' => 1,
|
|
'meta_key' => '_jio_doc_category',
|
|
'meta_value' => (string) $term->term_id,
|
|
'fields' => 'ids',
|
|
]);
|
|
if (!empty($doc_candidates)) {
|
|
get_template_part('templates/pages/page-documentnav');
|
|
get_footer();
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
if (!$term instanceof WP_Term) {
|
|
get_footer();
|
|
return;
|
|
}
|
|
|
|
$archive_settings = \Jio\Core\TermMeta::resolve_archive_settings($term);
|
|
$has_sidebar = jio_archive_has_sidebar(!empty($archive_settings['show_sidebar']));
|
|
$ajax_filter = !empty($archive_settings['filter_bar']);
|
|
$sort_state = jio_archive_get_sort_state((array) ($archive_settings['orderby_option'] ?? []));
|
|
$filter_groups = [];
|
|
foreach (['category' => __('分类', 'jio'), 'post_tag' => __('标签', 'jio')] as $taxonomy => $label) {
|
|
$key = $taxonomy === 'category' ? 'ajax_category' : 'ajax_tag';
|
|
if (!empty($archive_settings[$key . '_enabled'])) {
|
|
$group = jio_archive_build_term_filter_group($taxonomy, (array) $archive_settings[$key], $label);
|
|
if ($group) {
|
|
$filter_groups[] = $group;
|
|
}
|
|
}
|
|
}
|
|
if (!empty($archive_settings['custom_filter_enabled'])) {
|
|
$filter_groups = array_merge($filter_groups, jio_archive_build_custom_filter_groups(
|
|
(array) $archive_settings['custom_dimensions'], $archive_settings['custom_filter_keys']
|
|
));
|
|
}
|
|
jio_archive_open_shell([
|
|
'main_class' => 'site-main container', 'has_sidebar' => $has_sidebar,
|
|
'top_fluid' => ['cat_top_fluid'], 'page_kind' => 'category',
|
|
]);
|
|
jio_archive_render_widget_zone(['cat_top_content']);
|
|
jio_archive_render_term_header([
|
|
'header_style' => $archive_settings['header_style'],
|
|
'show_cover' => !empty($archive_settings['show_cover']),
|
|
'cover_url' => (string) $archive_settings['cover_url'],
|
|
'title' => single_cat_title('', false),
|
|
'description' => !empty($archive_settings['show_desc']) ? $archive_settings['description'] : '',
|
|
'post_count' => !empty($archive_settings['post_count']),
|
|
]);
|
|
ob_start();
|
|
if ($ajax_filter) {
|
|
jio_archive_render_filter_bar([
|
|
'aria_label' => __('分类筛选', 'jio'), 'groups' => $filter_groups,
|
|
'sort_enabled' => !empty($archive_settings['orderby_enabled']),
|
|
'sort_current' => $sort_state['current'], 'sort_links' => $sort_state['links'],
|
|
'sort_labels' => \Jio\Settings\Settings::homepage_sort_labels(),
|
|
'sort_option' => (array) $archive_settings['orderby_option'],
|
|
]);
|
|
}
|
|
$filter_html = (string) ob_get_clean();
|
|
jio_archive_render_stream(null, jio_archive_get_render_config(['context' => 'category']), [
|
|
'page_kind' => 'category', 'query_context' => 'archive',
|
|
'empty_text' => __('暂无内容', 'jio'),
|
|
'filter_html' => $filter_html,
|
|
]);
|
|
jio_archive_render_widget_zone(['cat_bottom_content']);
|
|
jio_archive_close_shell(['has_sidebar' => $has_sidebar, 'bottom_fluid' => ['cat_bottom_fluid']]);
|
|
get_footer();
|