refactor: remove forum and topic feature chains
This commit is contained in:
@@ -41,7 +41,7 @@ class PostDisplay {
|
||||
|
||||
$sticky_pages_raw = $settings['sticky_s'] ?? null;
|
||||
if (is_array($sticky_pages_raw)) {
|
||||
$allowed_pages = ['home', 'cat', 'tag', 'topics'];
|
||||
$allowed_pages = ['home', 'cat', 'tag'];
|
||||
$sticky_pages = array_values(array_intersect(array_map('sanitize_key', $sticky_pages_raw), $allowed_pages));
|
||||
} else {
|
||||
$sticky_pages = ['home', 'cat'];
|
||||
@@ -49,10 +49,10 @@ class PostDisplay {
|
||||
|
||||
$badge_types_raw = $settings['list_badge_show'] ?? null;
|
||||
if (is_array($badge_types_raw)) {
|
||||
$allowed_types = ['pay', 'cat', 'topics', 'tag'];
|
||||
$allowed_types = ['pay', 'cat', 'tag'];
|
||||
$badge_types = array_values(array_intersect(array_map('sanitize_key', $badge_types_raw), $allowed_types));
|
||||
} else {
|
||||
$badge_types = ['pay', 'cat', 'topics', 'tag'];
|
||||
$badge_types = ['pay', 'cat', 'tag'];
|
||||
}
|
||||
|
||||
$show_author = array_key_exists('post_list_author', $settings)
|
||||
@@ -139,7 +139,6 @@ class PostDisplay {
|
||||
'card_cat' => !empty($card_cat_ids),
|
||||
'card_cat_ids' => $card_cat_ids,
|
||||
'card_tag' => !empty($settings['list_card_tag']),
|
||||
'card_topics' => !empty($settings['list_card_topics']),
|
||||
'card_author' => !empty($settings['list_card_author']),
|
||||
];
|
||||
}
|
||||
@@ -200,8 +199,6 @@ class PostDisplay {
|
||||
'cat_show_tag' => !empty($settings['filter_cat_show_tag']),
|
||||
'tag_show_cat' => !isset($settings['filter_tag_show_cat']) || !empty($settings['filter_tag_show_cat']),
|
||||
'tag_show_tag' => !empty($settings['filter_tag_show_tag']),
|
||||
'topics_show_cat' => !isset($settings['filter_topics_show_cat']) || !empty($settings['filter_topics_show_cat']),
|
||||
'topics_show_tag' => !empty($settings['filter_topics_show_tag']),
|
||||
'custom_filter_show' => is_array($settings['custom_filter_show'] ?? null) ? array_map('sanitize_key', $settings['custom_filter_show']) : ['cat', 'tag'],
|
||||
'custom_filter' => self::sanitize_custom_filter_defs($settings['custom_filter'] ?? []),
|
||||
'cat_custom_filter' => self::sanitize_cat_custom_filter($settings['cat_custom_filter'] ?? []),
|
||||
@@ -219,7 +216,6 @@ class PostDisplay {
|
||||
'cats' => [],
|
||||
'cat_s' => $cfg['cat_show_cat'],
|
||||
'tag_s' => $cfg['cat_show_tag'],
|
||||
'topics_s' => false,
|
||||
'orderby_s' => $cfg['sort'],
|
||||
'custom_filters' => [],
|
||||
];
|
||||
@@ -435,7 +431,6 @@ class PostDisplay {
|
||||
'pay_vip_price_s' => !isset($settings['post_article_pay_vip_price_s']) || !empty($settings['post_article_pay_vip_price_s']),
|
||||
'pay_vip_1_discount' => max(0, min(100, (int) ($settings['post_article_pay_vip_1_discount'] ?? 80))),
|
||||
'pay_vip_2_discount' => max(0, min(100, (int) ($settings['post_article_pay_vip_2_discount'] ?? 50))),
|
||||
'topics_s' => !empty($settings['post_article_topics_s']),
|
||||
'custom_filter_s' => !isset($settings['post_article_custom_filter_s']) || !empty($settings['post_article_custom_filter_s']),
|
||||
];
|
||||
}
|
||||
@@ -660,7 +655,6 @@ class PostDisplay {
|
||||
'cats' => $cats,
|
||||
'cat_s' => !isset($item['cat_s']) || !empty($item['cat_s']),
|
||||
'tag_s' => !empty($item['tag_s']),
|
||||
'topics_s' => !empty($item['topics_s']),
|
||||
'orderby_s' => !isset($item['orderby_s']) || !empty($item['orderby_s']),
|
||||
'custom_filters' => $filters,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user