| 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 |
|