PluginProbe ʕ •ᴥ•ʔ
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor / 4.0.1
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor v4.0.1
4.0.2 4.0.1 4.0.0 3.10.02 3.10.01 3.9.10 3.9.9 3.9.8 3.9.7 3.9.5 3.9.6 3.9.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.3.1 2.3.1.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.4.0 2.5.0 2.5.1 2.5.10 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.2 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.6.0 3.6.1 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.8.1 3.8.2 3.9.0 3.9.1 3.9.2 trunk 1.2.6 1.2.7 1.2.9 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.0.9.1 2.0.9.2 2.0.9.3
elementskit-lite / widgets / drop-caps / drop-caps.php
elementskit-lite / widgets / drop-caps Last commit date
drop-caps-handler.php 3 years ago drop-caps.php 3 weeks ago
drop-caps.php
212 lines
1 <?php
2 namespace Elementor;
3
4 use \Elementor\ElementsKit_Widget_Drop_Caps_Handler as Handler;
5 use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
6
7 if ( ! defined( 'ABSPATH' ) ) exit;
8
9
10 class ElementsKit_Widget_Drop_Caps extends Widget_Base {
11 use \ElementsKit_Lite\Widgets\Widget_Notice;
12
13 public $base;
14
15 public function get_name() {
16 return Handler::get_name();
17 }
18
19 public function get_title() {
20 return Handler::get_title();
21 }
22
23 public function get_icon() {
24 return Handler::get_icon();
25 }
26
27 public function get_categories() {
28 return Handler::get_categories();
29 }
30
31 public function get_keywords() {
32 return Handler::get_keywords();
33 }
34
35 public function get_help_url() {
36 return 'https://wpmet.com/doc/dropcaps/';
37 }
38
39 public function get_style_depends() {
40 return ['ekit-drop-caps'];
41 }
42
43 protected function is_dynamic_content(): bool {
44 return false;
45 }
46
47 public function has_widget_inner_wrapper(): bool {
48 return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
49 }
50
51 protected function register_controls() {
52
53 $this->start_controls_section(
54 'ekit_dropcaps_content',
55 [
56 'label' => esc_html__( 'Dropcaps', 'elementskit-lite' ),
57 ]
58 );
59
60 $this->add_control(
61 'ekit_dropcaps_text',
62 [
63 'label' => esc_html__( 'Content', 'elementskit-lite' ),
64 'type' => Controls_Manager::TEXTAREA,
65 'default' => esc_html__( 'Lorem ipsum dolor sit amet, consec adipisicing elit, sed do eiusmod tempor incidid ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip exl Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incidid ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.', 'elementskit-lite' ),
66 'placeholder' => esc_html__( 'Enter Your Drop Caps Content.', 'elementskit-lite' ),
67 'separator'=>'before',
68 'dynamic' => [
69 'active' => true,
70 ],
71 ]
72 );
73
74 $this->end_controls_section();
75
76 $this->start_controls_section(
77 'ekit_dropcaps_style_section',
78 [
79 'label' => esc_html__( 'Style', 'elementskit-lite' ),
80 'tab' => Controls_Manager::TAB_STYLE,
81 ]
82 );
83
84 $this->add_responsive_control(
85 'ekit_content_color',
86 [
87 'label' => esc_html__( 'Color', 'elementskit-lite' ),
88 'type' => Controls_Manager::COLOR,
89 'default' => '#333333',
90 'selectors' => [
91 '{{WRAPPER}} .ekit-dropcap-cotnent' => 'color: {{VALUE}};',
92 ],
93 ]
94 );
95
96 $this->add_group_control(
97 Group_Control_Typography::get_type(),
98 [
99 'name' => 'ekit_content_typography',
100 'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent',
101 ]
102 );
103
104 $this->end_controls_section();
105
106 // Style dropcaps latter tab section
107 $this->start_controls_section(
108 'ekit_dropcaps_latter_style_section',
109 [
110 'label' => esc_html__( 'Dropcap Latter', 'elementskit-lite' ),
111 'tab' => Controls_Manager::TAB_STYLE,
112 ]
113 );
114
115 $this->add_responsive_control(
116 'ekit_content_dropcaps_color',
117 [
118 'label' => esc_html__( 'Color', 'elementskit-lite' ),
119 'type' => Controls_Manager::COLOR,
120 'default' => '#903',
121 'selectors' => [
122 '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'color: {{VALUE}};',
123 ],
124 ]
125 );
126
127 $this->add_group_control(
128 Group_Control_Typography::get_type(),
129 [
130 'name' => 'ekit_content_dropcaps_typography',
131 'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter',
132 ]
133 );
134
135 $this->add_group_control(
136 Group_Control_Background::get_type(),
137 [
138 'name' => 'ekit_content_dropcaps_background',
139 'label' => esc_html__( 'Background', 'elementskit-lite' ),
140 'types' => [ 'classic', 'gradient' ],
141 'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter',
142 ]
143 );
144
145 $this->add_responsive_control(
146 'ekit_content_dropcaps_padding',
147 [
148 'label' => esc_html__( 'Padding', 'elementskit-lite' ),
149 'type' => Controls_Manager::DIMENSIONS,
150 'size_units' => [ 'px', '%', 'em' ],
151 'selectors' => [
152 '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
153 ],
154 'separator' =>'before',
155 ]
156 );
157
158 $this->add_responsive_control(
159 'ekit_content_dropcaps_margin',
160 [
161 'label' => esc_html__( 'Margin', 'elementskit-lite' ),
162 'type' => Controls_Manager::DIMENSIONS,
163 'size_units' => [ 'px', '%', 'em' ],
164 'selectors' => [
165 '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
166 ],
167 ]
168 );
169
170 $this->add_group_control(
171 Group_Control_Border::get_type(),
172 [
173 'name' => 'ekit_content_dropcaps_border',
174 'label' => esc_html__( 'Border', 'elementskit-lite' ),
175 'selector' => '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter',
176 ]
177 );
178
179 $this->add_responsive_control(
180 'ekit_content_dropcaps_border_radius',
181 [
182 'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
183 'type' => Controls_Manager::DIMENSIONS,
184 'size_units' => [ 'px', '%', 'em' ],
185 'selectors' => [
186 '{{WRAPPER}} .ekit-dropcap-cotnent:first-child:first-letter' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
187 ],
188 ]
189 );
190
191 $this->end_controls_section();
192
193 $this->insert_pro_message();
194 }
195
196 protected function render( ) {
197 echo '<div class="ekit-wid-con" >';
198 $this->render_raw();
199 echo '</div>';
200 }
201
202 protected function render_raw( ) {
203 $settings = $this->get_settings_for_display();
204 ?>
205 <div class="ekit-dropcap-wraper">
206 <?php if( !empty( $settings['ekit_dropcaps_text'] ) ) : ?>
207 <p class="ekit-dropcap-cotnent"><?php echo wp_kses($settings['ekit_dropcaps_text'], \ElementsKit_Lite\Utils::get_kses_array()); ?></p>
208 <?php endif; ?>
209 </div>
210 <?php
211 }
212 }