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

+3 -16
View File
@@ -175,7 +175,7 @@ endif;
if (!function_exists('aksrt_get_colored_term_tags')) :
/**
* Colored but-links for terms (Zibll cat/topics palette).
* Colored but-links for terms.
*
* @param WP_Term[] $terms Terms.
* @param string $class Base class.
@@ -207,22 +207,9 @@ endif;
if (!function_exists('aksrt_get_single_article_tags_html')) :
/**
* topics → categories → tags (Zibll footer order).
* Categories → tags.
*/
function aksrt_get_single_article_tags_html(int $post_id): string {
$topics_html = '';
if (taxonomy_exists('topics')) {
$topics = wp_get_post_terms($post_id, 'topics');
if (!is_wp_error($topics) && !empty($topics)) {
$topics_html = aksrt_get_colored_term_tags(
array_slice($topics, 0, 6),
'but ml6 radius',
'<i class="fa fa-cube" aria-hidden="true"></i> ',
['c-yellow', 'c-green', 'c-purple', 'c-red', 'c-blue']
);
}
}
$cats = get_the_category($post_id) ?: [];
$cat_html = aksrt_get_colored_term_tags(
$cats,
@@ -246,7 +233,7 @@ if (!function_exists('aksrt_get_single_article_tags_html')) :
}
}
$top = $topics_html . $cat_html;
$top = $cat_html;
if ($top === '' && $tags_html === '') {
return '';
}