refactor: remove forum and topic feature chains

This commit is contained in:
2026-08-17 14:52:19 +08:00
parent 698e3750f9
commit 6c6c462df8
69 changed files with 339 additions and 2057 deletions
+1 -11
View File
@@ -605,7 +605,7 @@ if (!function_exists('aksrt_single_related_query_args')) :
];
}
} else {
// category (default): OR across category + tags + topics like Zibll.
// category (default): OR across category + tags.
$cat_ids = wp_get_post_terms($post_id, 'category', ['fields' => 'ids']);
if (!empty($cat_ids) && !is_wp_error($cat_ids)) {
$tax_query[] = [
@@ -622,16 +622,6 @@ if (!function_exists('aksrt_single_related_query_args')) :
'terms' => array_map('intval', $tag_ids),
];
}
if (taxonomy_exists('topics')) {
$topic_ids = wp_get_post_terms($post_id, 'topics', ['fields' => 'ids']);
if (!empty($topic_ids) && !is_wp_error($topic_ids)) {
$tax_query[] = [
'taxonomy' => 'topics',
'field' => 'term_id',
'terms' => array_map('intval', $topic_ids),
];
}
}
}
if (count($tax_query) > 1) {