PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.8.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.8.2
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 3.5.0 3.5.1 All 200 releases
betterdocs / views / templates / sidebars / sidebar-right.php

sidebar-right.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 3.8.2, at views/templates/sidebars/sidebar-right.php

53 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <aside id="betterdocs-sidebar-right" class="betterdocs-sidebar betterdocs-full-sidebar-right right-sidebar-toc-wrap">
2 <div data-simplebar class="layout3-toc-container right-sidebar-toc-container">
3 <?php
4 $hierarchy = betterdocs()->settings->get( 'toc_hierarchy' );
5 $list_number = betterdocs()->settings->get( 'toc_list_number' );
6 $supported_tag = betterdocs()->settings->get( 'supported_heading_tag' );
7 $htags = $supported_tag ? implode( ',', $supported_tag ) : '';
8
9 $attributes = betterdocs()->template_helper->get_html_attributes( [
10 'htags' => "{$htags}",
11 'hierarchy' => "{$hierarchy}",
12 'list_number' => "{$list_number}",
13 'collapsible_on_mobile' => false
14 ] );
15
16 echo do_shortcode( "[betterdocs_toc " . $attributes . "]" );
17
18 if ( isset( $social_share ) && $social_share ) {
19 echo betterdocs()->views->get( 'templates/parts/social-2' );
20 }
21
22 if ( isset( $feedback ) && $feedback ) {
23 $reaction_text = betterdocs()->customizer->defaults->get( 'betterdocs_post_reactions_text_2' );
24 // Collect reaction values and icons
25 $reactions_data = [
26 'happy' => 'betterdocs_post_reactions_happy',
27 'happy_icon' => 'betterdocs_post_reactions_happy_icon',
28 'normal' => 'betterdocs_post_reactions_normal',
29 'normal_icon' => 'betterdocs_post_reactions_normal_icon',
30 'sad' => 'betterdocs_post_reactions_sad',
31 'sad_icon' => 'betterdocs_post_reactions_sad_icon'
32 ];
33
34 foreach ( $reactions_data as $key => $theme_mod ) {
35 $value = betterdocs()->customizer->defaults->get($theme_mod);
36 if ( $value ) {
37 $args[$key] = $value;
38 } else {
39 $args[$key] = false;
40 }
41 }
42
43 // Build the attribute string for the shortcode
44 $attr = '';
45 foreach ( $args as $key => $value ) {
46 $attr .= sprintf(' %s="%s"', esc_attr($key), esc_attr($value));
47 }
48 echo do_shortcode( '[betterdocs_article_reactions text="'.$reaction_text.'" layout="layout-3"' . $attr . ']' );
49 }
50 ?>
51 </div>
52 </aside>
53