PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 5.1.4
Essential Addons for Elementor – Popular Elementor Templates & Widgets v5.1.4
6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / includes / Elements / Fancy_Text.php
essential-addons-for-elementor-lite / includes / Elements Last commit date
Adv_Accordion.php 4 years ago Adv_Tabs.php 4 years ago Advanced_Data_Table.php 4 years ago Better_Payment.php 4 years ago Betterdocs_Category_Box.php 4 years ago Betterdocs_Category_Grid.php 4 years ago Betterdocs_Search_Form.php 4 years ago Caldera_Forms.php 4 years ago Career_Page.php 4 years ago Contact_Form_7.php 4 years ago Content_Ticker.php 4 years ago Countdown.php 4 years ago Creative_Button.php 4 years ago Crowdfundly_All_Campaign.php 4 years ago Crowdfundly_Organization.php 4 years ago Crowdfundly_Single_Campaign.php 4 years ago Cta_Box.php 4 years ago Data_Table.php 4 years ago Dual_Color_Header.php 4 years ago EmbedPress.php 4 years ago Event_Calendar.php 4 years ago Facebook_Feed.php 4 years ago Fancy_Text.php 4 years ago Feature_List.php 4 years ago Filterable_Gallery.php 4 years ago Flip_Box.php 4 years ago FluentForm.php 4 years ago Formstack.php 4 years ago GravityForms.php 4 years ago Image_Accordion.php 4 years ago Info_Box.php 4 years ago Interactive_Circle.php 4 years ago Login_Register.php 4 years ago NinjaForms.php 4 years ago Post_Grid.php 4 years ago Post_Timeline.php 4 years ago Pricing_Table.php 4 years ago Product_Grid.php 4 years ago Progress_Bar.php 4 years ago Simple_Menu.php 4 years ago Sticky_Video.php 4 years ago Team_Member.php 4 years ago Testimonial.php 4 years ago Tooltip.php 4 years ago Twitter_Feed.php 4 years ago TypeForm.php 4 years ago WeForms.php 4 years ago Woo_Cart.php 4 years ago Woo_Checkout.php 4 years ago Woo_Product_Carousel.php 4 years ago Woo_Product_Compare.php 4 years ago Woo_Product_Gallery.php 4 years ago Woocommerce_Review.php 4 years ago WpForms.php 4 years ago
Fancy_Text.php
637 lines
1 <?php
2 namespace Essential_Addons_Elementor\Elements;
3
4 // If this file is called directly, abort.
5 if (!defined('ABSPATH')) {
6 exit;
7 }
8
9 use \Elementor\Controls_Manager;
10 use \Elementor\Group_Control_Background;
11 use \Elementor\Group_Control_Border;
12 use \Elementor\Group_Control_Typography;
13 use \Elementor\Core\Schemes\Typography;
14 use \Elementor\Widget_Base;
15 use \Elementor\Repeater;
16 use Essential_Addons_Elementor\Classes\Helper as HelperClass;
17
18
19 class Fancy_Text extends Widget_Base {
20
21
22 public function get_name() {
23 return 'eael-fancy-text';
24 }
25
26 public function get_title() {
27 return esc_html__( 'Fancy Text', 'essential-addons-for-elementor-lite');
28 }
29
30 public function get_icon() {
31 return 'eaicon-fancy-text';
32 }
33
34 public function get_categories() {
35 return [ 'essential-addons-elementor' ];
36 }
37
38 public function get_keywords() {
39 return [
40 'ea fancy text',
41 'ea typing text',
42 'animated headline',
43 'Headline',
44 'typewriter',
45 'text effect',
46 'text typing effect',
47 'text animation',
48 'animated heading',
49 'ea',
50 'essential addons'
51 ];
52 }
53
54 public function get_custom_help_url() {
55 return 'https://essential-addons.com/elementor/docs/fancy-text/';
56 }
57
58 protected function register_controls() {
59
60 // Content Controls
61 $this->start_controls_section(
62 'eael_fancy_text_content',
63 [
64 'label' => esc_html__( 'Fancy Text', 'essential-addons-for-elementor-lite')
65 ]
66 );
67
68
69 $this->add_control(
70 'eael_fancy_text_prefix',
71 [
72 'label' => esc_html__( 'Prefix Text', 'essential-addons-for-elementor-lite'),
73 'placeholder' => esc_html__( 'Place your prefix text', 'essential-addons-for-elementor-lite'),
74 'type' => Controls_Manager::TEXT,
75 'default' => esc_html__( 'This is the ', 'essential-addons-for-elementor-lite'),
76 'dynamic' => [ 'active' => true ]
77 ]
78 );
79
80 $repeater = new Repeater();
81
82 $repeater->add_control(
83 'eael_fancy_text_strings_text_field',
84 [
85 'label' => esc_html__( 'Fancy String', 'essential-addons-for-elementor-lite'),
86 'type' => Controls_Manager::TEXT,
87 'label_block' => true,
88 'dynamic' => [ 'active' => true ]
89 ]
90 );
91
92 $this->add_control(
93 'eael_fancy_text_strings',
94 [
95 'label' => __( 'Fancy Text Strings', 'essential-addons-for-elementor-lite'),
96 'type' => Controls_Manager::REPEATER,
97 'show_label' => true,
98 'fields' => $repeater->get_controls(),
99 'title_field' => '{{ eael_fancy_text_strings_text_field }}',
100 'default' => [
101 [
102 'eael_fancy_text_strings_text_field' => __( 'First string', 'essential-addons-for-elementor-lite'),
103 ],
104 [
105 'eael_fancy_text_strings_text_field' => __( 'Second string', 'essential-addons-for-elementor-lite'),
106 ],
107 [
108 'eael_fancy_text_strings_text_field' => __( 'Third string', 'essential-addons-for-elementor-lite'),
109 ]
110 ],
111 ]
112 );
113
114 $this->add_control(
115 'eael_fancy_text_suffix',
116 [
117 'label' => esc_html__( 'Suffix Text', 'essential-addons-for-elementor-lite'),
118 'placeholder' => esc_html__( 'Place your suffix text', 'essential-addons-for-elementor-lite'),
119 'type' => Controls_Manager::TEXT,
120 'default' => esc_html__( ' of the sentence.', 'essential-addons-for-elementor-lite'),
121 'dynamic' => [ 'active' => true ]
122 ]
123 );
124
125 $this->end_controls_section();
126
127 // Settings Control
128 $this->start_controls_section(
129 'eael_fancy_text_settings',
130 [
131 'label' => esc_html__( 'Fancy Text Settings', 'essential-addons-for-elementor-lite')
132 ]
133 );
134
135 $style_options = apply_filters(
136 'fancy_text_style_types',
137 [
138 'styles' => [
139 'style-1' => esc_html__( 'Style 1', 'essential-addons-for-elementor-lite'),
140 'style-2' => esc_html__( 'Style 2 (Pro)', 'essential-addons-for-elementor-lite'),
141 ],
142 'conditions' => ['style-2']
143 ]
144 );
145
146 $this->add_control(
147 'eael_fancy_text_style',
148 [
149 'label' => esc_html__( 'Style Type', 'essential-addons-for-elementor-lite'),
150 'type' => Controls_Manager::SELECT,
151 'default' => 'style-1',
152 'options' => $style_options['styles']
153 ]
154 );
155
156 $this->add_control(
157 'eael_fancy_text_style_pro_alert',
158 [
159 'label' => esc_html__( 'Only available in pro version!', 'essential-addons-for-elementor-lite'),
160 'type' => Controls_Manager::HEADING,
161 'condition' => [
162 'eael_fancy_text_style' => $style_options['conditions'],
163 ]
164 ]
165 );
166
167 $this->add_responsive_control(
168 'eael_fancy_text_alignment',
169 [
170 'label' => esc_html__( 'Alignment', 'essential-addons-for-elementor-lite'),
171 'type' => Controls_Manager::CHOOSE,
172 'options' => [
173 'left' => [
174 'title' => esc_html__( 'Left', 'essential-addons-for-elementor-lite'),
175 'icon' => 'eicon-text-align-left',
176 ],
177 'center' => [
178 'title' => esc_html__( 'Center', 'essential-addons-for-elementor-lite'),
179 'icon' => 'eicon-text-align-center',
180 ],
181 'right' => [
182 'title' => esc_html__( 'Right', 'essential-addons-for-elementor-lite'),
183 'icon' => 'eicon-text-align-right',
184 ],
185 ],
186 'default' => 'center',
187 'selectors' => [
188 '{{WRAPPER}} .eael-fancy-text-container' => 'text-align: {{VALUE}}',
189 ],
190 ]
191 );
192
193 $this->add_control(
194 'eael_fancy_text_transition_type',
195 [
196 'label' => esc_html__( 'Animation Type', 'essential-addons-for-elementor-lite'),
197 'type' => Controls_Manager::SELECT,
198 'default' => 'typing',
199 'options' => [
200 'typing' => esc_html__( 'Typing', 'essential-addons-for-elementor-lite'),
201 'fadeIn' => esc_html__( 'Fade', 'essential-addons-for-elementor-lite'),
202 'fadeInUp' => esc_html__( 'Fade Up', 'essential-addons-for-elementor-lite'),
203 'fadeInDown' => esc_html__( 'Fade Down', 'essential-addons-for-elementor-lite'),
204 'fadeInLeft' => esc_html__( 'Fade Left', 'essential-addons-for-elementor-lite'),
205 'fadeInRight' => esc_html__( 'Fade Right', 'essential-addons-for-elementor-lite'),
206 'zoomIn' => esc_html__( 'Zoom', 'essential-addons-for-elementor-lite'),
207 'bounceIn' => esc_html__( 'Bounce', 'essential-addons-for-elementor-lite'),
208 'swing' => esc_html__( 'Swing', 'essential-addons-for-elementor-lite'),
209 ],
210 ]
211 );
212
213
214 $this->add_control(
215 'eael_fancy_text_speed',
216 [
217 'label' => esc_html__( 'Typing Speed', 'essential-addons-for-elementor-lite'),
218 'type' => Controls_Manager::NUMBER,
219 'default' => '50',
220 'condition' => [
221 'eael_fancy_text_transition_type' => 'typing',
222 ],
223 ]
224 );
225
226 $this->add_control(
227 'eael_fancy_text_delay',
228 [
229 'label' => esc_html__( 'Delay on Change', 'essential-addons-for-elementor-lite'),
230 'type' => Controls_Manager::NUMBER,
231 'default' => '2500'
232 ]
233 );
234
235 $this->add_control(
236 'eael_fancy_text_loop',
237 [
238 'label' => esc_html__( 'Loop the Typing', 'essential-addons-for-elementor-lite'),
239 'type' => Controls_Manager::SWITCHER,
240 'return_value' => 'yes',
241 'default' => 'yes',
242 'condition' => [
243 'eael_fancy_text_transition_type' => 'typing',
244 ],
245 ]
246 );
247
248 $this->add_control(
249 'eael_fancy_text_cursor',
250 [
251 'label' => esc_html__( 'Display Type Cursor', 'essential-addons-for-elementor-lite'),
252 'type' => Controls_Manager::SWITCHER,
253 'return_value' => 'yes',
254 'default' => 'yes',
255 'condition' => [
256 'eael_fancy_text_transition_type' => 'typing',
257 ],
258 ]
259 );
260
261
262 $this->end_controls_section();
263
264
265 if(!apply_filters('eael/pro_enabled', false)) {
266 $this->start_controls_section(
267 'eael_section_pro',
268 [
269 'label' => __( 'Go Premium for More Features', 'essential-addons-for-elementor-lite')
270 ]
271 );
272
273 $this->add_control(
274 'eael_control_get_pro',
275 [
276 'label' => __( 'Unlock more possibilities', 'essential-addons-for-elementor-lite'),
277 'type' => Controls_Manager::CHOOSE,
278 'options' => [
279 '1' => [
280 'title' => '',
281 'icon' => 'fa fa-unlock-alt',
282 ],
283 ],
284 'default' => '1',
285 'description' => '<span class="pro-feature"> Get the <a href="https://wpdeveloper.com/upgrade/ea-pro" target="_blank">Pro version</a> for more stunning elements and customization options.</span>'
286 ]
287 );
288
289 $this->end_controls_section();
290 }
291
292
293 $this->start_controls_section(
294 'eael_fancy_text_prefix_styles',
295 [
296 'label' => esc_html__( 'Prefix Text Styles', 'essential-addons-for-elementor-lite'),
297 'tab' => Controls_Manager::TAB_STYLE
298 ]
299 );
300
301 $this->add_control(
302 'eael_fancy_text_prefix_color',
303 [
304 'label' => esc_html__( 'Prefix Text Color', 'essential-addons-for-elementor-lite'),
305 'type' => Controls_Manager::COLOR,
306 'selectors' => [
307 '{{WRAPPER}} .eael-fancy-text-prefix' => 'color: {{VALUE}};',
308 ],
309 ]
310 );
311
312 $this->add_group_control(
313 Group_Control_Typography::get_type(),
314 [
315 'name' => 'typography',
316 'scheme' => Typography::TYPOGRAPHY_1,
317 'fields_options' => [
318 'typography' => ['default' => 'yes'],
319 'font_size' => ['default' => ['size' => 22]],
320 'font_weight' => ['default' => 600],
321 'line_height' => ['default' => ['size' => 1]],
322 ],
323 'selector' => '{{WRAPPER}} .eael-fancy-text-prefix',
324 ]
325 );
326
327
328 $this->end_controls_section();
329
330
331 $this->start_controls_section(
332 'eael_fancy_text_strings_styles',
333 [
334 'label' => esc_html__( 'Fancy Text Styles', 'essential-addons-for-elementor-lite'),
335 'tab' => Controls_Manager::TAB_STYLE
336 ]
337 );
338
339 $this->add_control(
340 'eael_fancy_text_color_selector',
341 [
342 'label' => esc_html__('Choose Background Type', 'essential-addons-for-elementor-lite'),
343 'type' => Controls_Manager::CHOOSE,
344 'options' => [
345 'solid-color' => [
346 'title' => __('Color', 'essential-addons-for-elementor-lite'),
347 'icon' => 'eicon-paint-brush',
348 ],
349 'gradient-color' => [
350 'title' => __('Gradient', 'essential-addons-for-elementor-lite'),
351 'icon' => 'eicon-barcode',
352 ],
353 ],
354 'toggle' => true,
355 'default' => 'solid-color',
356 'condition' => [
357 'eael_fancy_text_style' => 'style-1',
358 ]
359 ]
360 );
361
362 $this->add_control(
363 'eael_fancy_text_strings_background_color',
364 [
365 'label' => esc_html__( 'Background', 'essential-addons-for-elementor-lite'),
366 'type' => Controls_Manager::COLOR,
367 'default' => '',
368 'selectors' => [
369 '{{WRAPPER}} .eael-fancy-text-strings' => 'background: {{VALUE}};',
370 ],
371 'conditions' => [
372 'relation' => 'or',
373 'terms' => [
374 [
375 'terms' => [
376 [
377 'name' => 'eael_fancy_text_color_selector',
378 'operator' => '==',
379 'value' => 'solid-color',
380 ],
381 ],
382 ],
383 [
384 'name' => 'eael_fancy_text_style',
385 'operator' => '==',
386 'value' => 'style-2',
387 ],
388 ],
389 ],
390 ]
391 );
392
393 $this->add_group_control(
394 Group_Control_Background::get_type(),
395 [
396 'name' => 'eael_fancy_text_color_gradient',
397 'types' => ['gradient'],
398 'fields_options' => [
399 'background' => [
400 'label' => _x( 'Gradient Color', 'Text Shadow Control', 'elementor' ),
401 'toggle' => false,
402 'default' => 'gradient',
403 ],
404 'color' => [
405 'default' => '#062ACA',
406 ],
407 'color_b' => [
408 'default' => '#9401D9',
409 ]
410 ],
411 'selector' => '{{WRAPPER}} .eael-fancy-text-strings',
412 'condition' => [
413 'eael_fancy_text_color_selector' => 'gradient-color',
414 'eael_fancy_text_style' => 'style-1',
415 ]
416 ]
417 );
418
419 $this->add_group_control(
420 Group_Control_Typography::get_type(),
421 [
422 'name' => 'eael_fancy_text_strings_typography',
423 'scheme' => Typography::TYPOGRAPHY_1,
424 'fields_options' => [
425 'typography' => ['default' => 'yes'],
426 'font_size' => ['default' => ['size' => 22]],
427 'font_weight' => ['default' => 600],
428 ],
429 'selector' => '{{WRAPPER}} .eael-fancy-text-strings, {{WRAPPER}} .typed-cursor',
430 ]
431 );
432
433 $this->add_control(
434 'eael_fancy_text_strings_color',
435 [
436 'label' => esc_html__( 'Solid Color', 'essential-addons-for-elementor-lite'),
437 'type' => Controls_Manager::COLOR,
438 'selectors' => [
439 '{{WRAPPER}} .eael-fancy-text-strings' => 'color: {{VALUE}};',
440 ],
441 'conditions' => [
442 'relation' => 'or',
443 'terms' => [
444 [
445 'terms' => [
446 [
447 'name' => 'eael_fancy_text_style',
448 'operator' => '==',
449 'value' => 'style-1',
450 ]
451 ],
452 ],
453 [
454 'name' => 'eael_fancy_text_style',
455 'operator' => '==',
456 'value' => 'style-2',
457 ],
458 ],
459 ],
460 ]
461 );
462
463 $this->add_control(
464 'eael_fancy_text_cursor_color',
465 [
466 'label' => esc_html__( 'Typing Cursor Color', 'essential-addons-for-elementor-lite'),
467 'type' => Controls_Manager::COLOR,
468 'selectors' => [
469 '{{WRAPPER}} .typed-cursor' => 'color: {{VALUE}};',
470 ],
471 'condition' => [
472 'eael_fancy_text_cursor' => 'yes',
473 ],
474 ]
475 );
476
477 $this->add_responsive_control(
478 'eael_fancy_text_strings_padding',
479 [
480 'label' => esc_html__( 'Padding', 'essential-addons-for-elementor-lite'),
481 'type' => Controls_Manager::DIMENSIONS,
482 'size_units' => [ 'px', 'em', '%' ],
483 'selectors' => [
484 '{{WRAPPER}} .eael-fancy-text-strings' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
485 ],
486 ]
487 );
488
489 $this->add_responsive_control(
490 'eael_fancy_text_strings_margin',
491 [
492 'label' => esc_html__( 'Margin', 'essential-addons-for-elementor-lite'),
493 'type' => Controls_Manager::DIMENSIONS,
494 'size_units' => [ 'px', 'em', '%' ],
495 'selectors' => [
496 '{{WRAPPER}} .eael-fancy-text-strings' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
497 ],
498 ]
499 );
500
501
502
503 $this->add_group_control(
504 Group_Control_Border::get_type(),
505 [
506 'name' => 'eael_fancy_text_strings_border',
507 'selector' => '{{WRAPPER}} .eael-fancy-text-strings',
508 ]
509 );
510
511
512 $this->add_control(
513 'eael_fancy_text_strings_border_radius',
514 [
515 'label' => esc_html__( 'Border Radius', 'essential-addons-for-elementor-lite'),
516 'type' => Controls_Manager::SLIDER,
517 'range' => [
518 'px' => [
519 'min' => 0,
520 'max' => 100,
521 ],
522 ],
523 'selectors' => [
524 '{{WRAPPER}} .eael-fancy-text-strings' => 'border-radius: {{SIZE}}{{UNIT}};',
525 ],
526 ]
527 );
528
529
530 $this->end_controls_section();
531
532
533
534 $this->start_controls_section(
535 'eael_fancy_text_suffix_styles',
536 [
537 'label' => esc_html__( 'Suffix Text Styles', 'essential-addons-for-elementor-lite'),
538 'tab' => Controls_Manager::TAB_STYLE
539 ]
540 );
541
542 $this->add_control(
543 'eael_fancy_text_suffix_color',
544 [
545 'label' => esc_html__( 'Suffix Text Color', 'essential-addons-for-elementor-lite'),
546 'type' => Controls_Manager::COLOR,
547 'selectors' => [
548 '{{WRAPPER}} .eael-fancy-text-suffix' => 'color: {{VALUE}};',
549 ],
550 ]
551 );
552
553 $this->add_group_control(
554 Group_Control_Typography::get_type(),
555 [
556 'name' => 'ending_typography',
557 'scheme' => Typography::TYPOGRAPHY_1,
558 'fields_options' => [
559 'typography' => ['default' => 'yes'],
560 'font_size' => ['default' => ['size' => 22]],
561 'font_weight' => ['default' => 600],
562 'line_height' => ['default' => ['size' => 1]],
563 ],
564 'selector' => '{{WRAPPER}} .eael-fancy-text-suffix',
565 ]
566 );
567
568
569 $this->end_controls_section();
570
571 }
572
573 public function fancy_text($settings) {
574 $fancy_text = array("");
575 foreach ( $settings as $item ) {
576 if ( ! empty( $item['eael_fancy_text_strings_text_field'] ) ) {
577 $fancy_text[] = HelperClass::eael_wp_kses($item['eael_fancy_text_strings_text_field']) ;
578 }
579 }
580 return implode("|",$fancy_text);
581 }
582
583 protected function render() {
584
585
586 $settings = $this->get_settings_for_display();
587 $fancy_text = $this->fancy_text($settings['eael_fancy_text_strings']);
588 if(!apply_filters('eael/pro_enabled', false)) { $settings['eael_fancy_text_style'] = 'style-1'; }
589 $this->add_render_attribute( 'fancy-text', 'class', 'eael-fancy-text-container' );
590 $this->add_render_attribute( 'fancy-text', 'class', esc_attr($settings['eael_fancy_text_style']) );
591 $this->add_render_attribute( 'fancy-text', 'data-fancy-text-id', esc_attr($this->get_id()) );
592 $this->add_render_attribute( 'fancy-text', 'data-fancy-text', $fancy_text );
593 $this->add_render_attribute( 'fancy-text', 'data-fancy-text-transition-type', $settings['eael_fancy_text_transition_type'] );
594 $this->add_render_attribute( 'fancy-text', 'data-fancy-text-speed', $settings['eael_fancy_text_speed'] );
595 $this->add_render_attribute( 'fancy-text', 'data-fancy-text-delay', $settings['eael_fancy_text_delay'] );
596 $this->add_render_attribute( 'fancy-text', 'data-fancy-text-cursor', $settings['eael_fancy_text_cursor'] );
597 $this->add_render_attribute( 'fancy-text', 'data-fancy-text-loop', $settings['eael_fancy_text_loop'] );
598 ?>
599
600 <div <?php echo $this->get_render_attribute_string( 'fancy-text' ); ?> >
601 <?php if ( ! empty( $settings['eael_fancy_text_prefix'] ) ) : ?>
602 <span class="eael-fancy-text-prefix"><?php echo HelperClass::eael_wp_kses($settings['eael_fancy_text_prefix']); ?> </span>
603 <?php endif; ?>
604
605 <?php if ( $settings['eael_fancy_text_transition_type'] == 'fancy' ) : ?>
606 <span id="eael-fancy-text-<?php echo esc_attr($this->get_id()); ?>" class="eael-fancy-text-strings
607 <?php echo $settings['eael_fancy_text_color_selector']?>"></span>
608 <?php endif; ?>
609
610 <?php if ( $settings['eael_fancy_text_transition_type'] != 'fancy' ) : ?>
611 <span id="eael-fancy-text-<?php echo esc_attr($this->get_id()); ?>" class="eael-fancy-text-strings <?php echo $settings['eael_fancy_text_color_selector']?>">
612 <noscript>
613 <?php
614 $eael_fancy_text_strings_list = "";
615 foreach ( $settings['eael_fancy_text_strings'] as $item ) {
616 $eael_fancy_text_strings_list .= HelperClass::eael_wp_kses($item['eael_fancy_text_strings_text_field']) . ', ';
617 }
618 echo rtrim($eael_fancy_text_strings_list, ", ");
619 ?>
620 </noscript>
621 </span>
622 <?php endif; ?>
623
624 <?php if ( ! empty( $settings['eael_fancy_text_suffix'] ) ) : ?>
625 <span class="eael-fancy-text-suffix"> <?php echo HelperClass::eael_wp_kses($settings['eael_fancy_text_suffix']); ?></span>
626 <?php endif; ?>
627 </div><!-- close .eael-fancy-text-container -->
628
629 <div class="clearfix"></div>
630
631 <?php
632
633 }
634
635 protected function content_template() {}
636 }
637