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:
1 parent
b520d29368
commit
8aa116ec43
63 files changed
+1985
-2304
No files matched your search
+6
-14
@@ -96,7 +96,11 @@ class TermMeta {
|
||||
|
||||
$cover_url = isset($saved['cover_url']) ? esc_url_raw((string) $saved['cover_url']) : '';
|
||||
if ($cover_url === '' && !empty($global['cover_enabled'])) {
|
||||
$cover_url = esc_url_raw((string) ($global['default_cover'] ?? ''));
|
||||
$cover_id = (int) get_term_meta($term->term_id, 'aksrt_category_cover_id', true);
|
||||
$cover_url = $cover_id > 0 ? (string) wp_get_attachment_url($cover_id) : '';
|
||||
if ($cover_url === '') {
|
||||
$cover_url = esc_url_raw((string) ($global['default_cover'] ?? ''));
|
||||
}
|
||||
}
|
||||
|
||||
$description = isset($saved['description']) ? sanitize_textarea_field((string) $saved['description']) : '';
|
||||
@@ -138,7 +142,7 @@ class TermMeta {
|
||||
'taxonomy' => $taxonomy,
|
||||
'header_style' => $header_style,
|
||||
'show_sidebar' => $sidebar_enabled,
|
||||
'show_cover' => $header_style === 'cover' && !empty($global['cover_enabled']) && $cover_url !== '',
|
||||
'show_cover' => $header_style === 'cover' && !empty($global['cover_enabled']),
|
||||
'show_desc' => $taxonomy === 'post_tag' ? $description !== '' : (!empty($global['desc_enabled']) && $description !== ''),
|
||||
'filter_bar' => !empty($global['filter_bar']) || $ajax_category_enabled || $ajax_tag_enabled || $orderby_enabled || !empty($custom_filter['custom_enabled']),
|
||||
'post_count' => !empty($global['post_count']),
|
||||
@@ -198,18 +202,6 @@ class TermMeta {
|
||||
$query->set('posts_per_page', (int) $settings['per_page']);
|
||||
}
|
||||
|
||||
$tax_query = is_array($query->get('tax_query')) ? $query->get('tax_query') : [];
|
||||
$filter_cat = isset($_GET['aksrt_filter_cat']) ? absint(wp_unslash($_GET['aksrt_filter_cat'])) : 0;
|
||||
$filter_tag = isset($_GET['aksrt_filter_tag']) ? absint(wp_unslash($_GET['aksrt_filter_tag'])) : 0;
|
||||
if ($filter_cat > 0) {
|
||||
$tax_query[] = ['taxonomy' => 'category', 'field' => 'term_id', 'terms' => [$filter_cat]];
|
||||
}
|
||||
if ($filter_tag > 0) {
|
||||
$tax_query[] = ['taxonomy' => 'post_tag', 'field' => 'term_id', 'terms' => [$filter_tag]];
|
||||
}
|
||||
if ($tax_query !== []) {
|
||||
$query->set('tax_query', $tax_query);
|
||||
}
|
||||
|
||||
// 自定义高级筛选维度 meta 过滤(参考主题 zib_sift_posts_per_page:meta_query LIKE;
|
||||
// meta 值为序列化数组,用带引号精确匹配避免前缀误命中)。
|
||||
|
||||
Reference in new issue
Block a user