PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.4.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.4.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 3.5.2 All 199 releases
betterdocs / includes / Editors / Elementor / Widget / DocDate.php

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

105 lines 3.0 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 DocDate extends BaseWidget {
13 public $view_wrapper = 'betterdocs-updated-date-wrapper update-date';
14
15 public function get_name() {
16 return 'betterdocs-doc-date';
17 }
18
19 public function get_title() {
20 return __( 'Doc Date', 'betterdocs' );
21 }
22
23 public function get_icon() {
24 return 'betterdocs-icon-date';
25 }
26
27 public function get_categories() {
28 return ['betterdocs-elements-single'];
29 }
30
31 public function get_keywords() {
32 return ['betterdocs-elements', 'date', 'docs', 'betterdocs'];
33 }
34
35 public function get_custom_help_url() {
36 return 'https://betterdocs.co/docs/single-doc-in-elementor';
37 }
38
39 protected function register_controls() {
40
41 $this->start_controls_section(
42 'section_column_settings',
43 [
44 'label' => __( 'Style', 'betterdocs' ),
45 'tab' => Controls_Manager::TAB_STYLE
46 ]
47 );
48
49 $this->add_control(
50 'update_date_color',
51 [
52 'label' => esc_html__( 'Color', 'betterdocs' ),
53 'type' => Controls_Manager::COLOR,
54 'selectors' => [
55 '{{WRAPPER}} .update-date' => 'color: {{VALUE}};'
56 ]
57 ]
58 );
59
60 $this->add_group_control(
61 Group_Control_Typography::get_type(),
62 [
63 'name' => 'update_date_typography',
64 'selector' => '{{WRAPPER}} .update-date'
65 ]
66 );
67
68 $this->add_responsive_control(
69 'update_date_alignment',
70 [
71 'label' => __( 'Alignment', 'betterdocs' ),
72 'type' => Controls_Manager::CHOOSE,
73 'options' => [
74 'left' => [
75 'title' => __( 'Left', 'betterdocs' ),
76 'icon' => 'eicon-text-align-left'
77 ],
78 'center' => [
79 'title' => __( 'Center', 'betterdocs' ),
80 'icon' => 'eicon-text-align-center'
81 ],
82 'right' => [
83 'title' => __( 'Right', 'betterdocs' ),
84 'icon' => 'eicon-text-align-right'
85 ],
86 'justify' => [
87 'title' => __( 'Justified', 'betterdocs' ),
88 'icon' => 'eicon-text-align-justify'
89 ]
90 ],
91 'default' => '',
92 'selectors' => [
93 '{{WRAPPER}}' => 'text-align: {{VALUE}};'
94 ]
95 ]
96 );
97
98 $this->end_controls_section();
99 }
100
101 protected function render_callback() {
102 $this->views( 'widgets/date' );
103 }
104 }
105