PluginProbe ʕ •ᴥ•ʔ
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor / 4.0.0
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor v4.0.0
4.0.2 4.0.1 4.0.0 3.10.02 3.10.01 3.9.10 3.9.9 3.9.8 3.9.7 3.9.5 3.9.6 3.9.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.3.1 2.3.1.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.4.0 2.5.0 2.5.1 2.5.10 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.2 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.6.0 3.6.1 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.8.1 3.8.2 3.9.0 3.9.1 3.9.2 trunk 1.2.6 1.2.7 1.2.9 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.0.9.1 2.0.9.2 2.0.9.3
elementskit-lite / widgets / page-list / page-list.php
elementskit-lite / widgets / page-list Last commit date
page-list-handler.php 6 months ago page-list.php 3 weeks ago
page-list.php
1065 lines
1 <?php
2 namespace Elementor;
3
4 use \Elementor\ElementsKit_Widget_Page_List_Handler as Handler;
5 use \ElementsKit_Lite\Modules\Controls\Controls_Manager as ElementsKit_Controls_Manager;
6
7 if (! defined( 'ABSPATH' ) ) exit;
8
9 class ElementsKit_Widget_Page_List extends Widget_Base {
10 use \ElementsKit_Lite\Widgets\Widget_Notice;
11
12 public $base;
13
14 public function get_name() {
15 return Handler::get_name();
16 }
17
18 public function get_title() {
19 return Handler::get_title();
20 }
21
22 public function get_icon() {
23 return Handler::get_icon();
24 }
25
26 public function get_keywords() {
27 return Handler::get_keywords();
28 }
29
30 public function get_categories() {
31 return Handler::get_categories();
32 }
33
34 public function get_help_url() {
35 return 'https://wpmet.com/doc/page-list/';
36 }
37
38 public function get_style_depends() {
39 return ['ekit-page-list'];
40 }
41
42 protected function is_dynamic_content(): bool {
43 return false;
44 }
45
46 protected function register_controls() {
47 $this->start_controls_section(
48 'section_icon',
49 [
50 'label' => esc_html__( 'List', 'elementskit-lite' ),
51 ]
52 );
53
54 $repeater = new Repeater();
55
56 $repeater->add_control(
57 'text',
58 [
59 'label' => esc_html__( 'Text', 'elementskit-lite' ),
60 'type' => Controls_Manager::TEXT,
61 'dynamic' => [
62 'active' => true,
63 ],
64 'label_block' => true,
65 'placeholder' => esc_html__( 'List Title', 'elementskit-lite' ),
66 ]
67 );
68
69 $repeater->add_control(
70 'ekit_menu_widget_sub_title',
71 [
72 'label' => esc_html__( 'Sub Title', 'elementskit-lite' ),
73 'type' => Controls_Manager::TEXT,
74 'dynamic' => [
75 'active' => true,
76 ],
77 'label_block' => true,
78 'placeholder' => esc_html__( 'Type your title here', 'elementskit-lite' ),
79 ]
80 );
81
82 $repeater->add_group_control(
83 Group_Control_Background::get_type(),
84 [
85 'name' => 'ekit_page_list_background_rep',
86 'label' => esc_html__( 'Background', 'elementskit-lite' ),
87 'types' => [ 'classic', 'gradient' ],
88 'selector' => '{{WRAPPER}} .ekit-wid-con {{CURRENT_ITEM}}',
89 'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
90 ]
91 );
92
93 $repeater->add_control(
94 'ekit_page_list_show_icon',
95 [
96 'label' => esc_html__( 'Show Icon', 'elementskit-lite' ),
97 'type' => Controls_Manager::SWITCHER,
98 'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
99 'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
100 'return_value' => 'yes',
101 'default' => 'no',
102 ]
103 );
104
105 $repeater->add_control(
106 'icons',
107 [
108 'label' => esc_html__( 'Icon', 'elementskit-lite' ),
109 'type' => Controls_Manager::ICONS,
110 'label_block' => true,
111 'fa4compatibility' => 'icon',
112 'default' => [
113 'value' => 'fas fa-check',
114 'library' => 'fa-solid',
115 ],
116 'condition' => [
117 'ekit_page_list_show_icon' => 'yes'
118 ],
119 ]
120 );
121
122 $repeater->add_responsive_control(
123 'icon_color',
124 [
125 'label' => esc_html__( 'Color', 'elementskit-lite' ),
126 'type' => Controls_Manager::COLOR,
127 'default' => '',
128 'selectors' => [
129 '{{WRAPPER}} {{CURRENT_ITEM}} .elementor-icon-list-icon i' => 'color: {{VALUE}};',
130 '{{WRAPPER}} {{CURRENT_ITEM}} .elementor-icon-list-icon svg' => 'fill: {{VALUE}};'
131 ],
132 'condition' => [
133 'ekit_page_list_show_icon' => 'yes'
134 ],
135 ]
136 );
137
138 $repeater->add_control(
139 'ekit_page_list_select_page_or_custom_link',
140 [
141 'label' => esc_html__( 'Selct Page / Custom Link', 'elementskit-lite' ),
142 'type' => Controls_Manager::SWITCHER,
143 'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
144 'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
145 'return_value' => 'yes',
146 'default' => 'yes',
147 ]
148 );
149
150 $repeater->add_control(
151 'link',
152 [
153 'label' =>esc_html__('Select Page', 'elementskit-lite'),
154 'type' => ElementsKit_Controls_Manager::AJAXSELECT2,
155 'options' =>'ajaxselect2/page_list',
156 'label_block' => true,
157 'multiple' => false,
158 'condition' => [
159 'ekit_page_list_select_page_or_custom_link' => 'yes'
160 ]
161 ]
162 );
163
164 $repeater->add_control(
165 'ekit_page_list_website_link',
166 [
167 'label' => esc_html__( 'Link', 'elementskit-lite' ),
168 'type' => Controls_Manager::URL,
169 'dynamic' => [
170 'active' => true,
171 ],
172 'placeholder' => esc_html__( 'https://wpmet.com', 'elementskit-lite' ),
173 'show_external' => true,
174 'condition' => [
175 'ekit_page_list_select_page_or_custom_link!' => 'yes'
176 ]
177 ]
178 );
179
180 $repeater->add_control(
181 'ekit_menu_list_show_label',
182 [
183 'label' => esc_html__( 'Show Label', 'elementskit-lite' ),
184 'type' => Controls_Manager::SWITCHER,
185 'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
186 'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
187 'return_value' => 'yes',
188 'default' => 'no',
189 ]
190 );
191
192 $repeater->add_control(
193 'ekit_menu_list_label_title',
194 [
195 'label' => esc_html__( 'Label', 'elementskit-lite' ),
196 'type' => Controls_Manager::TEXT,
197 'dynamic' => [
198 'active' => true,
199 ],
200 'default' => esc_html__( 'Default title', 'elementskit-lite' ),
201 'placeholder' => esc_html__( 'Type your title here', 'elementskit-lite' ),
202 'condition' => [
203 'ekit_menu_list_show_label' => 'yes'
204 ]
205 ]
206 );
207
208 $repeater->add_group_control(
209 Group_Control_Background::get_type(),
210 [
211 'name' => 'ekit_menu_list_label_title_background',
212 'label' => esc_html__( 'Background', 'elementskit-lite' ),
213 'types' => [ 'classic', ],
214 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .ekit_menu_label',
215 'exclude' => ['image'], // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
216 'condition' => [
217 'ekit_menu_list_show_label' => 'yes'
218 ]
219 ]
220 );
221
222 $repeater->add_responsive_control(
223 'ekit_menu_list_label_title_color',
224 [
225 'label' => esc_html__( 'Color', 'elementskit-lite' ),
226 'type' => Controls_Manager::COLOR,
227 'selectors' => [
228 '{{WRAPPER}} {{CURRENT_ITEM}} .ekit_menu_label' => 'color: {{VALUE}}',
229 ],
230 'condition' => [
231 'ekit_menu_list_show_label' => 'yes'
232 ]
233 ]
234 );
235
236 $this->add_control(
237 'icon_list',
238 [
239 'label' => '',
240 'type' => Controls_Manager::REPEATER,
241 'fields' => $repeater->get_controls(),
242 'title_field' => '{{{ text }}}',
243 ]
244 );
245
246 $this->end_controls_section();
247
248 $this->start_controls_section(
249 'page_list_settings',
250 [
251 'label' => esc_html__( 'Settings', 'elementskit-lite' )
252 ]
253 );
254
255 $this->add_control(
256 'view',
257 [
258 'label' => esc_html__( 'Layout', 'elementskit-lite' ),
259 'type' => Controls_Manager::CHOOSE,
260 'default' => 'traditional',
261 'options' => [
262 'traditional' => [
263 'title' => esc_html__( 'Default', 'elementskit-lite' ),
264 'icon' => 'eicon-editor-list-ul',
265 ],
266 'inline' => [
267 'title' => esc_html__( 'Inline', 'elementskit-lite' ),
268 'icon' => 'eicon-ellipsis-h',
269 ],
270 ],
271 'render_type' => 'template',
272 'classes' => 'elementor-control-start-end',
273 'label_block' => false,
274 'style_transfer' => true,
275 ]
276 );
277
278 $this->add_responsive_control(
279 'page_grid',
280 [
281 'label' => esc_html__( 'Columns Grid', 'elementskit-lite' ),
282 'type' => Controls_Manager::SELECT,
283 'options' => [
284 '12' => esc_html__( '1 Columns', 'elementskit-lite' ),
285 '6' => esc_html__( '2 Columns', 'elementskit-lite' ),
286 '4' => esc_html__( '3 Columns', 'elementskit-lite' ),
287 '3' => esc_html__( '4 Columns', 'elementskit-lite' ),
288 '2' => esc_html__( '6 Columns', 'elementskit-lite' ),
289 ],
290 'condition' => ['view' => 'inline']
291 ]
292 );
293
294 $this->add_control(
295 'ekit_href_target',
296 [
297 'label' => esc_html__( 'Target', 'elementskit-lite' ),
298 'type' => Controls_Manager::SELECT,
299 'default' => '_blank',
300 'options' => [
301 '_blank' => esc_html__( 'Blank', 'elementskit-lite' ),
302 'self' => esc_html__( 'Self', 'elementskit-lite' ),
303 ],
304 ]
305 );
306
307 $this->add_control(
308 'ekit_href_rel',
309 [
310 'label' => esc_html__( 'Rel', 'elementskit-lite' ),
311 'type' => Controls_Manager::SWITCHER,
312 'label_on' => esc_html__( 'Show', 'elementskit-lite' ),
313 'label_off' => esc_html__( 'Hide', 'elementskit-lite' ),
314 'return_value' => 'yes',
315 'default' => 'yes',
316 ]
317 );
318
319
320 $this->end_controls_section();
321
322 $this->start_controls_section(
323 'section_icon_list',
324 [
325 'label' => esc_html__( 'List', 'elementskit-lite' ),
326 'tab' => Controls_Manager::TAB_STYLE,
327 ]
328 );
329
330 $this->add_responsive_control(
331 'ekit_page_list_padding',
332 [
333 'label' => esc_html__( 'Padding', 'elementskit-lite' ),
334 'type' => Controls_Manager::DIMENSIONS,
335 'size_units' => [ 'px', '%', 'em' ],
336 'selectors' => [
337 '{{WRAPPER}} .elementor-icon-list-item > a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important',
338 ],
339 ]
340 );
341
342 $this->add_responsive_control(
343 'ekit_page_list_margin',
344 [
345 'label' => esc_html__( 'Margin', 'elementskit-lite' ),
346 'type' => Controls_Manager::DIMENSIONS,
347 'size_units' => [ 'px', '%', 'em' ],
348 'selectors' => [
349 '{{WRAPPER}} .elementor-icon-list-item > a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
350 ],
351 ]
352 );
353
354 $this->add_group_control(
355 Group_Control_Border::get_type(),
356 [
357 'name' => 'ekit_page_list_border',
358 'label' => esc_html__( 'Border', 'elementskit-lite' ),
359 'selector' => '{{WRAPPER}} .elementor-icon-list-item > a',
360 ]
361 );
362
363 $this->add_control(
364 'ekit_page_list_border_radius',
365 [
366 'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
367 'type' => Controls_Manager::DIMENSIONS,
368 'size_units' => [ 'px', '%', 'em' ],
369 'selectors' => [
370 '{{WRAPPER}} .elementor-icon-list-item > a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
371 ],
372 ]
373 );
374
375 $this->add_group_control(
376 Group_Control_Box_Shadow::get_type(),
377 [
378 'name' => 'ekit_page_list_box_shadow',
379 'label' => esc_html__( 'Box Shadow', 'elementskit-lite' ),
380 'selector' => '{{WRAPPER}} .elementor-icon-list-item > a',
381 ]
382 );
383
384 $this->add_group_control(
385 Group_Control_Background::get_type(),
386 [
387 'name' => 'ekit_page_list_background',
388 'label' => esc_html__( 'Background', 'elementskit-lite' ),
389 'types' => [ 'classic', 'gradient' ],
390 'selector' => '{{WRAPPER}} .elementor-icon-list-item > a',
391 'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
392 ]
393 );
394 $this->add_control(
395 'ekit_page_list_background_title',
396 [
397 'label' => esc_html__( 'Hover', 'elementskit-lite' ),
398 'type' => Controls_Manager::HEADING,
399 'separator' => 'before',
400 ]
401 );
402 $this->add_group_control(
403 Group_Control_Background::get_type(),
404 [
405 'name' => 'ekit_page_list_background_hover',
406 'label' => esc_html__( 'Background Hover', 'elementskit-lite' ),
407 'types' => [ 'classic', 'gradient' ],
408 'selector' => '{{WRAPPER}} .elementor-icon-list-item > a:hover',
409 'exclude' => ['image'] // PHPCS:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude
410 ]
411 );
412
413 $this->add_control(
414 'ekit_page_list_background_title_hr',
415 [
416 'type' => Controls_Manager::DIVIDER,
417 ]
418 );
419
420
421 $this->add_responsive_control(
422 'icon_align',
423 [
424 'label' => esc_html__( 'Alignment', 'elementskit-lite' ),
425 'type' => Controls_Manager::CHOOSE,
426 'options' => [
427 'left' => [
428 'title' => esc_html__( 'Left', 'elementskit-lite' ),
429 'icon' => 'eicon-text-align-left',
430 ],
431 'center' => [
432 'title' => esc_html__( 'Center', 'elementskit-lite' ),
433 'icon' => 'eicon-text-align-center',
434 ],
435 'right' => [
436 'title' => esc_html__( 'Right', 'elementskit-lite' ),
437 'icon' => 'eicon-text-align-right',
438 ],
439 ],
440 'prefix_class' => 'elementor%s-align-',
441 ]
442 );
443
444 $this->add_control(
445 'divider',
446 [
447 'label' => esc_html__( 'Divider', 'elementskit-lite' ),
448 'type' => Controls_Manager::SWITCHER,
449 'label_off' => esc_html__( 'Off', 'elementskit-lite' ),
450 'label_on' => esc_html__( 'On', 'elementskit-lite' ),
451 'selectors' => [
452 '{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'content: ""',
453 ],
454 'separator' => 'before',
455 'prefix_class' => 'ekit-has-divider-'
456 ]
457 );
458
459 $this->add_control(
460 'divider_style',
461 [
462 'label' => esc_html__( 'Style', 'elementskit-lite' ),
463 'type' => Controls_Manager::SELECT,
464 'options' => [
465 'solid' => esc_html__( 'Solid', 'elementskit-lite' ),
466 'dotted' => esc_html__( 'Dotted', 'elementskit-lite' ),
467 'dashed' => esc_html__( 'Dashed', 'elementskit-lite' ),
468 ],
469 'default' => 'solid',
470 'condition' => [
471 'divider' => 'yes',
472 ],
473 'selectors' => [
474 '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-top-style: {{VALUE}}',
475 '{{WRAPPER}} .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-left-style: {{VALUE}}',
476 ],
477 ]
478 );
479
480 $this->add_control(
481 'divider_weight',
482 [
483 'label' => esc_html__( 'Weight', 'elementskit-lite' ),
484 'type' => Controls_Manager::SLIDER,
485 'default' => [
486 'size' => 1,
487 ],
488 'range' => [
489 'px' => [
490 'min' => 1,
491 'max' => 20,
492 ],
493 ],
494 'condition' => [
495 'divider' => 'yes',
496 ],
497 'selectors' => [
498 '{{WRAPPER}} .elementor-icon-list-items:not(.elementor-inline-items) .elementor-icon-list-item:not(:last-child):after' => 'border-top-width: {{SIZE}}{{UNIT}}',
499 '{{WRAPPER}} .elementor-inline-items .elementor-icon-list-item:not(:last-child):after' => 'border-left-width: {{SIZE}}{{UNIT}}',
500 ],
501 ]
502 );
503
504 $this->add_control(
505 'divider_width',
506 [
507 'label' => esc_html__( 'Width', 'elementskit-lite' ),
508 'type' => Controls_Manager::SLIDER,
509 'default' => [
510 'unit' => '%',
511 ],
512 'condition' => [
513 'divider' => 'yes',
514 'view!' => 'inline',
515 ],
516 'selectors' => [
517 '{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'width: {{SIZE}}{{UNIT}}',
518 ],
519 ]
520 );
521
522 $this->add_control(
523 'divider_height',
524 [
525 'label' => esc_html__( 'Height', 'elementskit-lite' ),
526 'type' => Controls_Manager::SLIDER,
527 'size_units' => [ '%', 'px' ],
528 'default' => [
529 'unit' => '%',
530 ],
531 'range' => [
532 'px' => [
533 'min' => 1,
534 'max' => 100,
535 ],
536 '%' => [
537 'min' => 1,
538 'max' => 100,
539 ],
540 ],
541 'condition' => [
542 'divider' => 'yes',
543 'view' => 'inline',
544 ],
545 'selectors' => [
546 '{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'height: {{SIZE}}{{UNIT}}',
547 ],
548 ]
549 );
550
551 $this->add_control(
552 'divider_color',
553 [
554 'label' => esc_html__( 'Color', 'elementskit-lite' ),
555 'type' => Controls_Manager::COLOR,
556 'default' => '#ddd',
557 'condition' => [
558 'divider' => 'yes',
559 ],
560 'selectors' => [
561 '{{WRAPPER}} .elementor-icon-list-item:not(:last-child):after' => 'border-color: {{VALUE}}',
562 ],
563 ]
564 );
565
566 $this->end_controls_section();
567
568 $this->start_controls_section(
569 'section_icon_style',
570 [
571 'label' => esc_html__( 'Icon', 'elementskit-lite' ),
572 'tab' => Controls_Manager::TAB_STYLE,
573 ]
574 );
575 $this->add_control(
576 'icon_position',
577 [
578 'label' => esc_html__( 'Icon Position', 'elementskit-lite' ),
579 'type' => Controls_Manager::SELECT,
580 'default' => 'row',
581 'options' => [
582 'row' => esc_html__( 'Left', 'elementskit-lite' ),
583 'row-reverse' => esc_html__( 'Right', 'elementskit-lite' ),
584 'column' => esc_html__( 'Top', 'elementskit-lite' ),
585 ],
586 'selectors' => [
587 '{{WRAPPER}} .ekit_page_list_content' => 'flex-direction: {{VALUE}};'
588 ],
589 ]
590 );
591 $this->add_responsive_control(
592 'ekit_menu_list_icon_vetical_align',
593 [
594 'label' => esc_html__( 'Vertical Alignment', 'elementskit-lite' ),
595 'type' => Controls_Manager::CHOOSE,
596 'options' => [
597 'flex-start' => [
598 'title' => esc_html__( 'Top', 'elementskit-lite' ),
599 'icon' => 'eicon-v-align-top',
600 ],
601 'center' => [
602 'title' => esc_html__( 'Center', 'elementskit-lite' ),
603 'icon' => 'eicon-v-align-middle',
604 ],
605 'flex-end' => [
606 'title' => esc_html__( 'Bottom', 'elementskit-lite' ),
607 'icon' => 'eicon-v-align-bottom',
608 ],
609 ],
610 'default' => 'center',
611 'toggle' => true,
612 'condition' => [
613 'icon_position!' => 'column'
614 ],
615 'selectors' => [
616 '{{WRAPPER}} .elementor-icon-list-icon' => 'display: flex; align-items: {{VALUE}}; justify-content: center',
617 ],
618 ]
619 );
620 $this->add_group_control(
621 Group_Control_Background::get_type(),
622 [
623 'name' => 'icon_position_bg',
624 'label' => esc_html__( 'Background', 'elementskit-lite' ),
625 'types' => [ 'classic', 'gradient' ],
626 'selector' => '{{WRAPPER}} .elementor-icon-list-item .elementor-icon-list-icon',
627 ]
628 );
629 $this->add_responsive_control(
630 'icon_width',
631 [
632 'label' => esc_html__( 'Width', 'elementskit-lite' ),
633 'type' => Controls_Manager::SLIDER,
634 'size_units' => [ 'px', '%' ],
635 'range' => [
636 'px' => [
637 'min' => 0,
638 'max' => 1000,
639 'step' => 5,
640 ],
641 '%' => [
642 'min' => 0,
643 'max' => 100,
644 ],
645 ],
646 'selectors' => [
647 '{{WRAPPER}} .elementor-icon-list-item .elementor-icon-list-icon' => 'width: {{SIZE}}{{UNIT}};',
648 ],
649 'condition' => [
650 'icon_position_bg_background!' => ''
651 ]
652 ]
653 );
654 $this->add_responsive_control(
655 'icon_height',
656 [
657 'label' => esc_html__( 'Height', 'elementskit-lite' ),
658 'type' => Controls_Manager::SLIDER,
659 'size_units' => [ 'px' ],
660 'range' => [
661 'px' => [
662 'min' => 0,
663 'max' => 1000,
664 'step' => 5,
665 ],
666 ],
667 'selectors' => [
668 '{{WRAPPER}} .elementor-icon-list-item .elementor-icon-list-icon' => 'line-height: calc({{SIZE}}{{UNIT}} + 5{{UNIT}}); height: {{SIZE}}{{UNIT}};',
669 ],
670 'condition' => [
671 'icon_position_bg_background!' => ''
672 ]
673 ]
674 );
675
676 $this->add_responsive_control(
677 'icon_line_height',
678 [
679 'label' => esc_html__( 'Line Height', 'elementskit-lite' ),
680 'type' => Controls_Manager::SLIDER,
681 'size_units' => [ 'px', '%' ],
682 'range' => [
683 'px' => [
684 'min' => 0,
685 'max' => 1000,
686 'step' => 5,
687 ],
688 '%' => [
689 'min' => 0,
690 'max' => 100,
691 ],
692 ],
693 'selectors' => [
694 '{{WRAPPER}} .elementor-icon-list-item .elementor-icon-list-icon' => 'line-height: {{SIZE}}{{UNIT}};',
695 ],
696 'condition' => [
697 'icon_position_bg_background!' => ''
698 ]
699 ]
700 );
701
702 $this->add_responsive_control(
703 'icon_border_radius',
704 [
705 'label' => esc_html__( 'Border Radius', 'elementskit-lite' ),
706 'type' => Controls_Manager::DIMENSIONS,
707 'size_units' => [ 'px', '%' ],
708 'selectors' => [
709 '{{WRAPPER}} .elementor-icon-list-item .elementor-icon-list-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
710 ],
711 'condition' => [
712 'icon_position_bg_background!' => ''
713 ]
714 ]
715 );
716
717
718 $this->add_responsive_control(
719 'icon_color_hover',
720 [
721 'label' => esc_html__( 'Icon Hover', 'elementskit-lite' ),
722 'type' => Controls_Manager::COLOR,
723 'default' => '',
724 'selectors' => [
725 '{{WRAPPER}} .elementor-icon-list-item:hover .elementor-icon-list-icon i' => 'color: {{VALUE}};',
726 '{{WRAPPER}} .elementor-icon-list-item:hover .elementor-icon-list-icon svg' => 'fill: {{VALUE}};'
727 ],
728 ]
729 );
730 $this->add_responsive_control(
731 'ekit_icon_margin',
732 [
733 'label' => esc_html__( 'Margin', 'elementskit-lite' ),
734 'type' => Controls_Manager::DIMENSIONS,
735 'size_units' => [ 'px', '%', 'em' ],
736 'selectors' => [
737 '{{WRAPPER}} .elementor-icon-list-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
738 ],
739 ]
740 );
741
742 $this->add_responsive_control(
743 'icon_size',
744 [
745 'label' => esc_html__( 'Size', 'elementskit-lite' ),
746 'type' => Controls_Manager::SLIDER,
747 'default' => [
748 'size' => 14,
749 ],
750 'range' => [
751 'px' => [
752 'min' => 6,
753 ],
754 ],
755 'selectors' => [
756 '{{WRAPPER}} .elementor-icon-list-icon' => 'width: {{SIZE}}{{UNIT}};',
757 '{{WRAPPER}} .elementor-icon-list-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
758 '{{WRAPPER}} .elementor-icon-list-icon svg' => 'max-width: {{SIZE}}{{UNIT}};',
759 ],
760 ]
761 );
762
763 $this->end_controls_section();
764
765 $this->start_controls_section(
766 'section_text_style',
767 [
768 'label' => esc_html__( 'Text', 'elementskit-lite' ),
769 'tab' => Controls_Manager::TAB_STYLE,
770 ]
771 );
772
773 $this->add_control(
774 'text_color',
775 [
776 'label' => esc_html__( 'Text Color', 'elementskit-lite' ),
777 'type' => Controls_Manager::COLOR,
778 'default' => '',
779 'selectors' => [
780 '{{WRAPPER}} .elementor-icon-list-text' => 'color: {{VALUE}};',
781 ],
782 ]
783 );
784
785 $this->add_responsive_control(
786 'ekit_text_margin',
787 [
788 'label' => esc_html__( 'Margin', 'elementskit-lite' ),
789 'type' => Controls_Manager::DIMENSIONS,
790 'size_units' => [ 'px', '%', 'em' ],
791 'selectors' => [
792 '{{WRAPPER}} .elementor-icon-list-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
793 ],
794 ]
795 );
796
797 $this->add_control(
798 'text_color_hover',
799 [
800 'label' => esc_html__( 'Hover', 'elementskit-lite' ),
801 'type' => Controls_Manager::COLOR,
802 'default' => '',
803 'selectors' => [
804 '{{WRAPPER}} .elementor-icon-list-item:hover .elementor-icon-list-text' => 'color: {{VALUE}};',
805 ],
806 ]
807 );
808
809 $this->add_control(
810 'text_indent',
811 [
812 'label' => esc_html__( 'Padding Left', 'elementskit-lite' ),
813 'type' => Controls_Manager::SLIDER,
814 'range' => [
815 'px' => [
816 'max' => 50,
817 ],
818 ],
819 'selectors' => [
820 '{{WRAPPER}} .elementor-icon-list-text' => is_rtl() ? 'padding-right: {{SIZE}}{{UNIT}};' : 'padding-left: {{SIZE}}{{UNIT}};',
821 ],
822 ]
823 );
824
825 $this->add_group_control(
826 Group_Control_Typography::get_type(),
827 [
828 'name' => 'icon_typography',
829 'selector' => '{{WRAPPER}} .elementor-icon-list-item',
830 ]
831 );
832
833 $this->end_controls_section();
834
835 $this->start_controls_section(
836 'ekit_menu_subtitle_style_tab',
837 [
838 'label' => esc_html__( 'Subtitle', 'elementskit-lite' ),
839 'tab' => Controls_Manager::TAB_STYLE,
840 ]
841 );
842
843 $this->add_group_control(
844 Group_Control_Typography::get_type(),
845 [
846 'name' => 'ekit_menu_subtitle_typography',
847 'label' => esc_html__( 'Typography', 'elementskit-lite' ),
848 'selector' => '{{WRAPPER}} .ekit_menu_subtitle',
849 ]
850 );
851
852 $this->add_control(
853 'ekit_menu_subtitle_color',
854 [
855 'label' => esc_html__( 'Color', 'elementskit-lite' ),
856 'type' => Controls_Manager::COLOR,
857 'selectors' => [
858 '{{WRAPPER}} .ekit_menu_subtitle' => 'color: {{VALUE}}',
859 ],
860 ]
861 );
862
863 $this->add_control(
864 'ekit_menu_subtitle_color_hover',
865 [
866 'label' => esc_html__( 'Color Hover', 'elementskit-lite' ),
867 'type' => Controls_Manager::COLOR,
868 'selectors' => [
869 '{{WRAPPER}} .elementor-icon-list-item a:hover .ekit_menu_subtitle' => 'color: {{VALUE}}',
870 ],
871 ]
872 );
873
874 $this->add_responsive_control(
875 'ekit_menu_subtitle_padding',
876 [
877 'label' => esc_html__( 'Padding', 'elementskit-lite' ),
878 'type' => Controls_Manager::DIMENSIONS,
879 'size_units' => [ 'px', '%', 'em' ],
880 'selectors' => [
881 '{{WRAPPER}} .ekit_menu_subtitle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
882 ],
883 ]
884 );
885
886 $this->end_controls_section();
887
888 $this->start_controls_section(
889 'section_label',
890 [
891 'label' => esc_html__( 'Label', 'elementskit-lite' ),
892 'tab' => Controls_Manager::TAB_STYLE,
893 ]
894 );
895 $this->add_group_control(
896 Group_Control_Typography::get_type(),
897 [
898 'name' => 'ekit_menu_list_label_title_typography',
899 'label' => esc_html__( 'Typography', 'elementskit-lite' ),
900 'selector' => '{{WRAPPER}} .ekit_menu_label'
901 ]
902 );
903 $this->add_responsive_control(
904 'ekit_menu_list_label_title_margin',
905 [
906 'label' => esc_html__( 'Margin', 'elementskit-lite' ),
907 'type' => Controls_Manager::DIMENSIONS,
908 'size_units' => [ 'px', '%', 'em' ],
909 'selectors' => [
910 '{{WRAPPER}} .ekit_menu_label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
911 ]
912 ]
913 );
914 $this->add_responsive_control(
915 'ekit_menu_list_label_title_padding',
916 [
917 'label' => esc_html__( 'Padding', 'elementskit-lite' ),
918 'type' => Controls_Manager::DIMENSIONS,
919 'size_units' => [ 'px', '%', 'em' ],
920 'selectors' => [
921 '{{WRAPPER}} .ekit_menu_label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
922 ]
923 ]
924 );
925 $this->add_responsive_control(
926 'ekit_menu_list_label_title_border_radius',
927 [
928 'label' => esc_html__( 'Border radius', 'elementskit-lite' ),
929 'type' => Controls_Manager::DIMENSIONS,
930 'size_units' => [ 'px', '%', 'em' ],
931 'selectors' => [
932 '{{WRAPPER}} .ekit_menu_label' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
933 ]
934 ]
935 );
936
937 $this->add_control(
938 'ekit_menu_list_label_align',
939 [
940 'label' => esc_html__( 'Horizontal Alignment', 'elementskit-lite' ),
941 'type' => Controls_Manager::CHOOSE,
942 'options' => [
943 'ekit_badge_left' => [
944 'title' => esc_html__( 'Left', 'elementskit-lite' ),
945 'icon' => 'eicon-text-align-left',
946 ],
947 'ekit_badge_right' => [
948 'title' => esc_html__( 'Right', 'elementskit-lite' ),
949 'icon' => 'eicon-text-align-right',
950 ],
951 ],
952 'default' => 'ekit_badge_left',
953 'toggle' => true
954 ]
955 );
956
957 $this->add_responsive_control(
958 'ekit_menu_list_label_vetical_align_left',
959 [
960 'label' => esc_html__( 'Vertical Alignment', 'elementskit-lite' ),
961 'type' => Controls_Manager::CHOOSE,
962 'options' => [
963 'flex-start' => [
964 'title' => esc_html__( 'Top', 'elementskit-lite' ),
965 'icon' => 'eicon-v-align-top',
966 ],
967 'center' => [
968 'title' => esc_html__( 'Center', 'elementskit-lite' ),
969 'icon' => 'eicon-v-align-middle',
970 ],
971 'flex-end' => [
972 'title' => esc_html__( 'Bottom', 'elementskit-lite' ),
973 'icon' => 'eicon-v-align-bottom',
974 ],
975 ],
976 'default' => 'center',
977 'toggle' => true,
978 'selectors' => [
979 '{{WRAPPER}} .ekit_menu_label' => 'align-self: {{VALUE}};',
980 ],
981 ]
982 );
983 $this->end_controls_section();
984
985 $this->insert_pro_message();
986 }
987
988 protected function render( ) {
989 echo '<div class="ekit-wid-con" >';
990 $this->render_raw();
991 echo '</div>';
992 }
993
994 protected function render_raw( ) {
995 $settings = $this->get_settings_for_display();
996
997 $grid_d = empty($settings['page_grid']) ? '' : 'ekit-col-'.$settings['page_grid'];
998 $grid_t = empty($settings['page_grid_tablet']) ? '' : 'ekit-col-tablet-'.$settings['page_grid_tablet'];
999 $grid_m = empty($settings['page_grid_mobile']) ? '' : 'ekit-col-mobile-'.$settings['page_grid_mobile'];
1000
1001 $this->add_render_attribute( 'icon_list', 'class', 'elementor-icon-list-itemsfg' );
1002 $this->add_render_attribute( 'icon_list', 'class', (!empty($settings['page_grid']) ? 'ekit-row' : '') );
1003 $this->add_render_attribute( 'list_item', 'class', 'elementor-icon-list-item' );
1004
1005 if ( 'inline' === $settings['view'] ) {
1006 $this->add_render_attribute( 'icon_list', 'class', 'elementor-inline-items' );
1007 $this->add_render_attribute( 'list_item', 'class', 'elementor-inline-item' );
1008 }
1009 ?>
1010 <div <?php $this->print_render_attribute_string( 'icon_list' ); ?>>
1011 <?php
1012 foreach ( $settings['icon_list'] as $index => $item ) :
1013 $post = !empty( $item['link'] ) ? get_post($item['link']) : null;
1014 $text_title = empty($item['text']) ? ($post instanceof \WP_Post ? $post->post_title : '') : $item['text'];
1015
1016 if ( ! empty( $item['ekit_page_list_website_link']['url'] ) ) {
1017 $this->add_link_attributes( 'link_' . $index, $item['ekit_page_list_website_link'] );
1018 } else if ( ! empty( $item['link'] && (get_permalink($post) !== 0)) ) {
1019 $this->add_link_attributes( 'link_' . $index, ['url' => get_permalink($item['link'])] );
1020 }
1021 ?>
1022 <div class="elementor-icon-list-item <?php echo esc_attr($grid_d); ?> <?php echo esc_attr($grid_t); ?> <?php echo esc_attr($grid_m); ?>">
1023 <a class="elementor-repeater-item-<?php echo esc_attr( $item[ '_id' ] ); ?> <?php echo esc_attr( $settings['ekit_menu_list_label_align'] ); ?>" <?php $this->print_render_attribute_string( 'link_' . $index ); ?>>
1024 <div class="ekit_page_list_content">
1025 <?php if ( ! empty( $item['icons'] ) && $item['ekit_page_list_show_icon'] == 'yes') : ?>
1026 <span class="elementor-icon-list-icon">
1027 <?php
1028 // new icon
1029 $migrated = isset( $item['__fa4_migrated']['icons'] );
1030 // Check if its a new widget without previously selected icon using the old Icon control
1031 $is_new = empty( $item['icon'] );
1032 if ( $is_new || $migrated ) {
1033 // new icon
1034 Icons_Manager::render_icon( $item['icons'], [ 'aria-hidden' => 'true' ] );
1035 } else {
1036 ?>
1037 <i class="<?php echo esc_attr($item['icon']); ?>" aria-hidden="true"></i>
1038 <?php
1039 }
1040 ?>
1041 </span>
1042 <?php endif; ?>
1043 <span class="elementor-icon-list-text">
1044 <span class="ekit_page_list_title_title"><?php echo esc_html( $text_title ); ?></span>
1045 <?php if ($item['ekit_menu_widget_sub_title'] != '') : ?>
1046 <span class="ekit_menu_subtitle"><?php echo esc_html($item['ekit_menu_widget_sub_title']); ?></span>
1047 <?php endif; ?>
1048 </span>
1049 </div>
1050 <?php if ( ! empty( $item['ekit_menu_list_label_title'] ) && $item['ekit_menu_list_show_label'] == 'yes') : ?>
1051 <span class="ekit_menu_label">
1052 <?php echo esc_html( $item['ekit_menu_list_label_title'] ); ?>
1053 </span>
1054 <?php endif; ?>
1055 </a>
1056 </div>
1057 <?php
1058 endforeach; ?>
1059 </div>
1060 <?php
1061 }
1062
1063
1064 }
1065