PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.0
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.0
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 / includes / Shortcodes / FaqTab.php

FaqTab.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.2.0, at includes/Shortcodes/FaqTab.php

31 lines 1014 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDeveloper\BetterDocs\Shortcodes;
4
5 use WPDeveloper\BetterDocs\Shortcodes\FaqLayoutThree;
6
7 class FaqTab extends FaqLayoutThree {
8 protected $layout = 'layout-4';
9
10 public function get_name() {
11 return 'betterdocs_faq_tab';
12 }
13
14 public function render( $atts, $content = null ) {
15
16 $this->icon_position = isset( $this->atts['button_icon_position'] ) ? $this->atts['button_icon_position'] : '';
17
18 if ( $this->attributes['is_gutenberg'] && $this->attributes['button_icon_position'] == 'before' && $this->attributes['show_button_icon'] ) {
19 add_action( 'betterdocs_faq_post_before', [ $this, 'icons' ] );
20 } elseif ( $this->attributes['is_gutenberg'] && $this->attributes['button_icon_position'] == 'after' && $this->attributes['show_button_icon'] ) {
21 add_action( 'betterdocs_faq_post_after', [ $this, 'icons' ] );
22 } else {
23 add_action( $this->icon_hook, [ $this, 'icons' ] );
24 }
25
26 $this->views( 'shortcodes/faq-tab' );
27
28 remove_action( $this->icon_hook, [ $this, 'icons' ] );
29 }
30 }
31