PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.3.4
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.3.4
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 / Editors / Elementor / Widget / Navigation.php

Navigation.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 3.3.4, at includes/Editors/Elementor/Widget/Navigation.php

119 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace WPDeveloper\BetterDocs\Editors\Elementor\Widget;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly
6 }
7
8 use Elementor\Controls_Manager;
9 use Elementor\Group_Control_Typography;
10 use WPDeveloper\BetterDocs\Editors\Elementor\BaseWidget;
11
12 class Navigation extends BaseWidget {
13
14 public function get_name() {
15 return 'betterdocs-navigation';
16 }
17
18 public function get_title() {
19 return __( 'Doc Navigation', 'betterdocs' );
20 }
21
22 public function get_icon() {
23 return 'betterdocs-icon-Navigation';
24 }
25
26 public function get_categories() {
27 return ['betterdocs-elements-single'];
28 }
29
30 public function get_keywords() {
31 return ['betterdocs-elements', 'navigation', 'betterdocs', 'docs'];
32 }
33
34 public function get_style_depends() {
35 return ['betterdocs-el-navigation'];
36 }
37
38 public function get_custom_help_url() {
39 return 'https://betterdocs.co/docs/single-doc-in-elementor';
40 }
41
42 protected function register_controls() {
43
44 $this->start_controls_section(
45 'section_column_settings',
46 [
47 'label' => __( 'Style', 'betterdocs' ),
48 'tab' => Controls_Manager::TAB_STYLE
49 ]
50 );
51
52 $this->add_control(
53 'navigation_text_color',
54 [
55 'label' => esc_html__( 'Color', 'betterdocs' ),
56 'type' => Controls_Manager::COLOR,
57 'selectors' => [
58 '{{WRAPPER}} .docs-navigation a' => 'color: {{VALUE}};'
59 ]
60 ]
61 );
62
63 $this->add_group_control(
64 Group_Control_Typography::get_type(),
65 [
66 'name' => 'navigation_text_typography',
67 'selector' => '{{WRAPPER}} .docs-navigation a'
68 ]
69 );
70
71 $this->add_control(
72 'navigation_arrow_size',
73 [
74 'label' => __( 'Size', 'betterdocs' ),
75 'type' => Controls_Manager::SLIDER,
76 'default' => [
77 'unit' => 'px',
78 'size' => 35
79 ],
80 'size_units' => ['px'],
81 'range' => [
82 'px' => [
83 'max' => 500,
84 'step' => 1
85 ]
86 ],
87 'selectors' => [
88 '{{WRAPPER}} .docs-navigation svg' => 'width: {{SIZE}}px;height: {{SIZE}}px;'
89 ]
90 ]
91 );
92
93 $this->add_control(
94 'navigation_arrow_color',
95 [
96 'label' => esc_html__( 'Arrow Color', 'betterdocs' ),
97 'type' => Controls_Manager::COLOR,
98 'selectors' => [
99 '{{WRAPPER}} .docs-navigation svg' => 'fill: {{VALUE}};'
100 ]
101 ]
102 );
103
104 $this->end_controls_section();
105 }
106
107 protected function render_callback() {
108 $this->views( 'templates/parts/navigation' );
109 }
110
111 public function view_params() {
112 return [
113 'wrapper_attr' => [
114 'class' => ['betterdocs-elementor-navigation']
115 ]
116 ];
117 }
118 }
119