PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.5.0
Easy Elements for Elementor – Addons & Website Templates v1.5.0
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / widgets / icon-box / icon.php

icon.php in Easy Elements for Elementor – Addons & Website Templates 1.5.0, at widgets/icon-box/icon.php

1,916 lines 71.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Easyel\EasyElements\Widgets;
3 use Elementor\Utils;
4 use Elementor\Controls_Manager;
5 use Elementor\Responsive_Control;
6 use Elementor\Group_Control_Image_Size;
7
8 defined( 'ABSPATH' ) || die();
9 class Easyel_Icon_Box__Widget extends \Elementor\Widget_Base {
10
11 public function get_name() {
12 return 'eel-icon-box';
13 }
14
15 public function get_title() {
16 return esc_html__( 'Info Box', 'easy-elements' );
17 }
18
19 public function get_icon() {
20 return 'easyicon easyelIcon-iconbox';
21 }
22
23 public function get_categories() {
24 return [ 'easyelements_category' ];
25 }
26
27 public function get_keywords() {
28 return [ 'box', 'sevice', 'icon', 'icon-box', 'text' ];
29 }
30
31 public function get_style_depends() {
32 return [
33 'eel-icon-box',
34 ];
35 }
36
37
38 protected function register_controls() {
39 $this->start_controls_section(
40 '_section_logo',
41 [
42 'label' => esc_html__( 'Settings', 'easy-elements' ),
43 'tab' => Controls_Manager::TAB_CONTENT,
44 ]
45 );
46
47 $this->add_control(
48 'info_skin',
49 [
50 'label' => esc_html__( 'Skin', 'easy-elements' ),
51 'type' => \Elementor\Controls_Manager::SELECT,
52 'options' => [
53 'default' => esc_html__( 'Skin 01', 'easy-elements' ),
54 'skin-2' => esc_html__( 'Skin 02', 'easy-elements' ),
55 ],
56 'default' => 'default',
57 ]
58 );
59
60 $this->add_control(
61 'icon_type',
62 [
63 'label' => esc_html__( 'Type', 'easy-elements' ),
64 'type' => \Elementor\Controls_Manager::CHOOSE,
65 'options' => [
66 'icon' => [
67 'title' => esc_html__( 'Icon', 'easy-elements' ),
68 'icon' => 'eicon-star',
69 ],
70 'image' => [
71 'title' => esc_html__( 'Image', 'easy-elements' ),
72 'icon' => 'eicon-image-bold',
73 ],
74 ],
75 'default' => 'icon',
76 'toggle' => false,
77 ]
78 );
79
80 $this->add_control(
81 'icon',
82 [
83 'label' => esc_html__( 'Icon', 'easy-elements' ),
84 'type' => \Elementor\Controls_Manager::ICONS,
85 'label_block' => true,
86 'default' => [
87 'value' => 'fas fa-star',
88 'library' => 'fa-solid',
89 ],
90 'condition' => [
91 'icon_type' => 'icon',
92 ],
93 ]
94 );
95
96 $this->add_control(
97 'icon_image',
98 [
99 'label' => esc_html__( 'Upload Image', 'easy-elements' ),
100 'type' => \Elementor\Controls_Manager::MEDIA,
101 'default' => [
102 'url' => \Elementor\Utils::get_placeholder_image_src(),
103 ],
104 'condition' => [
105 'icon_type' => 'image',
106 ],
107 ]
108 );
109
110
111 $this->add_control(
112 'number_title',
113 [
114 'label' => esc_html__( 'Number', 'easy-elements' ),
115 'type' => \Elementor\Controls_Manager::TEXT,
116 'default' => '',
117 'label_block' => true,
118 ]
119 );
120
121 $this->add_control(
122 'number_gradeint',
123 [
124 'label' => esc_html__('Number Show Gradient', 'easy-elements'),
125 'type' => \Elementor\Controls_Manager::SWITCHER,
126 'label_on' => esc_html__('Show', 'easy-elements'),
127 'label_off' => esc_html__('Hide', 'easy-elements'),
128 'return_value' => 'yes',
129 'default' => '',
130 'condition' => [
131 'number_title!' => ''
132 ],
133 ]
134 );
135
136 $this->add_control(
137 'procs_title',
138 [
139 'label' => esc_html__( 'Title', 'easy-elements' ),
140 'type' => \Elementor\Controls_Manager::TEXT,
141 'default' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
142 'label_block' => true,
143 ]
144 );
145
146 $this->add_control(
147 '_description',
148 [
149 'label' => esc_html__( 'Description', 'easy-elements' ),
150 'type' => \Elementor\Controls_Manager::TEXTAREA,
151 'default' => esc_html__( 'Optimizing production and supply chain operations and generational transitions', 'easy-elements' ),
152 ]
153 );
154
155 $repeater = new \Elementor\Repeater();
156
157 $repeater->add_control(
158 '_feature_icon',
159 [
160 'label' => esc_html__( 'Icon', 'easy-elements' ),
161 'type' => \Elementor\Controls_Manager::ICONS,
162 'fa4compatibility' => 'icon',
163 'default' => [
164 'value' => 'fas fa-check',
165 'library' => 'fa-solid',
166 ],
167 ]
168 );
169
170 $repeater->add_control(
171 '_feature',
172 [
173 'label' => esc_html__( 'Feature', 'easy-elements' ),
174 'type' => \Elementor\Controls_Manager::TEXT,
175 'default' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
176 'label_block' => true,
177 ]
178 );
179
180 $this->add_control(
181 '_features',
182 [
183 'label' => esc_html__( 'Features', 'easy-elements' ),
184 'type' => \Elementor\Controls_Manager::REPEATER,
185 'fields' => $repeater->get_controls(),
186 'condition' => [
187 'info_skin' => 'skin-2'
188 ],
189 'default' => [
190 [
191 '_feature_icon' => [
192 'value' => 'fas fa-check',
193 'library' => 'fa-solid'
194 ],
195 '_feature' => esc_html__( 'Manufacturing Industrial', 'easy-elements' ),
196 ],
197 [
198 '_feature_icon' => [
199 'value' => 'fas fa-check',
200 'library' => 'fa-solid'
201 ],
202 '_feature' => esc_html__( 'Supply Chain', 'easy-elements' ),
203 ],
204 ],
205 'title_field' => '<i class="{{ _feature_icon.value }}"></i> {{{ _feature }}}',
206 ]
207 );
208
209
210 $this->add_control(
211 'link',
212 [
213 'label' => esc_html__('Link', 'easy-elements'),
214 'type' => Controls_Manager::URL,
215 'placeholder' => 'https://example.com',
216 ]
217 );
218
219 $this->add_control(
220 'enable_box_link',
221 [
222 'label' => esc_html__('Enable Full Box Link', 'easy-elements'),
223 'type' => \Elementor\Controls_Manager::SWITCHER,
224 'label_on' => esc_html__('Yes', 'easy-elements'),
225 'label_off' => esc_html__('No', 'easy-elements'),
226 'return_value' => 'yes',
227 'default' => 'yes',
228 'description' => esc_html__('If turned off, only the Read More button will be clickable.', 'easy-elements'),
229 'condition' => [
230 'link[url]!' => '',
231 ],
232 ]
233 );
234
235
236 $this->add_control(
237 'show_read_more',
238 [
239 'label' => esc_html__('Show Read More', 'easy-elements'),
240 'type' => \Elementor\Controls_Manager::SWITCHER,
241 'label_on' => esc_html__('Show', 'easy-elements'),
242 'label_off' => esc_html__('Hide', 'easy-elements'),
243 'return_value' => 'yes',
244 'default' => '',
245 ]
246 );
247
248 $this->add_control(
249 'read_more_type',
250 [
251 'label' => esc_html__('Read More Type', 'easy-elements'),
252 'type' => \Elementor\Controls_Manager::SELECT,
253 'options' => [
254 'read_text' => esc_html__('Text', 'easy-elements'),
255 'read_icon' => esc_html__('Icon', 'easy-elements'),
256 'read_icon_to_text' => esc_html__('Icon Hover to Text Show', 'easy-elements'),
257 ],
258 'default' => 'read_text',
259 'condition' => [
260 'show_read_more' => 'yes',
261 ],
262 ]
263 );
264
265 $this->add_control(
266 'read_more_text',
267 [
268 'label' => esc_html__('Read More Text', 'easy-elements'),
269 'type' => \Elementor\Controls_Manager::TEXT,
270 'default' => esc_html__('Read More', 'easy-elements'),
271 'condition' => [
272 'show_read_more' => 'yes',
273 'read_more_type' => ['read_text','read_icon_to_text'],
274 ],
275 ]
276 );
277
278 $this->add_control(
279 'read_more_icon',
280 [
281 'label' => esc_html__('Read More Icon', 'easy-elements'),
282 'type' => \Elementor\Controls_Manager::ICONS,
283 'condition' => [
284 'show_read_more' => 'yes',
285 'read_more_type' => 'read_icon',
286 ],
287 ]
288 );
289
290 $this->add_control(
291 'read_more_text_icon',
292 [
293 'label' => esc_html__('Text Button Icon', 'easy-elements'),
294 'type' => \Elementor\Controls_Manager::ICONS,
295 'condition' => [
296 'show_read_more' => 'yes',
297 'read_more_type' => ['read_text','read_icon_to_text'],
298 'read_more_text_icon_show' => 'yes',
299 ],
300 ]
301 );
302
303 $this->add_control(
304 'read_more_text_icon_show',
305 [
306 'label' => esc_html__('Show Icon Next to Text', 'easy-elements'),
307 'type' => \Elementor\Controls_Manager::SWITCHER,
308 'label_on' => esc_html__('Show', 'easy-elements'),
309 'label_off' => esc_html__('Hide', 'easy-elements'),
310 'return_value' => 'yes',
311 'default' => 'yes',
312 'condition' => [
313 'show_read_more' => 'yes',
314 'read_more_type' => ['read_text','read_icon_to_text'],
315 ],
316 ]
317 );
318
319 $this->add_control(
320 'read_more_alignment',
321 [
322 'label' => esc_html__( 'Button Alignment', 'easy-elements' ),
323 'type' => \Elementor\Controls_Manager::CHOOSE,
324 'options' => [
325 'left' => [
326 'title' => esc_html__( 'Left', 'easy-elements' ),
327 'icon' => 'eicon-text-align-left',
328 ],
329 'center' => [
330 'title' => esc_html__( 'Center', 'easy-elements' ),
331 'icon' => 'eicon-text-align-center',
332 ],
333 'right' => [
334 'title' => esc_html__( 'Right', 'easy-elements' ),
335 'icon' => 'eicon-text-align-right',
336 ],
337 'stretch' => [
338 'title' => esc_html__( 'Stretch', 'easy-elements' ),
339 'icon' => 'eicon-text-align-justify',
340 ],
341 ],
342 'prefix_class' => 'eel-btn-align-',
343 'condition' => [
344 'show_read_more' => 'yes',
345 ],
346 ]
347 );
348
349 $this->add_control(
350 'title_tag',
351 [
352 'label' => esc_html__( 'Title HTML Tag', 'easy-elements' ),
353 'type' => \Elementor\Controls_Manager::SELECT,
354 'default' => 'h3',
355 'options' => [
356 'h1' => 'H1',
357 'h2' => 'H2',
358 'h3' => 'H3',
359 'h4' => 'H4',
360 'h5' => 'H5',
361 'h6' => 'H6',
362 'div' => 'div',
363 'span' => 'span',
364 'p' => 'p',
365 ],
366 ]
367 );
368
369 $this->end_controls_section();
370
371 $this->start_controls_section(
372 'section_styles_item',
373 [
374 'label' => esc_html__( 'Item', 'easy-elements' ),
375 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
376 ]
377 );
378
379 $this->add_control(
380 'icon_direction',
381 [
382 'label' => esc_html__( 'Direction', 'easy-elements' ),
383 'type' => \Elementor\Controls_Manager::CHOOSE,
384 'default' => 'top',
385 'options' => [
386 'left' => [
387 'title' => esc_html__( 'Left', 'easy-elements' ),
388 'icon' => 'eicon-h-align-left',
389 ],
390 'top' => [
391 'title' => esc_html__( 'Top', 'easy-elements' ),
392 'icon' => 'eicon-v-align-top',
393 ],
394 'right' => [
395 'title' => esc_html__( 'Right', 'easy-elements' ),
396 'icon' => 'eicon-h-align-right',
397 ],
398 ],
399 'toggle' => false,
400 ]
401 );
402
403 // Vertical Alignment Control
404 $this->add_responsive_control(
405 'icon_vertical_alignment',
406 [
407 'label' => esc_html__( 'Vertical Alignment', 'easy-elements' ),
408 'type' => \Elementor\Controls_Manager::CHOOSE,
409 'default' => 'center',
410 'options' => [
411 'flex-start' => [
412 'title' => esc_html__( 'Top', 'easy-elements' ),
413 'icon' => 'eicon-v-align-top',
414 ],
415 'center' => [
416 'title' => esc_html__( 'Middle', 'easy-elements' ),
417 'icon' => 'eicon-v-align-middle',
418 ],
419 'flex-end' => [
420 'title' => esc_html__( 'Bottom', 'easy-elements' ),
421 'icon' => 'eicon-v-align-bottom',
422 ],
423 ],
424 'selectors' => [
425 '{{WRAPPER}} .ee--icon-box.right, {{WRAPPER}} .ee--icon-box.left' => 'align-items: {{VALUE}};',
426 ],
427 'condition' => [
428 'icon_direction' => ['left', 'right'],
429 'info_skin!' => 'skin-2',
430 'icon_type' => 'icon',
431 ],
432 ]
433 );
434
435 $this->add_responsive_control(
436 '_text_align',
437 [
438 'label' => esc_html__( 'Alignment', 'easy-elements' ),
439 'type' => \Elementor\Controls_Manager::CHOOSE,
440 'options' => [
441 'left' => [
442 'title' => esc_html__( 'Left', 'easy-elements' ),
443 'icon' => 'eicon-text-align-left',
444 ],
445 'center' => [
446 'title' => esc_html__( 'Center', 'easy-elements' ),
447 'icon' => 'eicon-text-align-center',
448 ],
449 'right' => [
450 'title' => esc_html__( 'Right', 'easy-elements' ),
451 'icon' => 'eicon-text-align-right',
452 ],
453 ],
454 'default' => 'center',
455 'selectors' => [
456 '{{WRAPPER}} .ee--icon-box, {{WRAPPER}} .eel-pro-number' => 'text-align: {{VALUE}};',
457 ],
458 'condition' => [
459 'icon_type' => 'icon',
460 ],
461 ]
462 );
463
464 $this->add_responsive_control(
465 '_textimg_align',
466 [
467 'label' => esc_html__( 'Alignment', 'easy-elements' ),
468 'type' => \Elementor\Controls_Manager::CHOOSE,
469 'options' => [
470 'left' => [
471 'title' => esc_html__( 'Left', 'easy-elements' ),
472 'icon' => 'eicon-text-align-left',
473 ],
474 'center' => [
475 'title' => esc_html__( 'Center', 'easy-elements' ),
476 'icon' => 'eicon-text-align-center',
477 ],
478 'right' => [
479 'title' => esc_html__( 'Right', 'easy-elements' ),
480 'icon' => 'eicon-text-align-right',
481 ],
482 ],
483 'default' => 'center',
484 'selectors' => [
485 '{{WRAPPER}} .ee--icon-box, {{WRAPPER}} .eel-pro-number' => 'text-align: {{VALUE}};',
486 ],
487 'condition' => [
488 'icon_type' => 'image',
489 ],
490 ]
491 );
492
493 $this->add_responsive_control('item_spacing', [
494 'label' => __('Item Spacing', 'easy-elements'),
495 'type' => \Elementor\Controls_Manager::SLIDER,
496 'condition' => [
497 'icon_direction' => ['left', 'right'],
498 ],
499 'selectors' => [
500 '{{WRAPPER}} .ee--icon-box.right, {{WRAPPER}} .ee--icon-box.left' => 'gap: {{SIZE}}px;',
501 ],
502 ]);
503
504 $this->start_controls_tabs('item_background_tabs');
505
506 $this->start_controls_tab('item_background_normal', [
507 'label' => __('Normal', 'easy-elements'),
508 ]);
509
510 $this->add_group_control(
511 \Elementor\Group_Control_Background::get_type(),
512 [
513 'name' => 'item_normal_bg',
514 'label' => __('Background', 'easy-elements'),
515 'types' => ['classic', 'gradient'],
516 'selector' => '{{WRAPPER}} .ee--icon-box',
517 ]
518 );
519
520 $this->add_group_control(
521 \Elementor\Group_Control_Border::get_type(),
522 [
523 'name' => 'item_normal_border',
524 'label' => __('Border', 'easy-elements'),
525 'selector' => '{{WRAPPER}} .ee--icon-box',
526 ]
527 );
528
529 $this->add_group_control(
530 \Elementor\Group_Control_Box_Shadow::get_type(),
531 [
532 'name' => 'item_normal_box_shadow',
533 'label' => __('Box Shadow', 'easy-elements'),
534 'selector' => '{{WRAPPER}} .ee--icon-box',
535 ]
536 );
537
538 $this->add_responsive_control(
539 'item_normal_border_radius',
540 [
541 'label' => __('Border Radius', 'easy-elements'),
542 'type' => \Elementor\Controls_Manager::DIMENSIONS,
543 'size_units' => ['px', '%', 'em'],
544 'selectors' => [
545 '{{WRAPPER}} .ee--icon-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
546 '{{WRAPPER}} .ee--icon-box::before' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
547 ],
548 ]
549 );
550
551 $this->add_responsive_control(
552 'item_normal_padding',
553 [
554 'label' => __('Padding', 'easy-elements'),
555 'type' => \Elementor\Controls_Manager::DIMENSIONS,
556 'size_units' => ['px', 'em', '%'],
557 'selectors' => [
558 '{{WRAPPER}} .ee--icon-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
559 ],
560 ]
561 );
562
563 $this->add_responsive_control(
564 'item_normal_margin',
565 [
566 'label' => __('Margin', 'easy-elements'),
567 'type' => \Elementor\Controls_Manager::DIMENSIONS,
568 'size_units' => ['px', 'em', '%'],
569 'selectors' => [
570 '{{WRAPPER}} .ee--icon-box' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
571 ],
572 ]
573 );
574
575 $this->end_controls_tab();
576
577 $this->start_controls_tab('item_background_hover', [
578 'label' => __('Hover', 'easy-elements'),
579 ]);
580
581 $this->add_control(
582 'item_bg_hover_styles',
583 [
584 'label' => esc_html__( 'Background Direction', 'easy-elements' ),
585 'type' => \Elementor\Controls_Manager::SELECT,
586 'default' => 'default',
587 'options' => [
588 'default' => esc_html__( 'Default', 'easy-elements' ),
589 'left' => esc_html__( 'Left', 'easy-elements' ),
590 'right' => esc_html__( 'Right', 'easy-elements' ),
591 'top' => esc_html__( 'Top', 'easy-elements' ),
592 'bottom' => esc_html__( 'Bottom', 'easy-elements' ),
593 'middle' => esc_html__( 'Middle', 'easy-elements' ),
594 ],
595 ]
596 );
597
598 $this->add_group_control(
599 \Elementor\Group_Control_Background::get_type(),
600 [
601 'name' => 'item_hover_bg',
602 'label' => __('Background', 'easy-elements'),
603 'types' => ['classic', 'gradient'],
604 'selector' => '{{WRAPPER}} .ee--icon-box:hover::before',
605 ]
606 );
607
608 $this->add_group_control(
609 \Elementor\Group_Control_Border::get_type(),
610 [
611 'name' => 'item_border_hover',
612 'label' => __('Border', 'easy-elements'),
613 'selector' => '{{WRAPPER}} .ee--icon-box:hover',
614 ]
615 );
616
617 $this->add_group_control(
618 \Elementor\Group_Control_Box_Shadow::get_type(),
619 [
620 'name' => 'item_shadow_hover',
621 'label' => __('Box Shadow', 'easy-elements'),
622 'selector' => '{{WRAPPER}} .ee--icon-box:hover',
623 ]
624 );
625
626 $this->end_controls_tab();
627 $this->end_controls_tabs();
628 $this->end_controls_section();
629
630 $this->start_controls_section(
631 'section_style_image',
632 [
633 'label' => esc_html__( 'Image', 'easy-elements' ),
634 'tab' => Controls_Manager::TAB_STYLE,
635 'condition' => [
636 'icon_type' => 'image',
637 ],
638 ]
639 );
640
641 $this->add_responsive_control(
642 'image_size',
643 [
644 'label' => esc_html__( 'Image Size', 'easy-elements' ),
645 'type' => Controls_Manager::SLIDER,
646 'range' => [
647 'px' => [
648 'min' => 10,
649 'max' => 300,
650 ],
651 ],
652 'selectors' => [
653 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image img' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
654 ],
655 ]
656 );
657
658 $this->add_responsive_control(
659 'image_box_size',
660 [
661 'label' => esc_html__( 'Box Size', 'easy-elements' ),
662 'type' => Controls_Manager::SLIDER,
663 'range' => [
664 'px' => [
665 'min' => 10,
666 'max' => 300,
667 ],
668 ],
669 'selectors' => [
670 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image' => 'min-width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
671 ],
672 ]
673 );
674
675 $this->start_controls_tabs('image_style_tabs');
676
677 $this->start_controls_tab('image_style_normal', [
678 'label' => __('Normal', 'easy-elements'),
679 ]);
680
681 $this->add_control(
682 'image_bg_color',
683 [
684 'label' => esc_html__( 'Background Color', 'easy-elements' ),
685 'type' => Controls_Manager::COLOR,
686 'selectors' => [
687 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image' => 'background-color: {{VALUE}};',
688 ],
689 ]
690 );
691
692 $this->add_group_control(
693 \Elementor\Group_Control_Background::get_type(),
694 [
695 'name' => 'image_bg_gradient',
696 'types' => [ 'classic', 'gradient' ],
697 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image',
698 ]
699 );
700
701 $this->add_group_control(
702 \Elementor\Group_Control_Border::get_type(),
703 [
704 'name' => 'image_border',
705 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image',
706 ]
707 );
708
709 $this->add_group_control(
710 \Elementor\Group_Control_Box_Shadow::get_type(),
711 [
712 'name' => 'image_box_shadow',
713 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image',
714 ]
715 );
716
717 $this->end_controls_tab();
718
719 $this->start_controls_tab('image_style_hover', [
720 'label' => __('Hover', 'easy-elements'),
721 ]);
722
723 $this->add_control(
724 'image_hover_bg_color',
725 [
726 'label' => esc_html__( 'Background Color', 'easy-elements' ),
727 'type' => Controls_Manager::COLOR,
728 'selectors' => [
729 '{{WRAPPER}} .ee--icon-box:hover .eel-icon.eel-icon-image' => 'background-color: {{VALUE}};',
730 ],
731 ]
732 );
733
734 $this->add_group_control(
735 \Elementor\Group_Control_Background::get_type(),
736 [
737 'name' => 'image_hover_bg_gradient',
738 'types' => [ 'classic', 'gradient' ],
739 'selector' => '{{WRAPPER}} .ee--icon-box:hover .eel-icon.eel-icon-image',
740 ]
741 );
742
743 $this->add_control(
744 'image_hover_border_color',
745 [
746 'label' => esc_html__( 'Border Color', 'easy-elements' ),
747 'type' => Controls_Manager::COLOR,
748 'selectors' => [
749 '{{WRAPPER}} .ee--icon-box:hover .eel-icon.eel-icon-image' => 'border-color: {{VALUE}};',
750 ],
751 ]
752 );
753
754 $this->add_group_control(
755 \Elementor\Group_Control_Box_Shadow::get_type(),
756 [
757 'name' => 'image_hover_box_shadow',
758 'selector' => '{{WRAPPER}} .ee--icon-box:hover .eel-icon.eel-icon-image',
759 ]
760 );
761
762 $this->end_controls_tab();
763 $this->end_controls_tabs();
764
765 $this->add_control(
766 'image_box_border_radius',
767 [
768 'label' => esc_html__( 'Box Border Radius', 'easy-elements' ),
769 'type' => \Elementor\Controls_Manager::DIMENSIONS,
770 'size_units' => [ 'px', '%' ],
771 'separator' => 'before',
772 'selectors' => [
773 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
774 ],
775 ]
776 );
777
778 $this->add_control(
779 'image__border_radius',
780 [
781 'label' => esc_html__( 'Image Border Radius', 'easy-elements' ),
782 'type' => \Elementor\Controls_Manager::DIMENSIONS,
783 'size_units' => [ 'px', '%' ],
784 'selectors' => [
785 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
786 ],
787 ]
788 );
789
790 $this->add_responsive_control(
791 'image_padding',
792 [
793 'label' => esc_html__( 'Padding', 'easy-elements' ),
794 'type' => \Elementor\Controls_Manager::DIMENSIONS,
795 'size_units' => [ 'px', '%', 'em', 'rem' ],
796 'selectors' => [
797 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
798 ],
799 ]
800 );
801
802 $this->add_responsive_control(
803 'image_margin',
804 [
805 'label' => esc_html__( 'Margin', 'easy-elements' ),
806 'type' => \Elementor\Controls_Manager::DIMENSIONS,
807 'size_units' => [ 'px', '%', 'em', 'rem' ],
808 'selectors' => [
809 '{{WRAPPER}} .ee--icon-box .eel-icon.eel-icon-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
810 ],
811 ]
812 );
813
814 $this->add_responsive_control(
815 'img_vertical_alignment',
816 [
817 'label' => esc_html__( 'Vertical Alignment', 'easy-elements' ),
818 'type' => \Elementor\Controls_Manager::CHOOSE,
819 'default' => 'center',
820 'options' => [
821 'flex-start' => [
822 'title' => esc_html__( 'Top', 'easy-elements' ),
823 'icon' => 'eicon-v-align-top',
824 ],
825 'center' => [
826 'title' => esc_html__( 'Middle', 'easy-elements' ),
827 'icon' => 'eicon-v-align-middle',
828 ],
829 'flex-end' => [
830 'title' => esc_html__( 'Bottom', 'easy-elements' ),
831 'icon' => 'eicon-v-align-bottom',
832 ],
833 ],
834 'selectors' => [
835 '{{WRAPPER}} .ee--icon-box.right, {{WRAPPER}} .ee--icon-box.left' => 'align-items: {{VALUE}};',
836 ],
837 'condition' => [
838 'icon_direction' => ['left', 'right'],
839 ],
840 ]
841 );
842
843 $this->end_controls_section();
844
845 $this->start_controls_section(
846 'section_style_icon',
847 [
848 'label' => esc_html__( 'Icon', 'easy-elements' ),
849 'tab' => Controls_Manager::TAB_STYLE,
850 'condition' => [
851 'icon_type' => 'icon',
852 ],
853 ]
854 );
855
856 $this->start_controls_tabs('background_tabs');
857
858 $this->start_controls_tab('background_normal', [
859 'label' => __('Normal', 'easy-elements'),
860 ]);
861
862 $this->add_control(
863 'icon_color',
864 [
865 'label' => esc_html__( 'Color', 'easy-elements' ),
866 'type' => Controls_Manager::COLOR,
867 'selectors' => [
868 '{{WRAPPER}} .ee--icon-box .eel-icon' => 'color: {{VALUE}}; fill-opacity: 1;',
869 '{{WRAPPER}} .ee--icon-box .eel-icon svg' => 'fill: {{VALUE}}; fill-opacity: 1;',
870 '{{WRAPPER}} .ee--icon-box .eel-icon svg path' => 'fill: {{VALUE}}; fill-opacity: 1;',
871 ],
872 ]
873 );
874
875 $this->add_control(
876 'icon_bg_color',
877 [
878 'label' => esc_html__( 'Background', 'easy-elements' ),
879 'type' => Controls_Manager::COLOR,
880 'selectors' => [
881 '{{WRAPPER}} .ee--icon-box .eel-icon' => 'background-color: {{VALUE}};',
882 ],
883 ]
884 );
885
886 $this->add_group_control(
887 \Elementor\Group_Control_Background::get_type(),
888 [
889 'name' => 'background_gradiant',
890 'types' => [ 'classic', 'gradient'],
891 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
892 ]
893 );
894
895 $this->add_group_control(
896 \Elementor\Group_Control_Typography::get_type(),
897 [
898 'name' => 'icon_typography',
899 'label' => esc_html__( 'Icon Typography', 'easy-elements' ),
900 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
901 ]
902 );
903
904 $this->add_group_control(
905 \Elementor\Group_Control_Border::get_type(),
906 [
907 'name' => 'icon_border',
908 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
909 ]
910 );
911
912
913 $this->add_control(
914 'icon__border_radius',
915 [
916 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
917 'type' => \Elementor\Controls_Manager::DIMENSIONS,
918 'size_units' => [ 'px', '%' ],
919 'selectors' => [
920 '{{WRAPPER}} .ee--icon-box .eel-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
921 ],
922 ]
923 );
924
925 // gradient border color
926 $this->add_control(
927 'gradient_border',
928 [
929 'label' => esc_html__( 'Gradient Border', 'easy-elements' ),
930 'type' => \Elementor\Controls_Manager::SWITCHER,
931 'label_on' => esc_html__( 'Show', 'easy-elements' ),
932 'label_off' => esc_html__( 'Hide', 'easy-elements' ),
933 'return_value' => 'yes',
934 'default' => 'no',
935 ]
936 );
937
938 $this->add_responsive_control(
939 'icon_margin',
940 [
941 'label' => esc_html__( 'Margin', 'easy-elements' ),
942 'type' => \Elementor\Controls_Manager::DIMENSIONS,
943 'size_units' => [ 'px', '%', 'em', 'rem' ],
944 'selectors' => [
945 '{{WRAPPER}} .ee--icon-box .eel-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
946 ],
947 ]
948 );
949
950 $this->add_responsive_control(
951 'icon_box_size',
952 [
953 'label' => esc_html__( 'Box Size', 'easy-elements' ),
954 'type' => Controls_Manager::SLIDER,
955 'range' => [
956 'px' => [
957 'min' => 10,
958 'max' => 150,
959 ],
960 ],
961 'selectors' => [
962 '{{WRAPPER}} .ee--icon-box .eel-icon' => 'min-width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
963 ],
964 ]
965 );
966
967 $this->add_group_control(
968 \Elementor\Group_Control_Box_Shadow::get_type(),
969 [
970 'name' => 'icon_box_shadow',
971 'label' => esc_html__( 'Box Shadow', 'easy-elements' ),
972 'selector' => '{{WRAPPER}} .ee--icon-box .eel-icon',
973 ]
974 );
975
976 $this->add_control(
977 'icon_rotate',
978 [
979 'label' => esc_html__( 'Rotate', 'easy-elements' ),
980 'type' => \Elementor\Controls_Manager::SLIDER,
981 'size_units' => [ 'deg' ],
982 'range' => [
983 'deg' => [
984 'min' => 0,
985 'max' => 360,
986 'step' => 1,
987 ],
988 ],
989 'selectors' => [
990 '{{WRAPPER}} .ee--icon-box .eel-icon svg, {{WRAPPER}} .ee--icon-box .eel-icon i' => 'transform: rotate({{SIZE}}deg);',
991 ],
992 ]
993 );
994 $this->end_controls_tab();
995
996 $this->start_controls_tab('background_hover', [
997 'label' => __('Hover', 'easy-elements'),
998 ]);
999
1000 $this->add_control(
1001 'icon_hover_color',
1002 [
1003 'label' => esc_html__( 'Color', 'easy-elements' ),
1004 'type' => Controls_Manager::COLOR,
1005 'selectors' => [
1006 '{{WRAPPER}} .ee--icon-box:hover .eel-icon' => 'color: {{VALUE}};',
1007 '{{WRAPPER}} .ee--icon-box:hover .eel-icon svg path' => 'fill: {{VALUE}};',
1008 ],
1009
1010 ]
1011 );
1012
1013 $this->add_control(
1014 'icon_hover_bg_color',
1015 [
1016 'label' => esc_html__( 'Background', 'easy-elements' ),
1017 'type' => Controls_Manager::COLOR,
1018 'selectors' => [
1019 '{{WRAPPER}} .ee--icon-box:hover .eel-icon' => 'background-color: {{VALUE}};',
1020 ],
1021 ]
1022 );
1023
1024 $this->add_group_control(
1025 \Elementor\Group_Control_Background::get_type(),
1026 [
1027 'name' => 'icon_hover_bg_gradient',
1028 'types' => [ 'classic', 'gradient'],
1029 'selector' => '{{WRAPPER}} .ee--icon-box:hover .eel-icon',
1030 ]
1031 );
1032 $this->end_controls_tab();
1033 $this->end_controls_tabs();
1034 $this->end_controls_section();
1035
1036 $this->start_controls_section(
1037 'section_style_number',
1038 [
1039 'label' => esc_html__( 'Number', 'easy-elements' ),
1040 'tab' => Controls_Manager::TAB_STYLE,
1041 'condition' => [
1042 'number_title!' => '',
1043 ],
1044 ]
1045 );
1046
1047 $this->add_control(
1048 'number_title_color',
1049 [
1050 'label' => esc_html__( 'Color', 'easy-elements' ),
1051 'type' => \Elementor\Controls_Manager::COLOR,
1052 'selectors' => [
1053 '{{WRAPPER}} .eel-pro-number' => 'color: {{VALUE}};',
1054 ],
1055 'condition' => [
1056 'number_gradeint' => '',
1057 ],
1058 ]
1059 );
1060
1061 $this->add_control(
1062 'number_bg_color',
1063 [
1064 'label' => esc_html__( 'Background', 'easy-elements' ),
1065 'type' => \Elementor\Controls_Manager::COLOR,
1066 'selectors' => [
1067 '{{WRAPPER}} .eel-pro-number' => 'background: {{VALUE}};',
1068 ],
1069 ]
1070 );
1071
1072 $this->add_group_control(
1073 \Elementor\Group_Control_Background::get_type(),
1074 [
1075 'name' => 'number_title_background',
1076 'label' => esc_html__( 'Background Color', 'easy-elements' ),
1077 'types' => [ 'classic', 'gradient' ],
1078 'selector' => '{{WRAPPER}} .eel-pro-number',
1079 'condition' => [
1080 'number_gradeint' => 'yes',
1081 'number_title!' => ''
1082 ],
1083 ]
1084 );
1085
1086 $this->add_responsive_control(
1087 'number_alignment',
1088 [
1089 'label' => esc_html__( 'Alignment', 'easy-elements' ),
1090 'type' => \Elementor\Controls_Manager::CHOOSE,
1091 'options' => [
1092 'left' => [
1093 'title' => esc_html__( 'Left', 'easy-elements' ),
1094 'icon' => 'eicon-text-align-left',
1095 ],
1096 'center' => [
1097 'title' => esc_html__( 'Center', 'easy-elements' ),
1098 'icon' => 'eicon-text-align-center',
1099 ],
1100 'right' => [
1101 'title' => esc_html__( 'Right', 'easy-elements' ),
1102 'icon' => 'eicon-text-align-right',
1103 ],
1104 ],
1105 'selectors' => [
1106 '{{WRAPPER}} .eel-pro-number' => 'text-align: {{VALUE}};',
1107 ],
1108 ]
1109 );
1110
1111 $this->add_group_control(
1112 \Elementor\Group_Control_Typography::get_type(),
1113 [
1114 'name' => 'number_title_typography',
1115 'label' => esc_html__( 'Typography', 'easy-elements' ),
1116 'selector' => '{{WRAPPER}} .eel-pro-number',
1117 ]
1118 );
1119
1120 $this->add_group_control(
1121 \Elementor\Group_Control_Text_Stroke::get_type(),
1122 [
1123 'name' => 'number_title_text_stroke',
1124 'selector' => '{{WRAPPER}} .eel-pro-number',
1125 ]
1126 );
1127
1128 $this->add_group_control(
1129 \Elementor\Group_Control_Border::get_type(),
1130 [
1131 'name' => 'number_border',
1132 'selector' => '{{WRAPPER}} .eel-pro-number',
1133 ]
1134 );
1135
1136 $this->add_control(
1137 'number_border_radius',
1138 [
1139 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
1140 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1141 'size_units' => [ 'px', '%' ],
1142 'selectors' => [
1143 '{{WRAPPER}} .eel-pro-number' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1144 ],
1145 ]
1146 );
1147
1148 $this->add_responsive_control(
1149 'number_padding',
1150 [
1151 'label' => esc_html__( 'Padding', 'easy-elements' ),
1152 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1153 'size_units' => [ 'px', '%', 'em', 'rem' ],
1154 'selectors' => [
1155 '{{WRAPPER}} .eel-pro-number' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1156 ],
1157 ]
1158 );
1159
1160 $this->add_responsive_control(
1161 'number_margin',
1162 [
1163 'label' => esc_html__( 'Margin', 'easy-elements' ),
1164 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1165 'size_units' => [ 'px', '%', 'em', 'rem' ],
1166 'selectors' => [
1167 '{{WRAPPER}} .eel-pro-number' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1168 ],
1169 ]
1170 );
1171
1172 $this->add_responsive_control(
1173 'box_size',
1174 [
1175 'label' => esc_html__( 'Size', 'easy-elements' ),
1176 'type' => Controls_Manager::SLIDER,
1177 'range' => [
1178 'px' => [
1179 'min' => 10,
1180 'max' => 150,
1181 ],
1182 ],
1183 'selectors' => [
1184 '{{WRAPPER}} .eel-pro-number, {{WRAPPER}} .eel-pro-number *' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}}; flex: 0 0 {{SIZE}}{{UNIT}};',
1185 ],
1186 ]
1187 );
1188
1189 $this->end_controls_section();
1190
1191 $this->start_controls_section(
1192 'section_style_title',
1193 [
1194 'label' => esc_html__( 'Title', 'easy-elements' ),
1195 'tab' => Controls_Manager::TAB_STYLE,
1196 ]
1197 );
1198
1199 $this->start_controls_tabs('title_style');
1200
1201 $this->start_controls_tab('title_normal', [
1202 'label' => __('Normal', 'easy-elements'),
1203 ]);
1204
1205 $this->add_control(
1206 'title_color',
1207 [
1208 'label' => esc_html__( 'Color', 'easy-elements' ),
1209 'type' => Controls_Manager::COLOR,
1210 'selectors' => [
1211 '{{WRAPPER}} .icon-box-title' => 'color: {{VALUE}}; transition: all 0.3s ease-in;',
1212 ],
1213 ]
1214 );
1215
1216 $this->add_group_control(
1217 \Elementor\Group_Control_Typography::get_type(),
1218 [
1219 'name' => '_title_typography',
1220 'label' => esc_html__( 'Typography', 'easy-elements' ),
1221 'selector' => '{{WRAPPER}} .icon-box-title',
1222 ]
1223 );
1224
1225 $this->add_responsive_control(
1226 'title_margin',
1227 [
1228 'label' => esc_html__( 'Margin', 'easy-elements' ),
1229 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1230 'size_units' => [ 'px', '%', 'em', 'rem' ],
1231 'selectors' => [
1232 '{{WRAPPER}} .ee--icon-box .icon-box-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1233 ],
1234 ]
1235 );
1236
1237 $this->end_controls_tab();
1238
1239 $this->start_controls_tab('title_hover', [
1240 'label' => __('Hover', 'easy-elements'),
1241 ]);
1242
1243 $this->add_control(
1244 'title_hover_color',
1245 [
1246 'label' => esc_html__( 'Color', 'easy-elements' ),
1247 'type' => Controls_Manager::COLOR,
1248 'selectors' => [
1249 '{{WRAPPER}} .ee--icon-box:hover .icon-box-title' => 'color: {{VALUE}};',
1250 ],
1251 ]
1252 );
1253
1254 $this->end_controls_tab();
1255
1256 $this->end_controls_tabs();
1257
1258 $this->end_controls_section();
1259
1260 $this->start_controls_section(
1261 'section_style_description',
1262 [
1263 'label' => esc_html__( 'Description', 'easy-elements' ),
1264 'tab' => Controls_Manager::TAB_STYLE,
1265 ]
1266 );
1267
1268 $this->start_controls_tabs('desc_style');
1269
1270 $this->start_controls_tab('desc_normal', [
1271 'label' => __('Normal', 'easy-elements'),
1272 ]);
1273
1274 $this->add_control(
1275 'desc_color',
1276 [
1277 'label' => esc_html__( 'Color', 'easy-elements' ),
1278 'type' => Controls_Manager::COLOR,
1279 'selectors' => [
1280 '{{WRAPPER}} .icon-box-description' => 'color: {{VALUE}};',
1281 ],
1282 ]
1283 );
1284 $this->add_group_control(
1285 \Elementor\Group_Control_Typography::get_type(),
1286 [
1287 'name' => 'box_desc_typography',
1288 'label' => esc_html__( 'Typography', 'easy-elements' ),
1289 'selector' => '{{WRAPPER}} .icon-box-description',
1290 ]
1291 );
1292 $this->add_responsive_control(
1293 'description_margin',
1294 [
1295 'label' => esc_html__( 'Margin', 'easy-elements' ),
1296 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1297 'size_units' => [ 'px', '%', 'em', 'rem' ],
1298 'selectors' => [
1299 '{{WRAPPER}} .ee--icon-box .icon-box-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1300 ],
1301 ]
1302 );
1303
1304 $this->end_controls_tab();
1305
1306 $this->start_controls_tab('desc_hover', [
1307 'label' => __('Hover', 'easy-elements'),
1308 ]);
1309
1310 $this->add_control(
1311 'desc_hover_color',
1312 [
1313 'label' => esc_html__( 'Color', 'easy-elements' ),
1314 'type' => Controls_Manager::COLOR,
1315 'selectors' => [
1316 '{{WRAPPER}} .ee--icon-box:hover .icon-box-description' => 'color: {{VALUE}};',
1317 ],
1318 ]
1319 );
1320 $this->end_controls_tab();
1321
1322 $this->end_controls_tabs();
1323
1324 $this->end_controls_section();
1325
1326
1327
1328 $this->start_controls_section(
1329 'section_feature_style',
1330 [
1331 'label' => esc_html__( 'Features', 'easy-elements' ),
1332 'tab' => Controls_Manager::TAB_STYLE,
1333 ]
1334 );
1335
1336 $this->start_controls_tabs( 'feature_style_tabs' );
1337
1338 $this->start_controls_tab(
1339 'feature_style_normal',
1340 [
1341 'label' => esc_html__( 'Normal', 'easy-elements' ),
1342 ]
1343 );
1344
1345 $this->add_control(
1346 'feature_style_color',
1347 [
1348 'label' => esc_html__( 'Text Color', 'easy-elements' ),
1349 'type' => Controls_Manager::COLOR,
1350 'selectors' => [
1351 '{{WRAPPER}} .ee--icon-box .feature-item span' => 'color: {{VALUE}};',
1352 ],
1353 ]
1354 );
1355
1356 $this->add_control(
1357 'feature_icon_color',
1358 [
1359 'label' => esc_html__( 'Icon Color', 'easy-elements' ),
1360 'type' => Controls_Manager::COLOR,
1361 'selectors' => [
1362 '{{WRAPPER}} .ee--icon-box .feature-item i' => 'color: {{VALUE}};',
1363 '{{WRAPPER}} .ee--icon-box .feature-item svg' => 'fill: {{VALUE}};',
1364 '{{WRAPPER}} .ee--icon-box .feature-item svg path' => 'fill: {{VALUE}};',
1365 ],
1366 ]
1367 );
1368
1369 $this->end_controls_tab();
1370
1371 $this->start_controls_tab(
1372 'feature_style_hover',
1373 [
1374 'label' => esc_html__( 'Hover', 'easy-elements' ),
1375 ]
1376 );
1377
1378 $this->add_control(
1379 'feature_style_color_hover',
1380 [
1381 'label' => esc_html__( 'Text Color', 'easy-elements' ),
1382 'type' => Controls_Manager::COLOR,
1383 'selectors' => [
1384 '{{WRAPPER}} .ee--icon-box:hover .feature-item span' => 'color: {{VALUE}};',
1385 ],
1386 ]
1387 );
1388
1389 $this->add_control(
1390 'feature_icon_color_hover',
1391 [
1392 'label' => esc_html__( 'Icon Color', 'easy-elements' ),
1393 'type' => Controls_Manager::COLOR,
1394 'selectors' => [
1395 '{{WRAPPER}} .ee--icon-box:hover .feature-item i' => 'color: {{VALUE}};',
1396 '{{WRAPPER}} .ee--icon-box:hover .feature-item svg' => 'fill: {{VALUE}};',
1397 '{{WRAPPER}} .ee--icon-box:hover .feature-item svg path' => 'fill: {{VALUE}};',
1398 ],
1399 ]
1400 );
1401 $this->end_controls_tab();
1402
1403 $this->end_controls_tabs();
1404
1405 $this->add_group_control(
1406 \Elementor\Group_Control_Typography::get_type(),
1407 [
1408 'name' => 'feature_style_typography',
1409 'selector' => '{{WRAPPER}} .ee--icon-box .feature-item span',
1410 ]
1411 );
1412
1413 $this->add_responsive_control(
1414 'feature_style_margin',
1415 [
1416 'label' => esc_html__( 'Margin', 'easy-elements' ),
1417 'type' => Controls_Manager::DIMENSIONS,
1418 'size_units' => [ 'px', '%', 'em', 'rem' ],
1419 'selectors' => [
1420 '{{WRAPPER}} .ee--icon-box .feature-item' =>
1421 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1422 ],
1423 ]
1424 );
1425
1426 $this->add_responsive_control(
1427 'feature_icon_gap',
1428 [
1429 'label' => esc_html__( 'Icon Gap', 'easy-elements' ),
1430 'type' => Controls_Manager::SLIDER,
1431 'range' => [
1432 'px' => [
1433 'min' => 0,
1434 'max' => 100,
1435 ],
1436 ],
1437 'selectors' => [
1438 '{{WRAPPER}} .feature-item .eel-info-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
1439 '{{WRAPPER}} .feature-item svg' => 'margin-right: {{SIZE}}{{UNIT}};',
1440 ],
1441 ]
1442 );
1443 $this->add_responsive_control(
1444 'feature_icon_size',
1445 [
1446 'label' => esc_html__( 'Icon Size', 'easy-elements' ),
1447 'type' => Controls_Manager::SLIDER,
1448 'range' => [
1449 'px' => [
1450 'min' => 10,
1451 'max' => 100,
1452 ],
1453 ],
1454 'selectors' => [
1455 '{{WRAPPER}} .feature-item .eel-info-icon' => 'font-size: {{SIZE}}{{UNIT}};',
1456 '{{WRAPPER}} .feature-item svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1457 ],
1458 ]
1459 );
1460
1461 $this->end_controls_section();
1462
1463 $this->start_controls_section(
1464 'section_button_style',
1465 [
1466 'label' => esc_html__( 'Button', 'easy-elements' ),
1467 'tab' => Controls_Manager::TAB_STYLE,
1468 'condition' => [
1469 'show_read_more' => 'yes',
1470 ]
1471 ]
1472 );
1473
1474 $this->start_controls_tabs('button_tabs_style');
1475
1476 $this->start_controls_tab('button_normal_tab_style', [
1477 'label' => __('Normal', 'easy-elements'),
1478 ]);
1479
1480 $this->add_control(
1481 'read_more_icon_color',
1482 [
1483 'label' => esc_html__('Icon Color', 'easy-elements'),
1484 'type' => \Elementor\Controls_Manager::COLOR,
1485 'selectors' => [
1486 '{{WRAPPER}} .eel-read-more-icon svg' => 'fill: {{VALUE}};',
1487 '{{WRAPPER}} .eel-read-more-icon svg path' => 'fill: {{VALUE}};',
1488 '{{WRAPPER}} .eel-read-more-icon i' => 'color: {{VALUE}};',
1489 ],
1490 'condition' => [
1491 'show_read_more' => 'yes',
1492 'read_more_type' => 'read_icon',
1493 ],
1494 ]
1495 );
1496
1497 $this->add_control(
1498 'read_more_icon_bg_color',
1499 [
1500 'label' => esc_html__('Icon Background Color', 'easy-elements'),
1501 'type' => \Elementor\Controls_Manager::COLOR,
1502 'selectors' => [
1503 '{{WRAPPER}} .ee--icon-box .eel-read-more-icon' => 'background-color: {{VALUE}};',
1504 ],
1505 'condition' => [
1506 'show_read_more' => 'yes',
1507 'read_more_type' => 'read_icon',
1508 ],
1509 ]
1510 );
1511
1512 $this->add_responsive_control(
1513 'read_more_icon_padding',
1514 [
1515 'label' => esc_html__('Padding', 'easy-elements'),
1516 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1517 'size_units' => [ 'px', 'em', '%' ],
1518 'selectors' => [
1519 '{{WRAPPER}} .ee--icon-box .eel-read-more-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1520 ],
1521 'condition' => [
1522 'show_read_more' => 'yes',
1523 'read_more_type' => 'read_icon',
1524 ],
1525 ]
1526 );
1527
1528 $this->add_control(
1529 'border_radius_icon',
1530 [
1531 'label' => __('Border Radius', 'easy-elements'),
1532 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1533 'size_units' => ['px', '%', 'em'],
1534 'selectors' => [
1535 '{{WRAPPER}} .ee--icon-box .eel-read-more-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1536 ],
1537 'condition' => [
1538 'show_read_more' => 'yes',
1539 'read_more_type' => 'read_icon',
1540 ],
1541 ]
1542 );
1543
1544 $this->add_responsive_control(
1545 'read_more_icon_size',
1546 [
1547 'label' => esc_html__('Icon Size', 'easy-elements'),
1548 'type' => \Elementor\Controls_Manager::SLIDER,
1549 'range' => [
1550 'px' => [
1551 'min' => 10,
1552 'max' => 100,
1553 ],
1554 ],
1555 'selectors' => [
1556 '{{WRAPPER}} .eel-read-more-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1557 '{{WRAPPER}} .eel-read-more-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
1558 ],
1559 'condition' => [
1560 'show_read_more' => 'yes',
1561 'read_more_type' => 'read_icon',
1562 ],
1563 ]
1564 );
1565
1566
1567 $this->add_group_control(
1568 \Elementor\Group_Control_Typography::get_type(),
1569 [
1570 'name' => 'read_m_read_mr_typography',
1571 'label' => esc_html__( 'Typography', 'easy-elements' ),
1572 'selector' => '{{WRAPPER}} .eel-read-more-text',
1573 'condition' => [
1574 'show_read_more' => 'yes',
1575 'read_more_type' => ['read_text','read_icon_to_text'],
1576 ],
1577 ]
1578 );
1579
1580 $this->add_control(
1581 'read_more_text_color',
1582 [
1583 'label' => esc_html__('Text Color', 'easy-elements'),
1584 'type' => \Elementor\Controls_Manager::COLOR,
1585 'selectors' => [
1586 '{{WRAPPER}} .eel-read-more-text' => 'color: {{VALUE}};',
1587 '{{WRAPPER}} .eel-read-more-text svg' => 'fill: {{VALUE}};',
1588 '{{WRAPPER}} .eel-read-more-text svg path' => 'fill: {{VALUE}};',
1589 ],
1590 'condition' => [
1591 'show_read_more' => 'yes',
1592 'read_more_type' => ['read_text','read_icon_to_text'],
1593 ],
1594 ]
1595 );
1596
1597 $this->add_control(
1598 'read_more_text_bg_color',
1599 [
1600 'label' => esc_html__('Background Color', 'easy-elements'),
1601 'type' => \Elementor\Controls_Manager::COLOR,
1602 'selectors' => [
1603 '{{WRAPPER}} .eel-read-more-text' => 'background-color: {{VALUE}};',
1604 ],
1605 'condition' => [
1606 'show_read_more' => 'yes',
1607 'read_more_type' => ['read_text','read_icon_to_text'],
1608 ],
1609 ]
1610 );
1611
1612 $this->add_group_control(
1613 \Elementor\Group_Control_Border::get_type(),
1614 [
1615 'name' => 'read_more_text_border',
1616 'label' => esc_html__('Border', 'easy-elements'),
1617 'selector' => '{{WRAPPER}} .eel-read-more-text, {{WRAPPER}} .eel-read-more-icon',
1618 'condition' => [
1619 'show_read_more' => 'yes',
1620 ],
1621 ]
1622 );
1623
1624 $this->add_responsive_control(
1625 'top_btm',
1626 [
1627 'label' => esc_html__( 'Top/Bottom', 'easy-elements' ),
1628 'type' => \Elementor\Controls_Manager::SLIDER,
1629 'size_units' => [ 'px', '%' ],
1630 'range' => [
1631 'px' => [
1632 'min' => -100,
1633 'max' => 100,
1634 ],
1635 '%' => [
1636 'min' => -100,
1637 'max' => 100,
1638 ],
1639 ],
1640 'selectors' => [
1641 '{{WRAPPER}} .eel-read-more-text-icon' => 'top: {{SIZE}}{{UNIT}}; position: relative;',
1642 ],
1643 'condition' => [
1644 'show_read_more' => 'yes',
1645 'read_more_type' => ['read_text','read_icon_to_text'],
1646 'read_more_text_icon_show' => 'yes',
1647 ],
1648 ]
1649 );
1650
1651 $this->add_responsive_control(
1652 'icon_left_right',
1653 [
1654 'label' => esc_html__( 'Left/Right', 'easy-elements' ),
1655 'type' => \Elementor\Controls_Manager::SLIDER,
1656 'size_units' => [ 'px', '%' ],
1657 'range' => [
1658 'px' => [
1659 'min' => -100,
1660 'max' => 100,
1661 ],
1662 '%' => [
1663 'min' => -100,
1664 'max' => 100,
1665 ],
1666 ],
1667 'selectors' => [
1668 '{{WRAPPER}} .eel-read-more-text-icon' => 'left: {{SIZE}}{{UNIT}}; position: relative;',
1669 ],
1670 'condition' => [
1671 'show_read_more' => 'yes',
1672 'read_more_type' => ['read_text','read_icon_to_text'],
1673 'read_more_text_icon_show' => 'yes',
1674 ],
1675 ]
1676 );
1677
1678 $this->add_responsive_control(
1679 'read_more_text_icon_size',
1680 [
1681 'label' => esc_html__('Button Icon Size', 'easy-elements'),
1682 'type' => \Elementor\Controls_Manager::SLIDER,
1683 'range' => [
1684 'px' => [
1685 'min' => 10,
1686 'max' => 100,
1687 ],
1688 ],
1689 'selectors' => [
1690 '{{WRAPPER}} .eel-read-more-text-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
1691 '{{WRAPPER}} .eel-read-more-text-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
1692 ],
1693 'condition' => [
1694 'show_read_more' => 'yes',
1695 'read_more_type' => ['read_text','read_icon_to_text'],
1696 'read_more_text_icon_show' => 'yes',
1697 ],
1698 ]
1699 );
1700
1701 $this->add_responsive_control(
1702 'read_more_text_border_radius',
1703 [
1704 'label' => esc_html__('Border Radius', 'easy-elements'),
1705 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1706 'size_units' => [ 'px', '%' ],
1707 'selectors' => [
1708 '{{WRAPPER}} .eel-read-more-text' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1709 ],
1710 'condition' => [
1711 'show_read_more' => 'yes',
1712 'read_more_type' => ['read_text','read_icon_to_text'],
1713 ],
1714 ]
1715 );
1716
1717 $this->add_responsive_control(
1718 'read_more_text_padding',
1719 [
1720 'label' => esc_html__('Padding', 'easy-elements'),
1721 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1722 'size_units' => [ 'px', 'em', '%' ],
1723 'selectors' => [
1724 '{{WRAPPER}} .eel-read-more-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; display: inline-block;',
1725 ],
1726 'condition' => [
1727 'show_read_more' => 'yes',
1728 'read_more_type' => ['read_text','read_icon_to_text'],
1729 ],
1730 ]
1731 );
1732 $this->add_responsive_control(
1733 'read_more_icon_margin',
1734 [
1735 'label' => esc_html__('Margin', 'easy-elements'),
1736 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1737 'size_units' => [ 'px', 'em', '%' ],
1738 'selectors' => [
1739 '{{WRAPPER}} .ee--icon-box .eel-read-more' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1740 ]
1741 ]
1742 );
1743
1744
1745
1746 $this->add_responsive_control(
1747 'button_text_align',
1748 [
1749 'label' => esc_html__( 'Alignment', 'easy-elements' ),
1750 'type' => \Elementor\Controls_Manager::CHOOSE,
1751 'options' => [
1752 'flex-start' => [
1753 'title' => esc_html__( 'Left', 'easy-elements' ),
1754 'icon' => 'eicon-text-align-left',
1755 ],
1756 'center' => [
1757 'title' => esc_html__( 'Center', 'easy-elements' ),
1758 'icon' => 'eicon-text-align-center',
1759 ],
1760 'end' => [
1761 'title' => esc_html__( 'Right', 'easy-elements' ),
1762 'icon' => 'eicon-text-align-right',
1763 ],
1764 'stretch' => [
1765 'title' => esc_html__( 'Justified', 'easy-elements' ),
1766 'icon' => 'eicon-text-align-justify',
1767 ],
1768 ],
1769 'default' => 'left',
1770 'condition' => [
1771 'info_skin' => 'skin-2',
1772 ],
1773 'selectors' => [
1774 '{{WRAPPER}} .eel-info-skin-2 .eel-read-more' => 'justify-content: {{VALUE}};',
1775
1776 ],
1777 ]
1778 );
1779
1780
1781
1782 $this->end_controls_tab();
1783
1784 $this->start_controls_tab( 'button_hover_tab_style', [
1785 'label' => __('Hover', 'easy-elements'),
1786 ]);
1787
1788 $this->add_control(
1789 'read_more_text_color_hover',
1790 [
1791 'label' => esc_html__('Color', 'easy-elements'),
1792 'type' => \Elementor\Controls_Manager::COLOR,
1793 'selectors' => [
1794 '{{WRAPPER}} .ee--icon-box .eel-read-more-text:hover' => 'color: {{VALUE}};',
1795 '{{WRAPPER}} .eel-read-more-text:hover svg' => 'fill: {{VALUE}};',
1796 '{{WRAPPER}} .eel-read-more-text:hover svg path' => 'fill: {{VALUE}};',
1797 ],
1798 'condition' => [
1799 'show_read_more' => 'yes',
1800 'read_more_type' => ['read_text','read_icon_to_text'],
1801 ],
1802 ]
1803 );
1804
1805 $this->add_control(
1806 'read_more_text_color_item_hover',
1807 [
1808 'label' => esc_html__('Hover Color For Item', 'easy-elements'),
1809 'type' => \Elementor\Controls_Manager::COLOR,
1810 'selectors' => [
1811 '{{WRAPPER}} .elementor-widget-container:hover .eel-read-more-text' => 'color: {{VALUE}};',
1812 '{{WRAPPER}} .elementor-widget-container:hover .eel-read-more-text svg' => 'fill: {{VALUE}};',
1813 '{{WRAPPER}} .elementor-widget-container:hover .eel-read-more-text svg path' => 'fill: {{VALUE}};',
1814 ],
1815 'condition' => [
1816 'show_read_more' => 'yes',
1817 'read_more_type' => ['read_text','read_icon_to_text'],
1818 ],
1819 ]
1820 );
1821
1822 $this->add_control(
1823 'read_more_bg_hover',
1824 [
1825 'label' => esc_html__('Background', 'easy-elements'),
1826 'type' => \Elementor\Controls_Manager::COLOR,
1827 'selectors' => [
1828 '{{WRAPPER}} .ee--icon-box .eel-read-more-text:hover' => 'background: {{VALUE}};',
1829 ],
1830 'condition' => [
1831 'show_read_more' => 'yes',
1832 'read_more_type' => ['read_text','read_icon_to_text'],
1833 ],
1834 ]
1835 );
1836
1837 $this->add_control(
1838 'read_more_text_bg_item_hover',
1839 [
1840 'label' => esc_html__('Background Color For Item', 'easy-elements'),
1841 'type' => \Elementor\Controls_Manager::COLOR,
1842 'selectors' => [
1843 '{{WRAPPER}} .elementor-widget-container:hover .eel-read-more-text' => 'background-color: {{VALUE}}; border-color: {{VALUE}};',
1844 ],
1845 'condition' => [
1846 'show_read_more' => 'yes',
1847 'read_more_type' => ['read_text','read_icon_to_text'],
1848 ],
1849 ]
1850 );
1851
1852 $this->add_control(
1853 'read_more_hover_border_color',
1854 [
1855 'label' => esc_html__('Border Color', 'easy-elements'),
1856 'type' => \Elementor\Controls_Manager::COLOR,
1857 'selectors' => [
1858 '{{WRAPPER}} .ee--icon-box .eel-read-more-text:hover' => 'border-color: {{VALUE}};',
1859 ],
1860 'condition' => [
1861 'show_read_more' => 'yes',
1862 'read_more_type' => ['read_text','read_icon_to_text'],
1863 ],
1864 ]
1865 );
1866
1867 $this->end_controls_tab();
1868 $this->end_controls_tabs();
1869
1870 $this->end_controls_section();
1871 }
1872
1873 protected function render() {
1874 $settings = $this->get_settings_for_display();
1875 $gradient_border = ( isset( $settings['gradient_border'] ) && $settings['gradient_border'] === 'yes' ) ? 'ee--gradient-border' : '';
1876 $info_skin = isset($settings['info_skin']) ? esc_attr($settings['info_skin']) : '';
1877
1878 ?>
1879 <div class="eel-icon-box-wraps">
1880 <?php
1881 $icon_direction = isset($settings['icon_direction']) ? esc_attr($settings['icon_direction']) : '';
1882 $link = isset($settings['link']['url']) ? esc_url($settings['link']['url']) : '';
1883 $target = ! empty( $settings['link']['is_external'] ) ? ' target="_blank"' : '';
1884 $nofollow = ! empty( $settings['link']['nofollow'] ) ? ' rel="nofollow"' : '';
1885 $item_hover_styles = !empty( $settings['item_bg_hover_styles'] ) ? $settings['item_bg_hover_styles'] : '';
1886 // Old widget settings won't have this key — default to enabled for backward compatibility.
1887 $enable_box_link = ! isset( $settings['enable_box_link'] ) || $settings['enable_box_link'] === 'yes';
1888
1889 ?>
1890
1891 <?php
1892 // Resolve the skin directory to its canonical path so any
1893 // include below is verifiably inside the widget's own skin/
1894 // folder — no path traversal can escape it.
1895 $skin_root = realpath( plugin_dir_path( __FILE__ ) . 'skin' );
1896 $allowed_skins = [
1897 'default' => 'default.php',
1898 'skin-2' => 'skin-2.php',
1899 ];
1900 $skin_key = isset( $allowed_skins[ $info_skin ] ) ? $info_skin : 'default';
1901 $skin_target = false !== $skin_root
1902 ? realpath( $skin_root . DIRECTORY_SEPARATOR . $allowed_skins[ $skin_key ] )
1903 : false;
1904 if ( false !== $skin_target
1905 && false !== $skin_root
1906 && 0 === strpos( $skin_target, $skin_root . DIRECTORY_SEPARATOR )
1907 && substr( $skin_target, -4 ) === '.php'
1908 ) {
1909 include $skin_target;
1910 }
1911 ?>
1912
1913 </div>
1914 <?php
1915 }
1916 }