PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.6.1
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.6.1
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 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / views / widgets / archive-header.php

archive-header.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.6.1, at views/widgets/archive-header.php

53 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- view template receives variables via extract(); prefixing is impractical.
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7 if ( ! isset( $current_category ) ) {
8 return;
9 }
10
11 $count_suffix_singular = betterdocs()->settings->get( 'count_text_singular' );
12 $count_suffix = betterdocs()->settings->get( 'count_text' );
13 $_counts = [
14 'counts' => $found_posts,
15 'prefix' => ! empty( $count_prefix ) ? $count_prefix : '',
16 'suffix' => ! empty( $count_suffix ) ? $count_suffix : '',
17 'suffix_singular' => ! empty( $count_suffix_singular ) ? $count_suffix_singular : ''
18 ];
19 ?>
20
21 <div class="<?php echo esc_attr( $blockId ); ?> betterdocs-main-category-folder">
22 <div class="betterdocs-category-header">
23 <div class="betterdocs-category-header-inner">
24 <?php
25 $view_object->get(
26 'template-parts/category-icon',
27 [
28 'show_icon' => $show_icon,
29 'category_icon' => 'folder-open',
30 'term_id' => isset( $current_category->term_id ) ? $current_category->term_id : ''
31 ]
32 );
33
34 $view_object->get(
35 'template-parts/category-title',
36 [
37 'title' => isset( $current_category->name ) ? $current_category->name : '',
38 'tag' => $title_tag
39 ]
40 );
41
42 $view_object->get(
43 'template-parts/sub-category-counter',
44 [
45 'show_count' => $show_count,
46 'counts' => $_counts
47 ]
48 );
49 ?>
50 </div>
51 </div>
52 </div>
53