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_2.php

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

35 lines 1.1 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: Layout 2
5 *
6 */
7
8 $term_permalink = BetterDocs_Helper::term_permalink('doc_category', $term->slug);
9
10 $html .= '<a href="' . $term_permalink . '" class="el-betterdocs-category-box-post layout__2">';
11 $html .= '<div class="el-betterdocs-cb-inner">';
12
13 if ($showIcon) {
14 $cat_icon_id = get_term_meta($term->term_id, 'doc_category_image-id', true);
15
16 if ($cat_icon_id) {
17 $cat_icon = wp_get_attachment_image($cat_icon_id, 'thumbnail', ['alt' => esc_attr(get_post_meta($cat_icon_id, '_wp_attachment_image_alt', true))]);
18 } else {
19 $cat_icon = '<img src="' . BETTERDOCS_ADMIN_URL . 'assets/img/betterdocs-cat-icon.svg" alt="betterdocs-category-box-icon">';
20 }
21
22 $html .= '<div class="el-betterdocs-cb-cat-icon__layout-2">' . $cat_icon . '</div>';
23 }
24
25 if ($showTitle) {
26 $html .= '<' . $titleTag . ' class="el-betterdocs-cb-cat-title__layout-2"><span>' . $term->name . '</span></' . $titleTag . '>';
27 }
28
29 if ($showCount) {
30 $html .= '<div class="el-betterdocs-cb-cat-count__layout-2"><span class="count-inner__layout-2">' . $term_count . '</span></div>';
31 }
32
33 $html .= '</div>';
34 $html .= '</a>';
35