PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.17.4
Shortcodes and extra features for Phlox theme v2.17.4
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / custom-list.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 1 year ago accordion.php 1 year ago audio.php 4 years ago before-after.php 3 years ago button.php 1 year ago carousel-navigation.php 4 years ago circle-chart.php 1 year ago contact-box.php 4 years ago contact-form.php 1 year ago custom-list.php 1 year ago divider.php 4 years ago gallery.php 1 year ago gmap.php 4 years ago heading-modern.php 1 year ago icon.php 1 year ago image.php 1 year ago mailchimp.php 1 year ago modern-button.php 1 year ago products-grid.php 1 year ago quote.php 1 year ago recent-comments.php 1 year ago recent-posts-grid-carousel.php 1 year ago recent-posts-land-style.php 1 year ago recent-posts-masonry.php 1 year ago recent-posts-tiles-carousel.php 1 year ago recent-posts-tiles.php 1 year ago recent-posts-timeline.php 1 year ago recent-products.php 1 year ago responsive-table.php 1 year ago search.php 4 years ago staff.php 1 year ago svg.php 1 year ago tabs.php 1 year ago testimonial.php 1 year ago text.php 1 year ago touch-slider.php 1 year ago video.php 4 years ago
custom-list.php
1153 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
9 use Elementor\Group_Control_Border;
10 use Elementor\Group_Control_Box_Shadow;
11 use Elementor\Group_Control_Background;
12 use Elementor\Repeater;
13
14
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit; // Exit if accessed directly.
17 }
18
19 /**
20 * Elementor 'Custom List' widget.
21 *
22 * Elementor widget that displays an 'Custom List' with lightbox.
23 *
24 * @since 1.0.0
25 */
26 class CustomList extends Widget_Base {
27
28 /**
29 * Get widget name.
30 *
31 * Retrieve 'Custom List' widget name.
32 *
33 * @since 1.0.0
34 * @access public
35 *
36 * @return string Widget name.
37 */
38 public function get_name() {
39 return 'aux_icon_list';
40 }
41
42 /**
43 * Get widget title.
44 *
45 * Retrieve 'Custom List' widget title.
46 *
47 * @since 1.0.0
48 * @access public
49 *
50 * @return string Widget title.
51 */
52 public function get_title() {
53 return __('Flexible List', 'auxin-elements' );
54 }
55
56 /**
57 * Get widget icon.
58 *
59 * Retrieve 'Custom List' widget icon.
60 *
61 * @since 1.0.0
62 * @access public
63 *
64 * @return string Widget icon.
65 */
66 public function get_icon() {
67 return 'eicon-bullet-list auxin-badge';
68 }
69
70 /**
71 * Get widget categories.
72 *
73 * Retrieve 'Custom List' widget icon.
74 *
75 * @since 1.0.0
76 * @access public
77 *
78 * @return string Widget icon.
79 */
80 public function get_categories() {
81 return array( 'auxin-core' );
82 }
83
84 /**
85 * Register 'Custom List' widget controls.
86 *
87 * Adds different input fields to allow the user to change and customize the widget settings.
88 *
89 * @since 1.0.0
90 * @access protected
91 */
92 protected function register_controls() {
93
94 /*-----------------------------------------------------------------------------------*/
95 /* Content TAB
96 /*-----------------------------------------------------------------------------------*/
97
98 $this->start_controls_section(
99 'list_items_section',
100 array(
101 'label' => __('Content', 'auxin-elements' ),
102 )
103 );
104
105 $repeater = new Repeater();
106
107 $repeater->add_control(
108 'text_primary',
109 array(
110 'label' => __( 'Text', 'auxin-elements' ),
111 'type' => Controls_Manager::TEXT,
112 'default' => 'List Item',
113 'label_block' => true
114 )
115 );
116
117 $repeater->add_control(
118 'aux_custom_list_icon',
119 array(
120 'label' => __( 'Icon', 'auxin-elements' ),
121 'type' => Controls_Manager::ICONS
122 )
123 );
124
125 $repeater->add_control(
126 'text_secondary',
127 array(
128 'label' => __( 'Secondary Text', 'auxin-elements' ),
129 'type' => Controls_Manager::TEXT,
130 'default' => '',
131 'label_block' => true
132 )
133 );
134
135 $repeater->add_control(
136 'link',
137 array(
138 'label' => __('Link','auxin-elements' ),
139 'type' => Controls_Manager::URL,
140 'placeholder' => '',
141 'show_external' => true,
142 'label_block' => true,
143 'dynamic' => [
144 'active' => true
145 ]
146 )
147 );
148
149 $repeater->add_control(
150 'display_advanced',
151 array(
152 'label' => __( 'Customize this item', 'auxin-elements' ),
153 'type' => Controls_Manager::SWITCHER,
154 'label_on' => __( 'On', 'auxin-elements' ),
155 'label_off' => __( 'Off', 'auxin-elements' ),
156 'return_value' => 'yes',
157 'default' => 'no'
158 )
159 );
160
161 $repeater->add_responsive_control(
162 'icon_custom_style_heading',
163 array(
164 'label' => __( 'Icon Styles:', 'auxin-elements' ),
165 'type' => Controls_Manager::HEADING,
166 'condition' => array(
167 'display_advanced' => 'yes'
168 ),
169 'separator' => 'before'
170 )
171 );
172
173 $repeater->add_responsive_control(
174 'icon_color',
175 array(
176 'label' => __( 'Color', 'auxin-elements' ),
177 'type' => Controls_Manager::COLOR,
178 'selectors' => array(
179 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-icon' => 'color: {{VALUE}};',
180 ),
181 'condition' => array(
182 'display_advanced' => 'yes'
183 )
184 )
185 );
186
187 $repeater->add_responsive_control(
188 'icon_background_color',
189 array(
190 'label' => __( 'Background Color', 'auxin-elements' ),
191 'type' => Controls_Manager::COLOR,
192 'selectors' => array(
193 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-icon' => 'background-color: {{VALUE}};',
194 ),
195 'condition' => array(
196 'display_advanced' => 'yes'
197 )
198 )
199 );
200
201 $repeater->add_responsive_control(
202 'icon_item_margin',
203 array(
204 'label' => __( 'Margin', 'auxin-elements' ),
205 'type' => Controls_Manager::DIMENSIONS,
206 'size_units' => array( 'px', 'em' ),
207 'selectors' => array(
208 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
209 ),
210 'condition' => array(
211 'display_advanced' => 'yes'
212 ),
213 'separator'=> 'after'
214 )
215 );
216
217 $repeater->add_responsive_control(
218 'text_custom_style_heading',
219 array(
220 'label' => __( 'Text Styles:', 'auxin-elements' ),
221 'type' => Controls_Manager::HEADING,
222 'condition' => array(
223 'display_advanced' => 'yes'
224 ),
225 'separator' => 'before'
226 )
227 );
228
229 $repeater->add_responsive_control(
230 'text_primary_color',
231 array(
232 'label' => __( 'Color', 'auxin-elements' ),
233 'type' => Controls_Manager::COLOR,
234 'selectors' => array(
235 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text' => 'color: {{VALUE}};',
236 ),
237 'condition' => array(
238 'display_advanced' => 'yes'
239 )
240 )
241 );
242
243 $repeater->add_group_control(
244 Group_Control_Typography::get_type(),
245 array(
246 'name' => 'text_primary_typography',
247 'global' => [
248 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
249 ],
250 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text',
251 'condition'=> array(
252 'display_advanced' => 'yes'
253 )
254 )
255 );
256
257 $repeater->add_responsive_control(
258 'text_primary_margin',
259 array(
260 'label' => __( 'Margin', 'auxin-elements' ),
261 'type' => Controls_Manager::DIMENSIONS,
262 'size_units' => array( 'px', 'em' ),
263 'selectors' => array(
264 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
265 ),
266 'condition' => array(
267 'display_advanced' => 'yes'
268 )
269 )
270 );
271
272 $repeater->add_control(
273 'text_tag',
274 array(
275 'label' => __( 'Text HTML Tag', 'auxin-elements' ),
276 'type' => Controls_Manager::SELECT,
277 'options' => array(
278 'span' => 'span',
279 'p' => 'p',
280 'h1' => 'H1',
281 'h2' => 'H2',
282 'h3' => 'H3',
283 'h4' => 'H4',
284 'h5' => 'H5',
285 'h6' => 'H6'
286 ),
287 'default' => 'span',
288 'condition' => array(
289 'display_advanced' => 'yes'
290 ),
291 'separator' => 'after'
292 )
293 );
294
295 $repeater->add_responsive_control(
296 'text_secondary_color',
297 array(
298 'label' => __( 'Secondary Text Color', 'auxin-elements' ),
299 'type' => Controls_Manager::COLOR,
300 'selectors' => array(
301 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2' => 'color: {{VALUE}};',
302 ),
303 'condition' => array(
304 'display_advanced' => 'yes',
305 'text_secondary!' => ''
306 )
307 )
308 );
309
310 $repeater->add_group_control(
311 Group_Control_Typography::get_type(),
312 array(
313 'name' => 'text_secondary_typography',
314 'global' => [
315 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
316 ],
317 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2',
318 'condition'=> array(
319 'display_advanced' => 'yes',
320 'text_secondary!' => ''
321 )
322 )
323 );
324
325 $repeater->add_responsive_control(
326 'text_secondary_margin',
327 array(
328 'label' => __( 'Secondary Text Margin', 'auxin-elements' ),
329 'type' => Controls_Manager::DIMENSIONS,
330 'size_units' => array( 'px', 'em' ),
331 'selectors' => array(
332 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
333 ),
334 'condition' => array(
335 'display_advanced' => 'yes',
336 'text_secondary!' => ''
337 ),
338 'separator'=> 'after'
339 )
340 );
341
342 $this->add_control(
343 'list',
344 array(
345 'label' => __( 'List Items', 'auxin-elements' ),
346 'type' => Controls_Manager::REPEATER,
347 'default' => array(
348 array(
349 'text_primary' => 'List Item #1',
350 'icon' => 'check-1'
351 ),
352 array(
353 'text_primary' => 'List Item #2',
354 'icon' => 'check-1'
355 ),
356 array(
357 'text_primary' => 'List Item #3',
358 'icon' => 'check-1'
359 )
360 ),
361 'fields' => $repeater->get_controls(),
362 'title_field' => '{{{ text_primary }}}'
363 )
364 );
365
366 $this->end_controls_section();
367
368 /*-----------------------------------------------------------------------------------*/
369 /* Style TAB
370 /*-----------------------------------------------------------------------------------*/
371
372 /* List Section
373 /*-------------------------------------*/
374
375 $this->start_controls_section(
376 'list_layout_section',
377 array(
378 'label' => __( 'Layout', 'auxin-elements' ),
379 'tab' => Controls_Manager::TAB_LAYOUT
380 )
381 );
382
383 $this->add_control(
384 'direction',
385 array(
386 'label' => __( 'Direction', 'auxin-elements' ),
387 'type' => Controls_Manager::SELECT,
388 'options' => array(
389 'default' => __( 'Default' , 'auxin-elements' ),
390 'vertical' => __( 'Vertical' , 'auxin-elements' ),
391 'horizontal' => __( 'Horizontal', 'auxin-elements' )
392 ),
393 'default' => 'default'
394 )
395 );
396
397 $this->add_responsive_control(
398 'list_height',
399 array(
400 'label' => __( 'Height', 'auxin-elements' ),
401 'type' => Controls_Manager::SLIDER,
402 'size_units' => array( 'px', 'em' ),
403 'range' => array(
404 'px' => array(
405 'max' => 1000
406 ),
407 'em' => array(
408 'max' => 30
409 )
410 ),
411 'selectors' => array(
412 '{{WRAPPER}} .aux-icon-list-items' => 'max-height: {{SIZE}}{{UNIT}};',
413 ),
414 'condition' => array(
415 'direction' => 'vertical'
416 )
417 )
418 );
419
420 $this->add_responsive_control(
421 'list_width',
422 array(
423 'label' => __( 'Width', 'auxin-elements' ),
424 'type' => Controls_Manager::SLIDER,
425 'size_units' => array( 'px', 'em', '%' ),
426 'range' => array(
427 'px' => array(
428 'max' => 1000
429 ),
430 'em' => array(
431 'max' => 30
432 ),
433 '%' => array(
434 'max' => 100
435 )
436 ),
437 'selectors' => array(
438 '{{WRAPPER}} .aux-icon-list-item' => 'min-width: {{SIZE}}{{UNIT}};',
439 ),
440 'condition' => array(
441 'direction' => 'horizontal'
442 )
443 )
444 );
445
446 $this->add_responsive_control(
447 'list_column_gutter',
448 array(
449 'label' => __( 'Space Between Columns', 'auxin-elements' ),
450 'type' => Controls_Manager::SLIDER,
451 'size_units' => array( 'px', 'em' ),
452 'range' => array(
453 'px' => array(
454 'max' => 100
455 ),
456 'em' => array(
457 'max' => 10
458 )
459 ),
460 'selectors' => array(
461 '{{WRAPPER}} .aux-icon-list-item' => 'margin-right: {{SIZE}}{{UNIT}};',
462 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'right: calc(-{{SIZE}}{{UNIT}}/2);',
463 ),
464 'condition' => array(
465 'direction!' => 'default'
466 )
467 )
468 );
469
470 $this->add_responsive_control(
471 'align',
472 array(
473 'label' => __('Horizontal Align','auxin-elements'),
474 'type' => Controls_Manager::CHOOSE,
475 'options' => array(
476 'flex-start' => array(
477 'title' => __( 'Left', 'auxin-elements' ),
478 'icon' => 'eicon-text-align-left',
479 ),
480 'center' => array(
481 'title' => __( 'Center', 'auxin-elements' ),
482 'icon' => 'eicon-text-align-center',
483 ),
484 'flex-end' => array(
485 'title' => __( 'Right', 'auxin-elements' ),
486 'icon' => 'eicon-text-align-right',
487 ),
488 ),
489 'default' => 'center',
490 'toggle' => true,
491 'selectors_dictionary' => [
492 'flex-start' => 'flex-start; text-align:left;',
493 'center' => 'center; text-align:center;',
494 'flex-end' => 'flex-end;text-align:right;'
495 ],
496 'selectors' => array(
497 '{{WRAPPER}} .aux-icon-list-item, {{WRAPPER}} .aux-icon-list-items' => 'justify-content: {{VALUE}}',
498 )
499 )
500 );
501
502 $this->add_responsive_control(
503 'align_vertical',
504 array(
505 'label' => __('Vertical Align','auxin-elements'),
506 'type' => Controls_Manager::CHOOSE,
507 'options' => array(
508 'flex-start' => array(
509 'title' => __( 'Left', 'auxin-elements' ),
510 'icon' => 'eicon-v-align-top',
511 ),
512 'center' => array(
513 'title' => __( 'Center', 'auxin-elements' ),
514 'icon' => 'eicon-v-align-middle',
515 ),
516 'flex-end' => array(
517 'title' => __( 'Right', 'auxin-elements' ),
518 'icon' => 'eicon-v-align-bottom',
519 )
520 ),
521 'default' => '',
522 'toggle' => true,
523 'selectors' => array(
524 '{{WRAPPER}} .aux-direction-horizontal' => 'align-items: {{VALUE}}',
525 '{{WRAPPER}} .aux-icon-list-item' => 'align-items: {{VALUE}}'
526 )
527 )
528 );
529
530
531 $this->end_controls_section();
532
533 /*-----------------------------------------------------------------------------------*/
534 /* Style TAB
535 /*-----------------------------------------------------------------------------------*/
536
537 /* List Section
538 /*-------------------------------------*/
539
540 $this->start_controls_section(
541 'list_style_section',
542 array(
543 'label' => __( 'List', 'auxin-elements' ),
544 'tab' => Controls_Manager::TAB_STYLE
545 )
546 );
547
548 $this->add_responsive_control(
549 'list_items_space',
550 array(
551 'label' => __( 'Space Between Rows', 'auxin-elements' ),
552 'type' => Controls_Manager::SLIDER,
553 'size_units' => array( 'px', 'em' ),
554 'range' => array(
555 'px' => array(
556 'max' => 25
557 )
558 ),
559 'selectors' => array(
560 '{{WRAPPER}} .aux-icon-list-item:not(:last-child)' => 'padding-bottom: {{SIZE}}{{UNIT}};',
561 '{{WRAPPER}} .aux-icon-list-item:not(:first-child)' => 'margin-top: {{SIZE}}{{UNIT}};'
562 )
563 )
564 );
565
566 $this->add_control(
567 'connector',
568 array(
569 'label' => __( 'Display Connector', 'auxin-elements' ),
570 'type' => Controls_Manager::SWITCHER,
571 'label_on' => __( 'On', 'auxin-elements' ),
572 'label_off' => __( 'Off', 'auxin-elements' ),
573 'return_value' => 'yes',
574 'default' => 'yes',
575 'separator' => 'before'
576 )
577 );
578
579 $this->add_control(
580 'connector_style',
581 array(
582 'label' => __( 'Style', 'auxin-elements' ),
583 'type' => Controls_Manager::SELECT,
584 'options' => array(
585 'solid' => __( 'Solid', 'auxin-elements' ),
586 'double' => __( 'Double', 'auxin-elements' ),
587 'dotted' => __( 'Dotted', 'auxin-elements' ),
588 'dashed' => __( 'Dashed', 'auxin-elements' ),
589 ),
590 'default' => 'dashed',
591 'selectors' => array(
592 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-style: {{VALUE}};',
593 ),
594 'condition' => array(
595 'connector' => 'yes'
596 )
597 )
598 );
599
600 $this->add_responsive_control(
601 'connector_weight',
602 array(
603 'label' => __( 'Weight', 'auxin-elements' ),
604 'type' => Controls_Manager::SLIDER,
605 'range' => array(
606 'px' => array(
607 'max' => 10
608 )
609 ),
610 'selectors' => array(
611 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
612 ),
613 'condition' => array(
614 'connector' => 'yes'
615 )
616 )
617 );
618
619 $this->add_responsive_control(
620 'connector_margin_left',
621 array(
622 'label' => __( 'Left Space', 'auxin-elements' ),
623 'type' => Controls_Manager::SLIDER,
624 'range' => array(
625 'px' => array(
626 'max' => 20
627 )
628 ),
629 'selectors' => array(
630 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'margin-left: {{SIZE}}{{UNIT}};',
631 ),
632 'condition' => array(
633 'connector' => 'yes'
634 )
635 )
636 );
637
638 $this->add_responsive_control(
639 'connector_color',
640 array(
641 'label' => __( 'Color', 'auxin-elements' ),
642 'type' => Controls_Manager::COLOR,
643 'selectors' => array(
644 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-color: {{VALUE}};'
645 ),
646 'condition' => array(
647 'connector' => 'yes'
648 )
649 )
650 );
651
652 $this->add_control(
653 'divider',
654 array(
655 'label' => __( 'Display Divider', 'auxin-elements' ),
656 'type' => Controls_Manager::SWITCHER,
657 'label_on' => __( 'On', 'auxin-elements' ),
658 'label_off' => __( 'Off', 'auxin-elements' ),
659 'return_value' => 'yes',
660 'default' => 'no',
661 'separator' => 'before'
662 )
663 );
664
665 $this->add_control(
666 'divider_style',
667 array(
668 'label' => __( 'Style', 'auxin-elements' ),
669 'type' => Controls_Manager::SELECT,
670 'options' => array(
671 'solid' => __( 'Solid', 'auxin-elements' ),
672 'double' => __( 'Double', 'auxin-elements' ),
673 'dotted' => __( 'Dotted', 'auxin-elements' ),
674 'dashed' => __( 'Dashed', 'auxin-elements' ),
675 ),
676 'default' => 'solid',
677 'selectors' => array(
678 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-style: {{VALUE}};',
679 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-style: {{VALUE}};'
680 ),
681 'condition' => array(
682 'divider' => 'yes'
683 )
684 )
685 );
686
687 $this->add_responsive_control(
688 'divider_weight',
689 array(
690 'label' => __( 'Weight', 'auxin-elements' ),
691 'type' => Controls_Manager::SLIDER,
692 'size_units' => array( 'px' ),
693 'range' => array(
694 'px' => array(
695 'max' => 10
696 )
697 ),
698 'selectors' => array(
699 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
700 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-width: {{SIZE}}{{UNIT}};'
701 ),
702 'condition' => array(
703 'divider' => 'yes'
704 )
705 )
706 );
707
708 $this->add_responsive_control(
709 'divider_width',
710 array(
711 'label' => __( 'Width', 'auxin-elements' ),
712 'type' => Controls_Manager::SLIDER,
713 'size_units' => array( 'px', '%' ),
714 'range' => array(
715 'px' => array(
716 'min' => 1,
717 'max' => 1200
718 ),
719 '%' => array(
720 'min' => 1,
721 'max' => 100
722 )
723 ),
724 'selectors' => array(
725 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:after' => 'width: {{SIZE}}{{UNIT}};'
726 ),
727 'condition' => array(
728 'divider' => 'yes',
729 'direction!' => 'horizontal'
730 )
731 )
732 );
733
734 $this->add_responsive_control(
735 'divider_color',
736 array(
737 'label' => __( 'Color', 'auxin-elements' ),
738 'type' => Controls_Manager::COLOR,
739 'selectors' => array(
740 '{{WRAPPER}} .aux-icon-list-divider .aux-icon-list-item:not(:last-child):after' => 'border-bottom-color: {{VALUE}};'
741 ),
742 'selectors' => array(
743 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-color: {{VALUE}};',
744 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-color: {{VALUE}};'
745 ),
746 'condition' => array(
747 'divider' => 'yes'
748 )
749 )
750 );
751
752 $this->end_controls_section();
753
754
755 /* Text Style Section
756 /*-------------------------------------*/
757
758 $this->start_controls_section(
759 'text_style_section',
760 array(
761 'label' => __( 'Text', 'auxin-elements' ),
762 'tab' => Controls_Manager::TAB_STYLE
763 )
764 );
765
766 $this->add_control(
767 'text_style_heading',
768 array(
769 'label' => __( 'Text', 'auxin-elements' ),
770 'type' => Controls_Manager::HEADING,
771 'separator' => 'before'
772 )
773 );
774
775 $this->add_responsive_control(
776 'text1_color',
777 array(
778 'label' => __( 'Color', 'auxin-elements' ),
779 'type' => Controls_Manager::COLOR,
780 'selectors' => array(
781 '{{WRAPPER}} .aux-icon-list-text' => 'color: {{VALUE}};'
782 )
783 )
784 );
785
786 $this->add_responsive_control(
787 'text1_hover_color',
788 array(
789 'label' => __( 'Hover Color', 'auxin-elements' ),
790 'type' => Controls_Manager::COLOR,
791 'selectors' => array(
792 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-text' => 'color: {{VALUE}};',
793 )
794 )
795 );
796
797 $this->add_group_control(
798 Group_Control_Typography::get_type(),
799 array(
800 'name' => 'text1_typography',
801 'global' => [
802 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
803 ],
804 'selector' => '{{WRAPPER}} .aux-icon-list-text'
805 )
806 );
807
808 $this->add_responsive_control(
809 'text1_margin',
810 array(
811 'label' => __( 'Text Margin', 'auxin-elements' ),
812 'type' => Controls_Manager::DIMENSIONS,
813 'size_units' => array( 'px', 'em' ),
814 'allowed_dimensions' => 'all',
815 'selectors' => array(
816 '{{WRAPPER}} .aux-icon-list-text' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
817 )
818 )
819 );
820
821 /* Text2 Style Section
822 /*-------------------------------------*/
823
824 $this->add_control(
825 'text2_style_heading',
826 array(
827 'label' => __( 'Secondary Text', 'auxin-elements' ),
828 'type' => Controls_Manager::HEADING,
829 'separator' => 'before',
830 )
831 );
832
833 $this->add_responsive_control(
834 'text2_color',
835 array(
836 'label' => __( 'Color', 'auxin-elements' ),
837 'type' => Controls_Manager::COLOR,
838 'selectors' => array(
839 '{{WRAPPER}} .aux-icon-list-text2' => 'color: {{VALUE}};'
840 )
841 )
842 );
843
844 $this->add_responsive_control(
845 'text2_hover_color',
846 array(
847 'label' => __( 'Hover Color', 'auxin-elements' ),
848 'type' => Controls_Manager::COLOR,
849 'selectors' => array(
850 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-text2' => 'color: {{VALUE}};',
851 )
852 )
853 );
854
855 $this->add_group_control(
856 Group_Control_Typography::get_type(),
857 array(
858 'name' => 'text2_typography',
859 'global' => [
860 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
861 ],
862 'selector' => '{{WRAPPER}} .aux-icon-list-text2'
863 )
864 );
865
866 $this->add_responsive_control(
867 'text2_margin',
868 array(
869 'label' => __( 'Text Margin', 'auxin-elements' ),
870 'type' => Controls_Manager::DIMENSIONS,
871 'size_units' => array( 'px', 'em' ),
872 'allowed_dimensions' => 'all',
873 'selectors' => array(
874 '{{WRAPPER}} .aux-icon-list-text2' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
875 )
876 )
877 );
878
879 $this->end_controls_section();
880
881 /* Icon Style Section
882 /*-------------------------------------*/
883
884 $this->start_controls_section(
885 'icon_style_section',
886 array(
887 'label' => __( 'Icon', 'auxin-elements' ),
888 'tab' => Controls_Manager::TAB_STYLE
889 )
890 );
891
892 $this->start_controls_tabs( 'icon_style_tabs' );
893
894 $this->start_controls_tab(
895 'icon_style_normal',
896 array(
897 'label' => __( 'Normal' , 'auxin-elements' )
898 )
899 );
900
901 $this->add_responsive_control(
902 'icon_color',
903 array(
904 'label' => __( 'Color', 'auxin-elements' ),
905 'type' => Controls_Manager::COLOR,
906 'default' => '#24af29',
907 'selectors' => array(
908 '{{WRAPPER}} .aux-icon-list-icon' => 'color: {{VALUE}};fill: {{VALUE}};'
909 )
910 )
911 );
912
913 $this->add_group_control(
914 Group_Control_Background::get_type(),
915 array(
916 'name' => 'icon_background',
917 'selector' => '{{WRAPPER}} .aux-icon-list-item'
918 )
919 );
920
921 $this->end_controls_tab();
922
923 $this->start_controls_tab(
924 'icon_style_hover',
925 array(
926 'label' => __( 'Hover' , 'auxin-elements' )
927 )
928 );
929
930 $this->add_responsive_control(
931 'icon_hover_color',
932 array(
933 'label' => __( 'Color', 'auxin-elements' ),
934 'type' => Controls_Manager::COLOR,
935 'selectors' => array(
936 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-icon' => 'color: {{VALUE}};fill: {{VALUE}};',
937 )
938 )
939 );
940
941 $this->add_group_control(
942 Group_Control_Background::get_type(),
943 array(
944 'name' => 'icon_background_hover',
945 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover'
946 )
947 );
948
949 $this->end_controls_tab();
950
951 $this->end_controls_tabs();
952
953
954 $this->add_responsive_control(
955 'icon_size',
956 array(
957 'label' => __( 'Size', 'auxin-elements' ),
958 'type' => Controls_Manager::SLIDER,
959 'size_units' => array( 'px', 'em' ),
960 'range' => array(
961 'px' => array(
962 'max' => 100
963 ),
964 'em' => array(
965 'max' => 10
966 )
967 ),
968 'selectors' => array(
969 '{{WRAPPER}} .aux-icon-list-icon' => 'font-size: {{SIZE}}{{UNIT}};height: {{SIZE}}{{UNIT}};',
970 ),
971 'separator' => 'before'
972 )
973 );
974
975 $this->add_responsive_control(
976 'icon_margin',
977 array(
978 'label' => __( 'Margin', 'auxin-elements' ),
979 'type' => Controls_Manager::DIMENSIONS,
980 'size_units' => array( 'px', 'em' ),
981 'allowed_dimensions' => 'all',
982 'selectors' => array(
983 '{{WRAPPER}} .aux-icon-list-icon' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
984 )
985 )
986 );
987
988 $this->add_responsive_control(
989 'icon_padding',
990 array(
991 'label' => __( 'Padding', 'auxin-elements' ),
992 'type' => Controls_Manager::DIMENSIONS,
993 'size_units' => array( 'px', 'em' ),
994 'allowed_dimensions' => 'all',
995 'selectors' => array(
996 '{{WRAPPER}} .aux-icon-list-icon' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; line-height:0;'
997 )
998 )
999 );
1000
1001 $this->end_controls_section();
1002
1003 /* List Item Style Section
1004 /*-------------------------------------*/
1005
1006 $this->start_controls_section(
1007 'list_item_style_section',
1008 array(
1009 'label' => __( 'List Item', 'auxin-elements' ),
1010 'tab' => Controls_Manager::TAB_STYLE
1011 )
1012 );
1013
1014 $this->add_responsive_control(
1015 'list_padding',
1016 array(
1017 'label' => __( 'Padding', 'auxin-elements' ),
1018 'type' => Controls_Manager::DIMENSIONS,
1019 'size_units' => array( 'px', 'em', '%' ),
1020 'separator' => 'before',
1021 'selectors' => array(
1022 '{{WRAPPER}} .aux-icon-list-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1023 )
1024 )
1025 );
1026
1027 $this->add_responsive_control(
1028 'list_margin',
1029 array(
1030 'label' => __( 'Margin', 'auxin-elements' ),
1031 'type' => Controls_Manager::DIMENSIONS,
1032 'size_units' => array( 'px', 'em' ),
1033 'allowed_dimensions' => 'all',
1034 'selectors' => array(
1035 '{{WRAPPER}} .aux-icon-list-item' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1036 ),
1037 'separator' => 'after'
1038 )
1039 );
1040
1041 $this->start_controls_tabs( 'list_colors' );
1042
1043 $this->start_controls_tab(
1044 'list_status_normal',
1045 array(
1046 'label' => __( 'Normal' , 'auxin-elements' )
1047 )
1048 );
1049
1050 $this->add_group_control(
1051 Group_Control_Box_Shadow::get_type(),
1052 array(
1053 'name' => 'list_boxshadow_normal',
1054 'label' => __( 'Box Shadow Normal', 'auxin-elements' ),
1055 'selector' => '{{WRAPPER}} .aux-icon-list-item',
1056 'separator' => 'none'
1057 )
1058 );
1059
1060 $this->add_group_control(
1061 Group_Control_Border::get_type(),
1062 array(
1063 'name' => 'list_border_normal',
1064 'selector' => '{{WRAPPER}} .aux-icon-list-item',
1065 'separator' => 'none'
1066 )
1067 );
1068
1069 $this->add_group_control(
1070 Group_Control_Background::get_type(),
1071 array(
1072 'name' => 'list_background_normal',
1073 'selector' => '{{WRAPPER}} .aux-icon-list-item',
1074 'separator' => 'none'
1075 )
1076 );
1077
1078 $this->end_controls_tab();
1079
1080 $this->start_controls_tab(
1081 'list_status_hover',
1082 array(
1083 'label' => __( 'Hover' , 'auxin-elements' )
1084 )
1085 );
1086
1087 $this->add_group_control(
1088 Group_Control_Box_Shadow::get_type(),
1089 array(
1090 'name' => 'list_boxshadow_hover',
1091 'label' => __( 'Box Shadow Hover', 'auxin-elements' ),
1092 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
1093 'separator' => 'none'
1094 )
1095 );
1096
1097 $this->add_group_control(
1098 Group_Control_Border::get_type(),
1099 array(
1100 'name' => 'list_border_hover',
1101 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
1102 'separator' => 'none'
1103 )
1104 );
1105
1106 $this->add_group_control(
1107 Group_Control_Background::get_type(),
1108 array(
1109 'name' => 'list_background_hover',
1110 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
1111 'separator' => 'none'
1112 )
1113 );
1114
1115 $this->end_controls_tab();
1116
1117 $this->end_controls_tabs();
1118
1119 $this->end_controls_section();
1120 }
1121
1122 /**
1123 * Render 'Custom List' widget output on the frontend.
1124 *
1125 * Written in PHP and used to generate the final HTML.
1126 *
1127 * @since 1.0.0
1128 * @access protected
1129 */
1130 protected function render() {
1131
1132 $settings = $this->get_settings_for_display();
1133
1134 foreach ( $settings['list'] as $key => $list_item ) {
1135
1136 $settings['list'][$key]['icon'] = ! empty( $list_item['aux_custom_list_icon']['value'] ) ? $list_item['aux_custom_list_icon'] : ( ! empty( $list_item['icon'] ) ? $list_item['icon'] : '' ) ;
1137
1138 }
1139
1140 $args = array(
1141 'list' => $settings['list'], // repeater items
1142 'direction' => $settings['direction'],
1143 'connector' => $settings['connector'], // A line that connects primary and secondary text
1144 'divider' => $settings['divider'], // A line between list items
1145 'item_class_prefix' => '' // Default class prefix for each repeater item
1146 );
1147
1148 // pass the args through the corresponding shortcode callback
1149 echo auxin_widget_list_callback( $args );
1150 }
1151
1152 }
1153