PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.8.9
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.8.9
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.9, at views/templates/sidebars/sidebar-right.php

55 lines 2.1 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 [
11 'htags' => "{$htags}",
12 'hierarchy' => "{$hierarchy}",
13 'list_number' => "{$list_number}",
14 'collapsible_on_mobile' => false
15 ]
16 );
17
18 echo do_shortcode( '[betterdocs_toc ' . $attributes . ']' );
19
20 if ( isset( $social_share ) && $social_share ) {
21 echo betterdocs()->views->get( 'templates/parts/social-2' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
22 }
23
24 if ( isset( $feedback ) && $feedback ) {
25 $reaction_text = betterdocs()->customizer->defaults->get( 'betterdocs_post_reactions_text_2' );
26 // Collect reaction values and icons
27 $reactions_data = [
28 'happy' => 'betterdocs_post_reactions_happy',
29 'happy_icon' => 'betterdocs_post_reactions_happy_icon',
30 'normal' => 'betterdocs_post_reactions_normal',
31 'normal_icon' => 'betterdocs_post_reactions_normal_icon',
32 'sad' => 'betterdocs_post_reactions_sad',
33 'sad_icon' => 'betterdocs_post_reactions_sad_icon'
34 ];
35
36 foreach ( $reactions_data as $key => $theme_mod ) {
37 $value = betterdocs()->customizer->defaults->get( $theme_mod );
38 if ( $value ) {
39 $args[ $key ] = $value;
40 } else {
41 $args[ $key ] = false;
42 }
43 }
44
45 // Build the attribute string for the shortcode
46 $attr = '';
47 foreach ( $args as $key => $value ) {
48 $attr .= sprintf( ' %s="%s"', esc_attr( $key ), esc_attr( $value ) );
49 }
50 echo do_shortcode( '[betterdocs_article_reactions text="' . $reaction_text . '" layout="layout-3"' . $attr . ']' );
51 }
52 ?>
53 </div>
54 </aside>
55