feat(frontend): replace article system with Zibll 9.0

This commit is contained in:
2026-08-18 16:06:47 +08:00
parent 2881c69e9c
commit 0f2ac6c34a
69 changed files with 2603 additions and 4163 deletions
+3 -20
View File
@@ -18,14 +18,12 @@ if (!$term instanceof WP_Term) {
$archive_settings = class_exists('\AKSRT\Core\TermMeta')
? \AKSRT\Core\TermMeta::resolve_archive_settings($term)
: [
'layout_mode' => 'card',
'header_style' => 'simple',
'show_sidebar' => true,
'show_cover' => false,
'show_desc' => !empty($term->description),
'cover_url' => '',
'description' => (string) $term->description,
'card_style' => 'standard',
];
$has_sidebar = function_exists('aksrt_archive_has_sidebar')
@@ -33,8 +31,6 @@ $has_sidebar = function_exists('aksrt_archive_has_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'];
$layout_mode = (string) $archive_settings['layout_mode'];
$card_style = (string) ($archive_settings['card_style'] ?? 'standard');
$filter_settings = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::get_post_filter_settings()
: ['enabled' => false, 'sort' => false, 'ajax_enabled' => false];
@@ -45,20 +41,9 @@ $ajax_filter = !empty($filter_settings['ajax_enabled']) && !empty($filter_settin
$sort_state = function_exists('aksrt_archive_get_sort_state') ? aksrt_archive_get_sort_state() : ['current' => 'latest', 'links' => []];
$current_sort = $sort_state['current'];
$sort_links = $sort_state['links'];
$render_overrides = [
'context' => 'tag',
];
// Term meta layout_mode is authoritative only when explicitly set (non-empty preset).
$layout_preset = (string) ($archive_settings['layout_preset'] ?? '');
if ($layout_preset !== '' && in_array((string) $layout_mode, ['list', 'card', 'mini', 'grid-cms'], true)) {
$render_overrides['mode'] = (string) $layout_mode;
if (!empty($card_style)) {
$render_overrides['card_style'] = (string) $card_style;
}
}
$render_config = function_exists('aksrt_archive_get_render_config')
? aksrt_archive_get_render_config($render_overrides)
: array_merge(['context' => 'tag', 'mode' => 'list'], $render_overrides);
$render_config = function_exists('aksrt_archive_get_render_config')
? aksrt_archive_get_render_config(['context' => 'tag'])
: ['context' => 'tag'];
$cat_filter_terms = [];
$current_filter_cat = sanitize_text_field((string) get_query_var('aksrt_filter_cat', ''));
@@ -132,8 +117,6 @@ if (function_exists('aksrt_archive_open_shell')) {
'ajax' => $ajax_filter,
'ajax_archive' => 'tag',
'term_id' => (int) $term->term_id,
'layout_mode' => $layout_mode,
'card_style' => $card_style,
'aria_label' => __('标签工具条', 'aksrt'),
'meta_text' => sprintf(_n('%d 篇文章', '%d 篇文章', (int) $term->count, 'aksrt'), (int) $term->count),
'groups' => $filter_groups,