PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.3.18
UiCore Elements – Free widgets and templates for Elementor v1.3.18
1.3.18 1.3.17 1.3.16 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.2.0 1.2.1 1.2.2 1.2.3 All 42 releases
← All changes | includes/widgets/icon-list.php +345 -283 1.0.13 → 1.3.18 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 namespace UiCoreElements;
3 4
4 5 use Elementor\Repeater;
5 6 use Elementor\Controls_Manager;
@@ -41,14 +42,19 @@
41 42 return ['uicore'];
42 43 }
43 44 public function get_styles()
44 45 {
45 - return ['icon-list'];
46 + return ['icon-list'];
46 47 }
47 48 public function get_scripts()
48 49 {
49 50 return [];
50 51 }
52 + public function has_widget_inner_wrapper(): bool
53 + {
54 + // TODO: remove after Optmized Markup experiment is merged to the core
55 + return ! \Elementor\Plugin::$instance->experiments->is_feature_active('e_optimized_markup');
56 + }
51 57 public function get_keywords()
52 58 {
53 59 return ['icon', 'list', 'uicore'];
54 60 }
@@ -61,8 +67,23 @@
61 67 'label' => esc_html__('Items', 'uicore-elements'),
62 68 ]
63 69 );
64 70
71 + $this->add_control(
72 + 'padding_by_dimensions',
73 + [
74 + 'type' => Controls_Manager::NOTICE,
75 + 'notice_type' => 'warning',
76 + 'dismissible' => true,
77 + 'heading' => esc_html__("Number Count styles update", 'uicore-elements'),
78 + 'content' => esc_html__('The Number Count padding control was replaced by width/height controls. Please, check your widgets numbers styles.', 'uicore-elements'),
79 + 'condition' => [
80 + 'show_number_icon' => 'yes',
81 + ]
82 + ]
83 + );
84 +
85 +
65 86 $repeater = new Repeater();
66 87
67 88 $repeater->add_control(
68 89 'text',
@@ -98,11 +119,11 @@
98 119 'type' => Controls_Manager::ICONS,
99 120 'label_block' => false,
100 121 'skin' => 'inline',
101 122 'default' => [
102 - 'value' => 'fas fa-check',
103 - 'library' => 'fa-solid',
104 - ],
123 + 'value' => 'fas fa-check',
124 + 'library' => 'fa-solid',
125 + ],
105 126 ]
106 127 );
107 128
108 129 $repeater->add_control(
@@ -122,14 +143,14 @@
122 143 'link',
123 144 [
124 145 'label' => esc_html__('Link', 'uicore-elements'),
125 146 'type' => Controls_Manager::URL,
126 - 'options' => [ 'url', 'is_external', 'nofollow' ],
127 - 'default' => [
128 - 'url' => '',
129 - 'is_external' => false,
130 - 'nofollow' => false,
131 - ],
147 + 'options' => ['url', 'is_external', 'nofollow'],
148 + 'default' => [
149 + 'url' => '',
150 + 'is_external' => false,
151 + 'nofollow' => false,
152 + ],
132 153 'dynamic' => [
133 154 'active' => true,
134 155 ],
135 156 'label_block' => true,
@@ -191,11 +212,11 @@
191 212 'max' => 50,
192 213 ],
193 214 ],
194 215 'default' => [
195 - 'unit' => 'px',
196 - 'size' => 10,
197 - ],
216 + 'unit' => 'px',
217 + 'size' => 10,
218 + ],
198 219 'selectors' => [
199 220 '{{WRAPPER}}' => '--ui-e-grid-gap: {{SIZE}}{{UNIT}};',
200 221 ],
201 222 ]
@@ -273,9 +294,9 @@
273 294 'title' => esc_html__('Right', 'uicore-elements'),
274 295 'icon' => 'eicon-h-align-right',
275 296 ],
276 297 ],
277 - 'default' => 'left',
298 + 'default' => is_rtl() ? 'right' : 'left',
278 299 'prefix_class' => 'ui-e-icon-',
279 300 'separator' => 'before'
280 301 ]
281 302 );
@@ -307,34 +328,34 @@
307 328 ]
308 329 );
309 330
310 331 $this->add_responsive_control(
311 - 'vertical_alignment_offset',
312 - [
313 - 'label' => esc_html__( 'Vertical Alignment Offset', 'uicore-elements' ),
314 - 'type' => \Elementor\Controls_Manager::SLIDER,
315 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
316 - 'range' => [
317 - 'px' => [
318 - 'min' => -25,
319 - 'max' => 25,
320 - 'step' => 1,
321 - ],
322 - '%' => [
323 - 'min' => -100,
324 - 'max' => 100,
332 + 'vertical_alignment_offset',
333 + [
334 + 'label' => esc_html__('Vertical Alignment Offset', 'uicore-elements'),
335 + 'type' => \Elementor\Controls_Manager::SLIDER,
336 + 'size_units' => ['px', '%', 'em', 'rem', 'custom'],
337 + 'range' => [
338 + 'px' => [
339 + 'min' => -25,
340 + 'max' => 25,
341 + 'step' => 1,
342 + ],
343 + '%' => [
344 + 'min' => -100,
345 + 'max' => 100,
325 346 'step' => 5,
326 - ],
327 - ],
347 + ],
348 + ],
328 349 'default' => [
329 350 'size' => 0,
330 351 'unit' => 'px',
331 352 ],
332 - 'selectors' => [
333 - '{{WRAPPER}} .ui-e-icon' => 'transform: translate3d(0,{{SIZE}}{{UNIT}},0);',
334 - ],
335 - ]
336 - );
353 + 'selectors' => [
354 + '{{WRAPPER}} .ui-e-icon' => 'transform: translate3d(0,{{SIZE}}{{UNIT}},0);',
355 + ],
356 + ]
357 + );
337 358
338 359 $this->add_control(
339 360 'content_position',
340 361 [
@@ -401,35 +422,35 @@
401 422 'label' => esc_html__('Normal', 'uicore-elements'),
402 423 ]
403 424 );
404 425
405 - $this->add_group_control(
406 - Group_Control_Background::get_type(),
407 - [
408 - 'name' => 'list_item_bg_color',
409 - 'selector' => '{{WRAPPER}} .ui-e-wrap',
410 - ]
411 - );
426 + $this->add_group_control(
427 + Group_Control_Background::get_type(),
428 + [
429 + 'name' => 'list_item_bg_color',
430 + 'selector' => '{{WRAPPER}} .ui-e-wrap',
431 + ]
432 + );
412 433
413 - $this->add_group_control(
414 - Group_Control_Border::get_type(),
415 - [
416 - 'name' => 'list_item_border',
417 - 'label' => esc_html__('Border', 'uicore-elements'),
418 - 'selector' => '{{WRAPPER}} .ui-e-wrap',
419 - ]
420 - );
434 + $this->add_group_control(
435 + Group_Control_Border::get_type(),
436 + [
437 + 'name' => 'list_item_border',
438 + 'label' => esc_html__('Border', 'uicore-elements'),
439 + 'selector' => '{{WRAPPER}} .ui-e-wrap',
440 + ]
441 + );
421 442
422 - $this->add_group_control(
423 - Group_Control_Box_Shadow::get_type(),
424 - [
425 - 'name' => 'list_item_box_shadow',
426 - 'label' => esc_html__('Box Shadow', 'uicore-elements'),
427 - 'selector' => '{{WRAPPER}} .ui-e-wrap',
428 - ]
429 - );
443 + $this->add_group_control(
444 + Group_Control_Box_Shadow::get_type(),
445 + [
446 + 'name' => 'list_item_box_shadow',
447 + 'label' => esc_html__('Box Shadow', 'uicore-elements'),
448 + 'selector' => '{{WRAPPER}} .ui-e-wrap',
449 + ]
450 + );
430 451
431 - $this->end_controls_tab();
452 + $this->end_controls_tab();
432 453
433 454 $this->start_controls_tab(
434 455 'list_item_tabs_hover',
435 456 [
@@ -436,60 +457,60 @@
436 457 'label' => esc_html__('Hover', 'uicore-elements'),
437 458 ]
438 459 );
439 460
440 - $this->add_group_control(
441 - Group_Control_Background::get_type(),
442 - [
443 - 'name' => 'list_item_hover_bg_color',
444 - 'selector' => '{{WRAPPER}} .ui-e-wrap:hover',
445 - ]
446 - );
461 + $this->add_group_control(
462 + Group_Control_Background::get_type(),
463 + [
464 + 'name' => 'list_item_hover_bg_color',
465 + 'selector' => '{{WRAPPER}} .ui-e-wrap:hover',
466 + ]
467 + );
447 468
448 - $this->add_control(
449 - 'list_item_hover_border',
450 - [
451 - 'label' => esc_html__('Border Color', 'uicore-elements'),
452 - 'type' => Controls_Manager::COLOR,
453 - 'selectors' => [
454 - '{{WRAPPER}} .ui-e-wrap:hover' => 'border-color: {{VALUE}} !important',
455 - ],
456 - 'condition' => [
457 - 'list_item_border_border!' => ''
458 - ]
469 + $this->add_control(
470 + 'list_item_hover_border',
471 + [
472 + 'label' => esc_html__('Border Color', 'uicore-elements'),
473 + 'type' => Controls_Manager::COLOR,
474 + 'selectors' => [
475 + '{{WRAPPER}} .ui-e-wrap:hover' => 'border-color: {{VALUE}} !important',
476 + ],
477 + 'condition' => [
478 + 'list_item_border_border!' => ''
459 479 ]
460 - );
480 + ]
481 + );
461 482
462 - $this->add_group_control(
463 - Group_Control_Box_Shadow::get_type(),
464 - [
465 - 'name' => 'list_item_box_shadow_hover',
466 - 'label' => esc_html__('Box Shadow', 'uicore-elements'),
467 - 'selector' => '{{WRAPPER}} .ui-e-wrap:hover',
468 - ]
469 - );
483 + $this->add_group_control(
484 + Group_Control_Box_Shadow::get_type(),
485 + [
486 + 'name' => 'list_item_box_shadow_hover',
487 + 'label' => esc_html__('Box Shadow', 'uicore-elements'),
488 + 'selector' => '{{WRAPPER}} .ui-e-wrap:hover',
489 + ]
490 + );
470 491
471 - $this->add_responsive_control(
472 - 'list_item_transition',
473 - [
474 - 'label' => esc_html__('Transition', 'uicore-elements'),
475 - 'type' => Controls_Manager::SLIDER,
476 - 'size_units' => ['s'],
477 - 'range' => [
478 - 's' => [
479 - 'min' => 0.01,
480 - 'max' => 1,
481 - ],
492 + $this->add_responsive_control(
493 + 'list_item_transition',
494 + [
495 + 'label' => esc_html__('Transition', 'uicore-elements'),
496 + 'type' => Controls_Manager::SLIDER,
497 + 'size_units' => ['s'],
498 + 'range' => [
499 + 's' => [
500 + 'min' => 0.01,
501 + 'max' => 1,
482 502 ],
483 - 'default' => [
484 - 'unit' => 's',
485 - 'size' => 0.2,
486 - ],
487 - 'selectors' => [
488 - '{{WRAPPER}} .ui-e-wrap' => '--ui-e-transition: {{SIZE}}{{UNIT}}',
489 - ],
490 - ]
491 - );
503 + ],
504 + 'default' => [
505 + 'unit' => 's',
506 + 'size' => 0.2,
507 + ],
508 + 'selectors' => [
509 + '{{WRAPPER}} .ui-e-wrap' => '--ui-e-transition: {{SIZE}}{{UNIT}}',
510 + ],
511 + ]
512 + );
492 513
493 514 $this->end_controls_tab();
494 515
495 516 $this->end_controls_tabs();
@@ -494,13 +515,13 @@
494 515
495 516 $this->end_controls_tabs();
496 517
497 518 $this->add_control(
498 - 'hr',
499 - [
500 - 'type' => \Elementor\Controls_Manager::DIVIDER,
501 - ]
502 - );
519 + 'hr',
520 + [
521 + 'type' => \Elementor\Controls_Manager::DIVIDER,
522 + ]
523 + );
503 524
504 525 $this->add_responsive_control(
505 526 'list_item_border_radius',
506 527 [
@@ -627,20 +648,54 @@
627 648 ],
628 649 ]
629 650 );
630 651
631 - $this->add_responsive_control(
632 - 'icon_number_padding',
652 + $this->add_control(
653 + 'icon_number_width',
633 654 [
634 - 'label' => esc_html__('Padding', 'uicore-elements'),
635 - 'type' => Controls_Manager::DIMENSIONS,
636 - 'size_units' => ['px', 'em', '%'],
637 - 'selectors' => [
638 - '{{WRAPPER}} .ui-e-number' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
655 + 'label' => esc_html__('Width', 'uicore-elements'),
656 + 'type' => Controls_Manager::SLIDER,
657 + 'size_units' => ['px', 'em', 'rem', 'custom'],
658 + 'range' => [
659 + 'px' => [
660 + 'min' => 0,
661 + 'max' => 200,
662 + 'step' => 1,
663 + ],
639 664 ],
665 + 'default' => [
666 + 'unit' => 'px',
667 + 'size' => 25,
668 + ],
669 + 'selectors' => [
670 + '{{WRAPPER}} .ui-e-number' => 'min-width: {{SIZE}}{{UNIT}};',
671 + ],
640 672 ]
641 673 );
642 674
675 + $this->add_control(
676 + 'icon_number_height',
677 + [
678 + 'label' => esc_html__('Height', 'uicore-elements'),
679 + 'type' => Controls_Manager::SLIDER,
680 + 'size_units' => ['px', 'em', 'rem', 'custom'],
681 + 'range' => [
682 + 'px' => [
683 + 'min' => 0,
684 + 'max' => 200,
685 + 'step' => 1,
686 + ],
687 + ],
688 + 'default' => [
689 + 'unit' => 'px',
690 + 'size' => 25,
691 + ],
692 + 'selectors' => [
693 + '{{WRAPPER}} .ui-e-number' => 'min-height: {{SIZE}}{{UNIT}};',
694 + ],
695 + ]
696 + );
697 +
643 698 $this->add_responsive_control(
644 699 'icon_number_margin',
645 700 [
646 701 'label' => esc_html__('Margin', 'uicore-elements'),
@@ -861,30 +916,30 @@
861 916 'tab' => Controls_Manager::TAB_STYLE,
862 917 ]
863 918 );
864 919
865 - $this->add_control(
866 - 'icon_size',
867 - [
868 - 'label' => esc_html__( 'Icon Size', 'uicore-elements' ),
869 - 'type' => \Elementor\Controls_Manager::SLIDER,
870 - 'size_units' => [ 'px'],
871 - 'range' => [
872 - 'px' => [
873 - 'min' => 0,
874 - 'max' => 80,
875 - 'step' => 3,
876 - ],
877 - ],
878 - 'default' => [
879 - 'unit' => 'px',
880 - 'size' => 15,
881 - ],
882 - 'selectors' => [
883 - '{{WRAPPER}} .ui-e-icon' => '--ui-e-icon-size: {{SIZE}}{{UNIT}};',
884 - ],
885 - ]
886 - );
920 + $this->add_responsive_control(
921 + 'icon_size',
922 + [
923 + 'label' => esc_html__('Icon Size', 'uicore-elements'),
924 + 'type' => \Elementor\Controls_Manager::SLIDER,
925 + 'size_units' => ['px'],
926 + 'range' => [
927 + 'px' => [
928 + 'min' => 0,
929 + 'max' => 80,
930 + 'step' => 3,
931 + ],
932 + ],
933 + 'default' => [
934 + 'unit' => 'px',
935 + 'size' => 15,
936 + ],
937 + 'selectors' => [
938 + '{{WRAPPER}} .ui-e-icon' => '--ui-e-icon-size: {{SIZE}}{{UNIT}};',
939 + ],
940 + ]
941 + );
887 942
888 943 $this->start_controls_tabs('tabs_mode_style1');
889 944 $this->start_controls_tab(
890 945 'tab_normal_mode_normal1',
@@ -897,11 +952,10 @@
897 952 'icon_color',
898 953 [
899 954 'label' => esc_html__('Color', 'uicore-elements'),
900 955 'type' => Controls_Manager::COLOR,
901 - 'global' => [
902 - 'default' => Global_Colors::COLOR_PRIMARY,
903 - ],
956 + 'default' => 'var(--e-global-color-uicore_primary)',
957 +
904 958 'selectors' => [
905 959 '{{WRAPPER}} .ui-e-icon' => '--ui-e-icon-color: {{VALUE}}',
906 960 ],
907 961 ]
@@ -1031,90 +1085,88 @@
1031 1085 ]
1032 1086 );
1033 1087
1034 1088 $this->add_control(
1035 - 'line_color',
1036 - [
1037 - 'label' => esc_html__( 'Line Color', 'uicore-elements' ),
1038 - 'type' => \Elementor\Controls_Manager::COLOR,
1039 - 'default' => '#333',
1040 - 'global' => [
1041 - 'default' => Global_Colors::COLOR_PRIMARY,
1042 - ],
1043 - 'selectors' => [
1044 - '{{WRAPPER}} li:after' => 'background-color: {{VALUE}}',
1045 - ],
1046 - ]
1047 - );
1089 + 'line_color',
1090 + [
1091 + 'label' => esc_html__('Line Color', 'uicore-elements'),
1092 + 'type' => \Elementor\Controls_Manager::COLOR,
1093 + 'default' => 'var(--e-global-color-uicore_body)',
1048 1094
1095 + 'selectors' => [
1096 + '{{WRAPPER}} li:after' => 'background-color: {{VALUE}}',
1097 + ],
1098 + ]
1099 + );
1100 +
1049 1101 $this->add_responsive_control(
1050 - 'line_thick',
1051 - [
1052 - 'label' => esc_html__( 'Line Thickness', 'uicore-elements' ),
1053 - 'type' => \Elementor\Controls_Manager::SLIDER,
1054 - 'size_units' => [ 'px'],
1055 - 'range' => [
1056 - 'px' => [
1057 - 'min' => 1,
1058 - 'max' => 10,
1059 - 'step' => 1,
1060 - ],
1061 - ],
1062 - 'default' => [
1063 - 'unit' => 'px',
1064 - 'size' => 1,
1065 - ],
1066 - 'selectors' => [
1067 - '{{WRAPPER}} li:after' => 'width: {{SIZE}}{{UNIT}};',
1068 - ],
1069 - ]
1070 - );
1102 + 'line_thick',
1103 + [
1104 + 'label' => esc_html__('Line Thickness', 'uicore-elements'),
1105 + 'type' => \Elementor\Controls_Manager::SLIDER,
1106 + 'size_units' => ['px'],
1107 + 'range' => [
1108 + 'px' => [
1109 + 'min' => 1,
1110 + 'max' => 10,
1111 + 'step' => 1,
1112 + ],
1113 + ],
1114 + 'default' => [
1115 + 'unit' => 'px',
1116 + 'size' => 1,
1117 + ],
1118 + 'selectors' => [
1119 + '{{WRAPPER}} li:after' => 'width: {{SIZE}}{{UNIT}};',
1120 + ],
1121 + ]
1122 + );
1071 1123
1072 1124 $this->add_responsive_control(
1073 - 'line_horizontal_offset',
1074 - [
1075 - 'label' => esc_html__( 'Line Horizontal Offset', 'uicore-elements' ),
1076 - 'type' => \Elementor\Controls_Manager::SLIDER,
1077 - 'size_units' => [ 'px'],
1078 - 'range' => [
1079 - 'px' => [
1080 - 'min' => 0,
1081 - 'max' => 50,
1082 - 'step' => 1,
1083 - ],
1084 - ],
1085 - 'default' => [
1086 - 'unit' => 'px',
1087 - 'size' => 5,
1088 - ],
1089 - 'selectors' => [
1090 - '{{WRAPPER}} li:after' => '{{icon_position.VALUE}}: {{SIZE}}{{UNIT}};',
1091 - ],
1092 - ]
1093 - );
1125 + 'line_horizontal_offset',
1126 + [
1127 + 'label' => esc_html__('Line Horizontal Offset', 'uicore-elements'),
1128 + 'type' => \Elementor\Controls_Manager::SLIDER,
1129 + 'size_units' => ['px'],
1130 + 'range' => [
1131 + 'px' => [
1132 + 'min' => 0,
1133 + 'max' => 50,
1134 + 'step' => 1,
1135 + ],
1136 + ],
1137 + 'default' => [
1138 + 'unit' => 'px',
1139 + 'size' => 5,
1140 + ],
1141 + 'selectors' => [
1142 + '{{WRAPPER}} li:after' => '{{icon_position.VALUE}}: {{SIZE}}{{UNIT}};',
1143 + ],
1144 + ]
1145 + );
1094 1146
1095 1147 $this->add_responsive_control(
1096 - 'line_vertical_offset',
1097 - [
1098 - 'label' => esc_html__( 'Line Vertical Offset', 'uicore-elements' ),
1099 - 'type' => \Elementor\Controls_Manager::SLIDER,
1100 - 'size_units' => [ 'px'],
1101 - 'range' => [
1102 - 'px' => [
1103 - 'min' => 0,
1104 - 'max' => 100,
1105 - 'step' => 1,
1106 - ],
1107 - ],
1108 - 'default' => [
1109 - 'unit' => 'px',
1110 - 'size' => 15,
1111 - ],
1112 - 'selectors' => [
1113 - '{{WRAPPER}} li:after' => 'top: {{SIZE}}{{UNIT}};',
1114 - ],
1115 - ]
1116 - );
1148 + 'line_vertical_offset',
1149 + [
1150 + 'label' => esc_html__('Line Vertical Offset', 'uicore-elements'),
1151 + 'type' => \Elementor\Controls_Manager::SLIDER,
1152 + 'size_units' => ['px'],
1153 + 'range' => [
1154 + 'px' => [
1155 + 'min' => 0,
1156 + 'max' => 100,
1157 + 'step' => 1,
1158 + ],
1159 + ],
1160 + 'default' => [
1161 + 'unit' => 'px',
1162 + 'size' => 15,
1163 + ],
1164 + 'selectors' => [
1165 + '{{WRAPPER}} li:after' => 'top: {{SIZE}}{{UNIT}};',
1166 + ],
1167 + ]
1168 + );
1117 1169
1118 1170 $this->end_controls_section();
1119 1171
1120 1172 $this->start_controls_section(
@@ -1145,8 +1197,19 @@
1145 1197 ],
1146 1198 ]
1147 1199 );
1148 1200
1201 + $this->add_control(
1202 + 'image_background',
1203 + [
1204 + 'label' => esc_html__('Background Color', 'uicore-elements'),
1205 + 'type' => Controls_Manager::COLOR,
1206 + 'selectors' => [
1207 + '{{WRAPPER}} .ui-e-img img' => 'background-color: {{VALUE}};',
1208 + ],
1209 + ]
1210 + );
1211 +
1149 1212 $this->add_responsive_control(
1150 1213 'image_margin',
1151 1214 [
1152 1215 'label' => esc_html__('Margin', 'uicore-elements'),
@@ -1157,9 +1220,8 @@
1157 1220 ],
1158 1221 ]
1159 1222 );
1160 1223
1161 - //size
1162 1224 $this->add_responsive_control(
1163 1225 'image_size',
1164 1226 [
1165 1227 'label' => esc_html__('Size', 'uicore-elements'),
@@ -1185,82 +1247,82 @@
1185 1247 protected function render()
1186 1248 {
1187 1249
1188 1250 $settings = $this->get_settings_for_display();
1189 - $this->add_render_attribute('icon_list', 'class', $settings['show_number_icon'] === 'yes' ? 'ui-e-number' : '');
1190 - ?>
1191 - <ul>
1192 - <?php foreach ($settings['icon_list'] as $index => $item) :
1251 + $this->add_render_attribute('icon_list', 'class', $this->is_option('show_number_icon', 'yes') ? 'ui-e-number' : '');
1252 +?>
1253 + <ul>
1254 + <?php foreach ($settings['icon_list'] as $index => $item) :
1193 1255
1194 - $i = $index + 1; // index is 0 based
1256 + $i = $index + 1; // index is 0 based
1195 1257
1196 - // Prepare the atts
1197 - $repeater_setting_key = $this->get_repeater_setting_key('text', 'icon_list', $index);
1198 - $tag = $settings['title_tags'];
1199 - $this->add_render_attribute($repeater_setting_key, 'class', 'elementor-icon-list-text');
1200 - $this->add_render_attribute('list_title_tags', 'class', 'ui-e-title', true);
1258 + // Prepare the atts
1259 + $repeater_setting_key = $this->get_repeater_setting_key('text', 'icon_list', $index);
1260 + $tag = $settings['title_tags'];
1261 + $this->add_render_attribute($repeater_setting_key, 'class', 'elementor-icon-list-text');
1262 + $this->add_render_attribute('list_title_tags', 'class', 'ui-e-title', true);
1201 1263
1202 - // Build url wrapper if link is set
1203 - if (!empty( $item['link']['url'] ) ) {
1204 - $link_key = 'link_' . $index;
1205 - $this->add_link_attributes( $link_key, $item['link'] );
1264 + // Build url wrapper if link is set
1265 + if (!empty($item['link']['url'])) {
1266 + $link_key = 'link_' . $index;
1267 + $this->add_link_attributes($link_key, $item['link']);
1206 1268
1207 - $wrapper = "<a class='ui-e-wrap' {$this->get_render_attribute_string($link_key)}>";
1208 - $wrapperClosure = 'a';
1269 + $wrapper = "<a class='ui-e-wrap' {$this->get_render_attribute_string($link_key)}>";
1270 + $wrapperClosure = 'a';
1209 1271
1210 1272 // Build default wrapper otherwise
1211 - } else {
1212 - $wrapper = '<div class="ui-e-wrap">';
1213 - $wrapperClosure = 'div';
1214 - }
1273 + } else {
1274 + $wrapper = '<div class="ui-e-wrap">';
1275 + $wrapperClosure = 'div';
1276 + }
1215 1277
1216 - ?>
1217 - <li <?php $this->print_render_attribute_string('list_class');?>>
1278 + ?>
1279 + <li <?php $this->print_render_attribute_string('list_class'); ?>>
1218 1280
1219 - <?php echo wp_kses_post($wrapper); ?>
1281 + <?php echo wp_kses_post($wrapper); ?>
1220 1282
1221 - <?php if($settings['show_number_icon'] == 'yes') : ?>
1222 - <div class='ui-e-number'>
1223 - <span> <?php echo esc_html($i);?> </span>
1224 - </div>
1225 - <?php endif; ?>
1283 + <?php if ($this->is_option('show_number_icon', 'yes')) : ?>
1284 + <div class='ui-e-number'>
1285 + <span> <?php echo esc_html($i); ?> </span>
1286 + </div>
1287 + <?php endif; ?>
1226 1288
1227 - <?php if (!empty($item['img']['url'])) : ?>
1228 - <div class="ui-e-img">
1229 - <?php
1230 - $thumb_url = $item['img']['url'];
1231 - if ($thumb_url) {
1232 - echo wp_kses_post(wp_get_attachment_image(
1233 - $item['img']['id'],
1234 - 'medium',
1235 - false,
1236 - [
1237 - 'alt' => esc_html($item['text'])
1238 - ]
1239 - ));
1240 - }
1241 - ?>
1242 - </div>
1243 - <?php endif; ?>
1289 + <?php if (!empty($item['img']['url'])) : ?>
1290 + <div class="ui-e-img">
1291 + <?php
1292 + $thumb_url = $item['img']['url'];
1293 + if ($thumb_url) {
1294 + echo wp_kses_post(wp_get_attachment_image(
1295 + $item['img']['id'],
1296 + 'medium',
1297 + false,
1298 + [
1299 + 'alt' => esc_html($item['text'])
1300 + ]
1301 + ));
1302 + }
1303 + ?>
1304 + </div>
1305 + <?php endif; ?>
1244 1306
1245 - <div class="ui-e-content">
1246 - <<?php echo esc_html($tag);?> <?php $this->print_render_attribute_string('list_title_tags');?>>
1247 - <?php echo wp_kses_post($item['text']); ?>
1248 - </<?php echo esc_html($tag);?>>
1249 - <p class="ui-e-text"> <?php echo wp_kses_post($item['text_details']);?> </p>
1250 - </div>
1307 + <div class="ui-e-content">
1308 + <<?php echo Helper::esc_tag($tag); ?> <?php $this->print_render_attribute_string('list_title_tags'); ?>>
1309 + <?php echo wp_kses_post($item['text']); ?>
1310 + </<?php echo Helper::esc_tag($tag); ?>>
1311 + <p class="ui-e-text"> <?php echo wp_kses_post($item['text_details']); ?> </p>
1312 + </div>
1251 1313
1252 - <?php if (!empty($item['list_icon']['value'])) : ?>
1253 - <div class="ui-e-icon">
1254 - <?php Icons_Manager::render_icon($item['list_icon'], ['aria-hidden' => 'true']); ?>
1255 - </div>
1256 - <?php endif; ?>
1314 + <?php if (!empty($item['list_icon']['value'])) : ?>
1315 + <div class="ui-e-icon">
1316 + <?php Icons_Manager::render_icon($item['list_icon'], ['aria-hidden' => 'true']); ?>
1317 + </div>
1318 + <?php endif; ?>
1257 1319
1258 - </<?php echo esc_html($wrapperClosure)?>>
1259 - </li>
1260 - <?php
1261 - endforeach; ?>
1262 - </ul>
1263 - <?php
1320 + </<?php echo esc_html($wrapperClosure) ?>>
1321 + </li>
1322 + <?php
1323 + endforeach; ?>
1324 + </ul>
1325 +<?php
1264 1326 }
1265 1327 }
1266 -\Elementor\Plugin::instance()->widgets_manager->register(new IconList());
1328 +\Elementor\Plugin::instance()->widgets_manager->register(new IconList());