PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 2.0.1
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v2.0.1
4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 All 202 releases
betterdocs / includes / gutenberg / template / category-box / Layout_Default.php

Layout_Default.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 2.0.1, at includes/gutenberg/template/category-box/Layout_Default.php

40 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Template Name: Default
5 *
6 */
7
8
9 $term_permalink = BetterDocs_Helper::term_permalink('doc_category', $term->slug);
10
11 $html .= '<a href="' . $term_permalink . '" class="el-betterdocs-category-box-post">
12 <div class="el-betterdocs-cb-inner">';
13
14 if ($showIcon) {
15 $cat_icon_id = get_term_meta($term->term_id, 'doc_category_image-id', true);
16
17 if ($cat_icon_id) {
18 $cat_icon = wp_get_attachment_image($cat_icon_id, 'thumbnail', ['alt' => esc_attr(get_post_meta($cat_icon_id, '_wp_attachment_image_alt', true))]);
19 } else {
20 $cat_icon = '<img src="' . BETTERDOCS_ADMIN_URL . 'assets/img/betterdocs-cat-icon.svg" alt="betterdocs-category-box-icon">';
21 }
22
23 $html .= '<div class="el-betterdocs-cb-cat-icon">' . $cat_icon . '</div>';
24 }
25
26 if ($showTitle) {
27 $html .= '<' . $titleTag . ' class="el-betterdocs-cb-cat-title">' . $term->name . '</' . $titleTag . '>';
28 }
29
30 if ($showCount) {
31 if ($term_count == 1) {
32 $html .= '<div class="el-betterdocs-cb-cat-count"><span class="count-prefix">'.$prefix.'</span>'.$term_count.'<span class="count-suffix">'.$suffixSingular.'</span></div>';
33 } else {
34 $html .= '<div class="el-betterdocs-cb-cat-count"><span class="count-prefix">'.$prefix.'</span>'.$term_count.'<span class="count-suffix">'.$suffix.'</span></div>';
35 }
36 }
37
38 $html .= '</div>
39 </a>';
40