fix(theme): align reference layouts and restore passing contracts

Align homepage and category discovery, modern widgets, admin controls, quotes, and comments with the reference theme. Remove superseded paths and add rendering and behavior coverage. Update stale asset and finance contracts; all 760 Node tests and 139 widget assertions pass.
This commit is contained in:
kate522 committed 2026-10-29 19:16:03 +08:00
1 parent b520d29368
commit 8aa116ec43
63 files changed
+1985 -2304

No files matched your search

+5 -11
View File
@@ -43,13 +43,13 @@ $render_config = function_exists('aksrt_archive_get_render_config')
$filter_groups = [];
if (!empty($archive_settings['ajax_category_enabled']) && function_exists('aksrt_archive_build_term_filter_group')) {
$group = aksrt_archive_build_term_filter_group('category', (array) ($archive_settings['ajax_category'] ?? []), __('分类', 'aksrt'), $ajax_filter);
$group = aksrt_archive_build_term_filter_group('category', (array) ($archive_settings['ajax_category'] ?? []), __('分类', 'aksrt'));
if ($group !== []) {
$filter_groups[] = $group;
}
}
if (!empty($archive_settings['ajax_tag_enabled']) && function_exists('aksrt_archive_build_term_filter_group')) {
$group = aksrt_archive_build_term_filter_group('post_tag', (array) ($archive_settings['ajax_tag'] ?? []), __('标签', 'aksrt'), $ajax_filter);
$group = aksrt_archive_build_term_filter_group('post_tag', (array) ($archive_settings['ajax_tag'] ?? []), __('标签', 'aksrt'));
if ($group !== []) {
$filter_groups[] = $group;
}
@@ -59,8 +59,7 @@ if (!empty($archive_settings['custom_filter_enabled']) && function_exists('aksrt
$filter_groups,
aksrt_archive_build_custom_filter_groups(
(array) ($archive_settings['custom_dimensions'] ?? []),
$archive_settings['custom_filter_keys'] ?? 'all',
$ajax_filter
$archive_settings['custom_filter_keys'] ?? 'all'
)
);
}
@@ -85,7 +84,7 @@ if (function_exists('aksrt_archive_open_shell')) {
'header_style' => $header_style,
'show_cover' => !empty($archive_settings['show_cover']),
'cover_url' => (string) ($archive_settings['cover_url'] ?? ''),
'eyebrow' => __('标签归档', 'aksrt'),
'post_count' => !empty($archive_settings['post_count']),
'title' => single_tag_title('', false),
'description' => $description,
'admin_path' => 'page-display/tag',
@@ -97,17 +96,13 @@ if (function_exists('aksrt_archive_open_shell')) {
<?php
if (!empty($archive_settings['filter_bar']) && function_exists('aksrt_archive_render_filter_bar')) {
aksrt_archive_render_filter_bar([
'ajax' => $ajax_filter,
'ajax_archive' => 'tag',
'term_id' => (int) $term->term_id,
'aria_label' => __('标签工具条', 'aksrt'),
'meta_text' => !empty($archive_settings['post_count']) ? sprintf(_n('%d 篇文章', '%d 篇文章', (int) $term->count, 'aksrt'), (int) $term->count) : '',
'groups' => $filter_groups,
'sort_enabled' => !empty($archive_settings['orderby_enabled']),
'sort_current' => $current_sort,
'sort_links' => $sort_links,
'sort_labels' => class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::homepage_sort_labels() : [],
'sort_as_main' => true,
'sort_option' => (array) $archive_settings['orderby_option'],
]);
}
?>
@@ -119,7 +114,6 @@ if (function_exists('aksrt_archive_open_shell')) {
'query_context' => 'archive',
'stream_class' => 'archive__ajax-wrap content-stream--archive content-stream--tag',
'empty_text' => __('该标签下暂无文章', 'aksrt'),
'ajax_enabled' => $ajax_filter,
]);
}
?>