PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.3.17
UiCore Elements – Free widgets and templates for Elementor v1.3.17
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 1.2.4 All 41 releases
← All changes | includes/widgets/icon-list.php +345 -287 1.2.11.3.17 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,18 +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 }
51 - // TODO: remove or set as false, after 3.30, when the full deprecation of widget innet wrapper is ready
52 - public function has_widget_inner_wrapper(): bool {
53 - return true;
54 - }
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 + }
55 57 public function get_keywords()
56 58 {
57 59 return ['icon', 'list', 'uicore'];
58 60 }
@@ -65,8 +67,23 @@
65 67 'label' => esc_html__('Items', 'uicore-elements'),
66 68 ]
67 69 );
68 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 +
69 86 $repeater = new Repeater();
70 87
71 88 $repeater->add_control(
72 89 'text',
@@ -102,11 +119,11 @@
102 119 'type' => Controls_Manager::ICONS,
103 120 'label_block' => false,
104 121 'skin' => 'inline',
105 122 'default' => [
106 - 'value' => 'fas fa-check',
107 - 'library' => 'fa-solid',
108 - ],
123 + 'value' => 'fas fa-check',
124 + 'library' => 'fa-solid',
125 + ],
109 126 ]
110 127 );
111 128
112 129 $repeater->add_control(
@@ -126,14 +143,14 @@
126 143 'link',
127 144 [
128 145 'label' => esc_html__('Link', 'uicore-elements'),
129 146 'type' => Controls_Manager::URL,
130 - 'options' => [ 'url', 'is_external', 'nofollow' ],
131 - 'default' => [
132 - 'url' => '',
133 - 'is_external' => false,
134 - 'nofollow' => false,
135 - ],
147 + 'options' => ['url', 'is_external', 'nofollow'],
148 + 'default' => [
149 + 'url' => '',
150 + 'is_external' => false,
151 + 'nofollow' => false,
152 + ],
136 153 'dynamic' => [
137 154 'active' => true,
138 155 ],
139 156 'label_block' => true,
@@ -195,11 +212,11 @@
195 212 'max' => 50,
196 213 ],
197 214 ],
198 215 'default' => [
199 - 'unit' => 'px',
200 - 'size' => 10,
201 - ],
216 + 'unit' => 'px',
217 + 'size' => 10,
218 + ],
202 219 'selectors' => [
203 220 '{{WRAPPER}}' => '--ui-e-grid-gap: {{SIZE}}{{UNIT}};',
204 221 ],
205 222 ]
@@ -277,9 +294,9 @@
277 294 'title' => esc_html__('Right', 'uicore-elements'),
278 295 'icon' => 'eicon-h-align-right',
279 296 ],
280 297 ],
281 - 'default' => 'left',
298 + 'default' => is_rtl() ? 'right' : 'left',
282 299 'prefix_class' => 'ui-e-icon-',
283 300 'separator' => 'before'
284 301 ]
285 302 );
@@ -311,34 +328,34 @@
311 328 ]
312 329 );
313 330
314 331 $this->add_responsive_control(
315 - 'vertical_alignment_offset',
316 - [
317 - 'label' => esc_html__( 'Vertical Alignment Offset', 'uicore-elements' ),
318 - 'type' => \Elementor\Controls_Manager::SLIDER,
319 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
320 - 'range' => [
321 - 'px' => [
322 - 'min' => -25,
323 - 'max' => 25,
324 - 'step' => 1,
325 - ],
326 - '%' => [
327 - 'min' => -100,
328 - '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,
329 346 'step' => 5,
330 - ],
331 - ],
347 + ],
348 + ],
332 349 'default' => [
333 350 'size' => 0,
334 351 'unit' => 'px',
335 352 ],
336 - 'selectors' => [
337 - '{{WRAPPER}} .ui-e-icon' => 'transform: translate3d(0,{{SIZE}}{{UNIT}},0);',
338 - ],
339 - ]
340 - );
353 + 'selectors' => [
354 + '{{WRAPPER}} .ui-e-icon' => 'transform: translate3d(0,{{SIZE}}{{UNIT}},0);',
355 + ],
356 + ]
357 + );
341 358
342 359 $this->add_control(
343 360 'content_position',
344 361 [
@@ -405,35 +422,35 @@
405 422 'label' => esc_html__('Normal', 'uicore-elements'),
406 423 ]
407 424 );
408 425
409 - $this->add_group_control(
410 - Group_Control_Background::get_type(),
411 - [
412 - 'name' => 'list_item_bg_color',
413 - 'selector' => '{{WRAPPER}} .ui-e-wrap',
414 - ]
415 - );
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 + );
416 433
417 - $this->add_group_control(
418 - Group_Control_Border::get_type(),
419 - [
420 - 'name' => 'list_item_border',
421 - 'label' => esc_html__('Border', 'uicore-elements'),
422 - 'selector' => '{{WRAPPER}} .ui-e-wrap',
423 - ]
424 - );
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 + );
425 442
426 - $this->add_group_control(
427 - Group_Control_Box_Shadow::get_type(),
428 - [
429 - 'name' => 'list_item_box_shadow',
430 - 'label' => esc_html__('Box Shadow', 'uicore-elements'),
431 - 'selector' => '{{WRAPPER}} .ui-e-wrap',
432 - ]
433 - );
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 + );
434 451
435 - $this->end_controls_tab();
452 + $this->end_controls_tab();
436 453
437 454 $this->start_controls_tab(
438 455 'list_item_tabs_hover',
439 456 [
@@ -440,60 +457,60 @@
440 457 'label' => esc_html__('Hover', 'uicore-elements'),
441 458 ]
442 459 );
443 460
444 - $this->add_group_control(
445 - Group_Control_Background::get_type(),
446 - [
447 - 'name' => 'list_item_hover_bg_color',
448 - 'selector' => '{{WRAPPER}} .ui-e-wrap:hover',
449 - ]
450 - );
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 + );
451 468
452 - $this->add_control(
453 - 'list_item_hover_border',
454 - [
455 - 'label' => esc_html__('Border Color', 'uicore-elements'),
456 - 'type' => Controls_Manager::COLOR,
457 - 'selectors' => [
458 - '{{WRAPPER}} .ui-e-wrap:hover' => 'border-color: {{VALUE}} !important',
459 - ],
460 - 'condition' => [
461 - 'list_item_border_border!' => ''
462 - ]
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!' => ''
463 479 ]
464 - );
480 + ]
481 + );
465 482
466 - $this->add_group_control(
467 - Group_Control_Box_Shadow::get_type(),
468 - [
469 - 'name' => 'list_item_box_shadow_hover',
470 - 'label' => esc_html__('Box Shadow', 'uicore-elements'),
471 - 'selector' => '{{WRAPPER}} .ui-e-wrap:hover',
472 - ]
473 - );
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 + );
474 491
475 - $this->add_responsive_control(
476 - 'list_item_transition',
477 - [
478 - 'label' => esc_html__('Transition', 'uicore-elements'),
479 - 'type' => Controls_Manager::SLIDER,
480 - 'size_units' => ['s'],
481 - 'range' => [
482 - 's' => [
483 - 'min' => 0.01,
484 - 'max' => 1,
485 - ],
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,
486 502 ],
487 - 'default' => [
488 - 'unit' => 's',
489 - 'size' => 0.2,
490 - ],
491 - 'selectors' => [
492 - '{{WRAPPER}} .ui-e-wrap' => '--ui-e-transition: {{SIZE}}{{UNIT}}',
493 - ],
494 - ]
495 - );
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 + );
496 513
497 514 $this->end_controls_tab();
498 515
499 516 $this->end_controls_tabs();
@@ -498,13 +515,13 @@
498 515
499 516 $this->end_controls_tabs();
500 517
501 518 $this->add_control(
502 - 'hr',
503 - [
504 - 'type' => \Elementor\Controls_Manager::DIVIDER,
505 - ]
506 - );
519 + 'hr',
520 + [
521 + 'type' => \Elementor\Controls_Manager::DIVIDER,
522 + ]
523 + );
507 524
508 525 $this->add_responsive_control(
509 526 'list_item_border_radius',
510 527 [
@@ -631,20 +648,54 @@
631 648 ],
632 649 ]
633 650 );
634 651
635 - $this->add_responsive_control(
636 - 'icon_number_padding',
652 + $this->add_control(
653 + 'icon_number_width',
637 654 [
638 - 'label' => esc_html__('Padding', 'uicore-elements'),
639 - 'type' => Controls_Manager::DIMENSIONS,
640 - 'size_units' => ['px', 'em', '%'],
641 - 'selectors' => [
642 - '{{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 + ],
643 664 ],
665 + 'default' => [
666 + 'unit' => 'px',
667 + 'size' => 25,
668 + ],
669 + 'selectors' => [
670 + '{{WRAPPER}} .ui-e-number' => 'min-width: {{SIZE}}{{UNIT}};',
671 + ],
644 672 ]
645 673 );
646 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 +
647 698 $this->add_responsive_control(
648 699 'icon_number_margin',
649 700 [
650 701 'label' => esc_html__('Margin', 'uicore-elements'),
@@ -865,30 +916,30 @@
865 916 'tab' => Controls_Manager::TAB_STYLE,
866 917 ]
867 918 );
868 919
869 - $this->add_control(
870 - 'icon_size',
871 - [
872 - 'label' => esc_html__( 'Icon Size', 'uicore-elements' ),
873 - 'type' => \Elementor\Controls_Manager::SLIDER,
874 - 'size_units' => [ 'px'],
875 - 'range' => [
876 - 'px' => [
877 - 'min' => 0,
878 - 'max' => 80,
879 - 'step' => 3,
880 - ],
881 - ],
882 - 'default' => [
883 - 'unit' => 'px',
884 - 'size' => 15,
885 - ],
886 - 'selectors' => [
887 - '{{WRAPPER}} .ui-e-icon' => '--ui-e-icon-size: {{SIZE}}{{UNIT}};',
888 - ],
889 - ]
890 - );
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 + );
891 942
892 943 $this->start_controls_tabs('tabs_mode_style1');
893 944 $this->start_controls_tab(
894 945 'tab_normal_mode_normal1',
@@ -901,11 +952,10 @@
901 952 'icon_color',
902 953 [
903 954 'label' => esc_html__('Color', 'uicore-elements'),
904 955 'type' => Controls_Manager::COLOR,
905 - 'global' => [
906 - 'default' => Global_Colors::COLOR_PRIMARY,
907 - ],
956 + 'default' => 'var(--e-global-color-uicore_primary)',
957 +
908 958 'selectors' => [
909 959 '{{WRAPPER}} .ui-e-icon' => '--ui-e-icon-color: {{VALUE}}',
910 960 ],
911 961 ]
@@ -1035,90 +1085,88 @@
1035 1085 ]
1036 1086 );
1037 1087
1038 1088 $this->add_control(
1039 - 'line_color',
1040 - [
1041 - 'label' => esc_html__( 'Line Color', 'uicore-elements' ),
1042 - 'type' => \Elementor\Controls_Manager::COLOR,
1043 - 'default' => '#333',
1044 - 'global' => [
1045 - 'default' => Global_Colors::COLOR_PRIMARY,
1046 - ],
1047 - 'selectors' => [
1048 - '{{WRAPPER}} li:after' => 'background-color: {{VALUE}}',
1049 - ],
1050 - ]
1051 - );
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)',
1052 1094
1095 + 'selectors' => [
1096 + '{{WRAPPER}} li:after' => 'background-color: {{VALUE}}',
1097 + ],
1098 + ]
1099 + );
1100 +
1053 1101 $this->add_responsive_control(
1054 - 'line_thick',
1055 - [
1056 - 'label' => esc_html__( 'Line Thickness', 'uicore-elements' ),
1057 - 'type' => \Elementor\Controls_Manager::SLIDER,
1058 - 'size_units' => [ 'px'],
1059 - 'range' => [
1060 - 'px' => [
1061 - 'min' => 1,
1062 - 'max' => 10,
1063 - 'step' => 1,
1064 - ],
1065 - ],
1066 - 'default' => [
1067 - 'unit' => 'px',
1068 - 'size' => 1,
1069 - ],
1070 - 'selectors' => [
1071 - '{{WRAPPER}} li:after' => 'width: {{SIZE}}{{UNIT}};',
1072 - ],
1073 - ]
1074 - );
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 + );
1075 1123
1076 1124 $this->add_responsive_control(
1077 - 'line_horizontal_offset',
1078 - [
1079 - 'label' => esc_html__( 'Line Horizontal Offset', 'uicore-elements' ),
1080 - 'type' => \Elementor\Controls_Manager::SLIDER,
1081 - 'size_units' => [ 'px'],
1082 - 'range' => [
1083 - 'px' => [
1084 - 'min' => 0,
1085 - 'max' => 50,
1086 - 'step' => 1,
1087 - ],
1088 - ],
1089 - 'default' => [
1090 - 'unit' => 'px',
1091 - 'size' => 5,
1092 - ],
1093 - 'selectors' => [
1094 - '{{WRAPPER}} li:after' => '{{icon_position.VALUE}}: {{SIZE}}{{UNIT}};',
1095 - ],
1096 - ]
1097 - );
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 + );
1098 1146
1099 1147 $this->add_responsive_control(
1100 - 'line_vertical_offset',
1101 - [
1102 - 'label' => esc_html__( 'Line Vertical Offset', 'uicore-elements' ),
1103 - 'type' => \Elementor\Controls_Manager::SLIDER,
1104 - 'size_units' => [ 'px'],
1105 - 'range' => [
1106 - 'px' => [
1107 - 'min' => 0,
1108 - 'max' => 100,
1109 - 'step' => 1,
1110 - ],
1111 - ],
1112 - 'default' => [
1113 - 'unit' => 'px',
1114 - 'size' => 15,
1115 - ],
1116 - 'selectors' => [
1117 - '{{WRAPPER}} li:after' => 'top: {{SIZE}}{{UNIT}};',
1118 - ],
1119 - ]
1120 - );
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 + );
1121 1169
1122 1170 $this->end_controls_section();
1123 1171
1124 1172 $this->start_controls_section(
@@ -1149,8 +1197,19 @@
1149 1197 ],
1150 1198 ]
1151 1199 );
1152 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 +
1153 1212 $this->add_responsive_control(
1154 1213 'image_margin',
1155 1214 [
1156 1215 'label' => esc_html__('Margin', 'uicore-elements'),
@@ -1161,9 +1220,8 @@
1161 1220 ],
1162 1221 ]
1163 1222 );
1164 1223
1165 - //size
1166 1224 $this->add_responsive_control(
1167 1225 'image_size',
1168 1226 [
1169 1227 'label' => esc_html__('Size', 'uicore-elements'),
@@ -1189,82 +1247,82 @@
1189 1247 protected function render()
1190 1248 {
1191 1249
1192 1250 $settings = $this->get_settings_for_display();
1193 - $this->add_render_attribute('icon_list', 'class', $settings['show_number_icon'] === 'yes' ? 'ui-e-number' : '');
1194 - ?>
1195 - <ul>
1196 - <?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) :
1197 1255
1198 - $i = $index + 1; // index is 0 based
1256 + $i = $index + 1; // index is 0 based
1199 1257
1200 - // Prepare the atts
1201 - $repeater_setting_key = $this->get_repeater_setting_key('text', 'icon_list', $index);
1202 - $tag = $settings['title_tags'];
1203 - $this->add_render_attribute($repeater_setting_key, 'class', 'elementor-icon-list-text');
1204 - $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);
1205 1263
1206 - // Build url wrapper if link is set
1207 - if (!empty( $item['link']['url'] ) ) {
1208 - $link_key = 'link_' . $index;
1209 - $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']);
1210 1268
1211 - $wrapper = "<a class='ui-e-wrap' {$this->get_render_attribute_string($link_key)}>";
1212 - $wrapperClosure = 'a';
1269 + $wrapper = "<a class='ui-e-wrap' {$this->get_render_attribute_string($link_key)}>";
1270 + $wrapperClosure = 'a';
1213 1271
1214 1272 // Build default wrapper otherwise
1215 - } else {
1216 - $wrapper = '<div class="ui-e-wrap">';
1217 - $wrapperClosure = 'div';
1218 - }
1273 + } else {
1274 + $wrapper = '<div class="ui-e-wrap">';
1275 + $wrapperClosure = 'div';
1276 + }
1219 1277
1220 - ?>
1221 - <li <?php $this->print_render_attribute_string('list_class');?>>
1278 + ?>
1279 + <li <?php $this->print_render_attribute_string('list_class'); ?>>
1222 1280
1223 - <?php echo wp_kses_post($wrapper); ?>
1281 + <?php echo wp_kses_post($wrapper); ?>
1224 1282
1225 - <?php if($settings['show_number_icon'] == 'yes') : ?>
1226 - <div class='ui-e-number'>
1227 - <span> <?php echo esc_html($i);?> </span>
1228 - </div>
1229 - <?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; ?>
1230 1288
1231 - <?php if (!empty($item['img']['url'])) : ?>
1232 - <div class="ui-e-img">
1233 - <?php
1234 - $thumb_url = $item['img']['url'];
1235 - if ($thumb_url) {
1236 - echo wp_kses_post(wp_get_attachment_image(
1237 - $item['img']['id'],
1238 - 'medium',
1239 - false,
1240 - [
1241 - 'alt' => esc_html($item['text'])
1242 - ]
1243 - ));
1244 - }
1245 - ?>
1246 - </div>
1247 - <?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; ?>
1248 1306
1249 - <div class="ui-e-content">
1250 - <<?php echo esc_html($tag);?> <?php $this->print_render_attribute_string('list_title_tags');?>>
1251 - <?php echo wp_kses_post($item['text']); ?>
1252 - </<?php echo esc_html($tag);?>>
1253 - <p class="ui-e-text"> <?php echo wp_kses_post($item['text_details']);?> </p>
1254 - </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>
1255 1313
1256 - <?php if (!empty($item['list_icon']['value'])) : ?>
1257 - <div class="ui-e-icon">
1258 - <?php Icons_Manager::render_icon($item['list_icon'], ['aria-hidden' => 'true']); ?>
1259 - </div>
1260 - <?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; ?>
1261 1319
1262 - </<?php echo esc_html($wrapperClosure)?>>
1263 - </li>
1264 - <?php
1265 - endforeach; ?>
1266 - </ul>
1267 - <?php
1320 + </<?php echo esc_html($wrapperClosure) ?>>
1321 + </li>
1322 + <?php
1323 + endforeach; ?>
1324 + </ul>
1325 +<?php
1268 1326 }
1269 1327 }
1270 -\Elementor\Plugin::instance()->widgets_manager->register(new IconList());
1328 +\Elementor\Plugin::instance()->widgets_manager->register(new IconList());