refactor: remove forum and topic feature chains

This commit is contained in:
kate522 committed 2026-08-17 14:52:19 +08:00
1 parent 698e3750f9
commit 6c6c462df8
69 files changed
+339 -2057

No files matched your search

+1 -1
View File
@@ -63,7 +63,7 @@ if (!function_exists('aksrt_homepage_get_tab_query')) {
$term = get_term($term_id);
$taxonomy = ($term && !is_wp_error($term)) ? (string) $term->taxonomy : 'category';
if (!in_array($taxonomy, ['category', 'topics'], true)) {
if ($taxonomy !== 'category') {
$taxonomy = 'category';
}
@@ -16,7 +16,6 @@ if (!function_exists('aksrt_header_components_page_type_keys')) {
function aksrt_header_components_page_type_keys(): array {
return [
'home',
'topics',
'category',
'tag',
'author',
@@ -68,11 +67,6 @@ if (!function_exists('aksrt_header_slide_match_page_type')) {
$post_type = (string) $raw_post_type;
}
// Special keys that are not plain is_{$type} flags.
if ($type === 'topics') {
return is_tax('topics');
}
// Generic WP_Query is_* flags (home/category/tag/author/single/search/page).
$query_flag = 'is_' . $type;
if (empty($wp_query->{$query_flag})) {