refactor: remove forum and topic feature chains
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user