PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.8
Shortcodes and extra features for Phlox theme v2.5.8
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 6 years ago accordion.php 6 years ago audio.php 6 years ago before-after.php 6 years ago button.php 6 years ago carousel-navigation.php 6 years ago contact-box.php 6 years ago contact-form.php 6 years ago custom-list.php 6 years ago divider.php 6 years ago gallery.php 6 years ago gmap.php 6 years ago heading-modern.php 6 years ago icon.php 6 years ago image.php 6 years ago mailchimp.php 6 years ago modern-button.php 6 years ago quote.php 6 years ago recent-comments.php 6 years ago recent-posts-grid-carousel.php 6 years ago recent-posts-land-style.php 6 years ago recent-posts-masonry.php 6 years ago recent-posts-tiles-carousel.php 6 years ago recent-posts-tiles.php 6 years ago recent-posts-timeline.php 6 years ago recent-products.php 6 years ago search.php 6 years ago staff.php 6 years ago svg.php 6 years ago tabs.php 6 years ago testimonial.php 6 years ago text.php 6 years ago touch-slider.php 6 years ago video.php 6 years ago
custom-list.php
1145 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\Scheme_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 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
248 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text',
249 'condition'=> array(
250 'display_advanced' => 'yes'
251 )
252 )
253 );
254
255 $repeater->add_responsive_control(
256 'text_primary_margin',
257 array(
258 'label' => __( 'Margin', 'auxin-elements' ),
259 'type' => Controls_Manager::DIMENSIONS,
260 'size_units' => array( 'px', 'em' ),
261 'selectors' => array(
262 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
263 ),
264 'condition' => array(
265 'display_advanced' => 'yes'
266 )
267 )
268 );
269
270 $repeater->add_control(
271 'text_tag',
272 array(
273 'label' => __( 'Text HTML Tag', 'auxin-elements' ),
274 'type' => Controls_Manager::SELECT,
275 'options' => array(
276 'span' => 'span',
277 'p' => 'p',
278 'h1' => 'H1',
279 'h2' => 'H2',
280 'h3' => 'H3',
281 'h4' => 'H4',
282 'h5' => 'H5',
283 'h6' => 'H6'
284 ),
285 'default' => 'span',
286 'condition' => array(
287 'display_advanced' => 'yes'
288 ),
289 'separator' => 'after'
290 )
291 );
292
293 $repeater->add_responsive_control(
294 'text_secondary_color',
295 array(
296 'label' => __( 'Secondary Text Color', 'auxin-elements' ),
297 'type' => Controls_Manager::COLOR,
298 'selectors' => array(
299 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2' => 'color: {{VALUE}};',
300 ),
301 'condition' => array(
302 'display_advanced' => 'yes',
303 'text_secondary!' => ''
304 )
305 )
306 );
307
308 $repeater->add_group_control(
309 Group_Control_Typography::get_type(),
310 array(
311 'name' => 'text_secondary_typography',
312 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
313 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2',
314 'condition'=> array(
315 'display_advanced' => 'yes',
316 'text_secondary!' => ''
317 )
318 )
319 );
320
321 $repeater->add_responsive_control(
322 'text_secondary_margin',
323 array(
324 'label' => __( 'Secondary Text Margin', 'auxin-elements' ),
325 'type' => Controls_Manager::DIMENSIONS,
326 'size_units' => array( 'px', 'em' ),
327 'selectors' => array(
328 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
329 ),
330 'condition' => array(
331 'display_advanced' => 'yes',
332 'text_secondary!' => ''
333 ),
334 'separator'=> 'after'
335 )
336 );
337
338 $this->add_control(
339 'list',
340 array(
341 'label' => __( 'List Items', 'auxin-elements' ),
342 'type' => Controls_Manager::REPEATER,
343 'default' => array(
344 array(
345 'text_primary' => 'List Item #1',
346 'icon' => 'check-1'
347 ),
348 array(
349 'text_primary' => 'List Item #2',
350 'icon' => 'check-1'
351 ),
352 array(
353 'text_primary' => 'List Item #3',
354 'icon' => 'check-1'
355 )
356 ),
357 'fields' => array_values( $repeater->get_controls() ),
358 'title_field' => '{{{ text_primary }}}'
359 )
360 );
361
362 $this->end_controls_section();
363
364 /*-----------------------------------------------------------------------------------*/
365 /* Style TAB
366 /*-----------------------------------------------------------------------------------*/
367
368 /* List Section
369 /*-------------------------------------*/
370
371 $this->start_controls_section(
372 'list_layout_section',
373 array(
374 'label' => __( 'Layout', 'auxin-elements' ),
375 'tab' => Controls_Manager::TAB_LAYOUT
376 )
377 );
378
379 $this->add_control(
380 'direction',
381 array(
382 'label' => __( 'Direction', 'auxin-elements' ),
383 'type' => Controls_Manager::SELECT,
384 'options' => array(
385 'default' => __( 'Default' , 'auxin-elements' ),
386 'vertical' => __( 'Vertical' , 'auxin-elements' ),
387 'horizontal' => __( 'Horizontal', 'auxin-elements' )
388 ),
389 'default' => 'default'
390 )
391 );
392
393 $this->add_responsive_control(
394 'list_height',
395 array(
396 'label' => __( 'Height', 'auxin-elements' ),
397 'type' => Controls_Manager::SLIDER,
398 'size_units' => array( 'px', 'em' ),
399 'range' => array(
400 'px' => array(
401 'max' => 1000
402 ),
403 'em' => array(
404 'max' => 30
405 )
406 ),
407 'selectors' => array(
408 '{{WRAPPER}} .aux-icon-list-items' => 'max-height: {{SIZE}}{{UNIT}};',
409 ),
410 'condition' => array(
411 'direction' => 'vertical'
412 )
413 )
414 );
415
416 $this->add_responsive_control(
417 'list_width',
418 array(
419 'label' => __( 'Width', 'auxin-elements' ),
420 'type' => Controls_Manager::SLIDER,
421 'size_units' => array( 'px', 'em', '%' ),
422 'range' => array(
423 'px' => array(
424 'max' => 1000
425 ),
426 'em' => array(
427 'max' => 30
428 ),
429 '%' => array(
430 'max' => 100
431 )
432 ),
433 'selectors' => array(
434 '{{WRAPPER}} .aux-icon-list-item' => 'min-width: {{SIZE}}{{UNIT}};',
435 ),
436 'condition' => array(
437 'direction' => 'horizontal'
438 )
439 )
440 );
441
442 $this->add_responsive_control(
443 'list_column_gutter',
444 array(
445 'label' => __( 'Space Between Columns', 'auxin-elements' ),
446 'type' => Controls_Manager::SLIDER,
447 'size_units' => array( 'px', 'em' ),
448 'range' => array(
449 'px' => array(
450 'max' => 100
451 ),
452 'em' => array(
453 'max' => 10
454 )
455 ),
456 'selectors' => array(
457 '{{WRAPPER}} .aux-icon-list-item' => 'margin-right: {{SIZE}}{{UNIT}};',
458 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'right: calc(-{{SIZE}}{{UNIT}}/2);',
459 ),
460 'condition' => array(
461 'direction!' => 'default'
462 )
463 )
464 );
465
466 $this->add_responsive_control(
467 'align',
468 array(
469 'label' => __('Horizontal Align','auxin-elements'),
470 'type' => Controls_Manager::CHOOSE,
471 'options' => array(
472 'flex-start' => array(
473 'title' => __( 'Left', 'auxin-elements' ),
474 'icon' => 'fa fa-align-left',
475 ),
476 'center' => array(
477 'title' => __( 'Center', 'auxin-elements' ),
478 'icon' => 'fa fa-align-center',
479 ),
480 'flex-end' => array(
481 'title' => __( 'Right', 'auxin-elements' ),
482 'icon' => 'fa fa-align-right',
483 ),
484 ),
485 'default' => 'center',
486 'toggle' => true,
487 'selectors_dictionary' => [
488 'flex-start' => 'flex-start; text-align:left;',
489 'center' => 'center; text-align:center;',
490 'flex-end' => 'flex-end;text-align:right;'
491 ],
492 'selectors' => array(
493 '{{WRAPPER}} .aux-icon-list-items' => 'justify-content: {{VALUE}}',
494 )
495 )
496 );
497
498 $this->add_responsive_control(
499 'align_vertical',
500 array(
501 'label' => __('Vertical Align','auxin-elements'),
502 'type' => Controls_Manager::CHOOSE,
503 'options' => array(
504 'flex-start' => array(
505 'title' => __( 'Left', 'auxin-elements' ),
506 'icon' => 'eicon-v-align-top',
507 ),
508 'center' => array(
509 'title' => __( 'Center', 'auxin-elements' ),
510 'icon' => 'eicon-v-align-middle',
511 ),
512 'flex-end' => array(
513 'title' => __( 'Right', 'auxin-elements' ),
514 'icon' => 'eicon-v-align-bottom',
515 )
516 ),
517 'default' => '',
518 'toggle' => true,
519 'selectors' => array(
520 '{{WRAPPER}} .aux-direction-horizontal' => 'align-items: {{VALUE}}',
521 '{{WRAPPER}} .aux-icon-list-item' => 'align-items: {{VALUE}}'
522 )
523 )
524 );
525
526
527 $this->end_controls_section();
528
529 /*-----------------------------------------------------------------------------------*/
530 /* Style TAB
531 /*-----------------------------------------------------------------------------------*/
532
533 /* List Section
534 /*-------------------------------------*/
535
536 $this->start_controls_section(
537 'list_style_section',
538 array(
539 'label' => __( 'List', 'auxin-elements' ),
540 'tab' => Controls_Manager::TAB_STYLE
541 )
542 );
543
544 $this->add_responsive_control(
545 'list_items_space',
546 array(
547 'label' => __( 'Space Between Rows', 'auxin-elements' ),
548 'type' => Controls_Manager::SLIDER,
549 'size_units' => array( 'px', 'em' ),
550 'range' => array(
551 'px' => array(
552 'max' => 25
553 )
554 ),
555 'selectors' => array(
556 '{{WRAPPER}} .aux-icon-list-item:not(:last-child)' => 'padding-bottom: {{SIZE}}{{UNIT}};',
557 '{{WRAPPER}} .aux-icon-list-item:not(:first-child)' => 'margin-top: {{SIZE}}{{UNIT}};'
558 )
559 )
560 );
561
562 $this->add_control(
563 'connector',
564 array(
565 'label' => __( 'Display Connector', 'auxin-elements' ),
566 'type' => Controls_Manager::SWITCHER,
567 'label_on' => __( 'On', 'auxin-elements' ),
568 'label_off' => __( 'Off', 'auxin-elements' ),
569 'return_value' => 'yes',
570 'default' => 'yes',
571 'separator' => 'before'
572 )
573 );
574
575 $this->add_control(
576 'connector_style',
577 array(
578 'label' => __( 'Style', 'auxin-elements' ),
579 'type' => Controls_Manager::SELECT,
580 'options' => array(
581 'solid' => __( 'Solid', 'auxin-elements' ),
582 'double' => __( 'Double', 'auxin-elements' ),
583 'dotted' => __( 'Dotted', 'auxin-elements' ),
584 'dashed' => __( 'Dashed', 'auxin-elements' ),
585 ),
586 'default' => 'dashed',
587 'selectors' => array(
588 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-style: {{VALUE}};',
589 ),
590 'condition' => array(
591 'connector' => 'yes'
592 )
593 )
594 );
595
596 $this->add_responsive_control(
597 'connector_weight',
598 array(
599 'label' => __( 'Weight', 'auxin-elements' ),
600 'type' => Controls_Manager::SLIDER,
601 'range' => array(
602 'px' => array(
603 'max' => 10
604 )
605 ),
606 'selectors' => array(
607 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
608 ),
609 'condition' => array(
610 'connector' => 'yes'
611 )
612 )
613 );
614
615 $this->add_responsive_control(
616 'connector_margin_left',
617 array(
618 'label' => __( 'Left Space', 'auxin-elements' ),
619 'type' => Controls_Manager::SLIDER,
620 'range' => array(
621 'px' => array(
622 'max' => 20
623 )
624 ),
625 'selectors' => array(
626 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'margin-left: {{SIZE}}{{UNIT}};',
627 ),
628 'condition' => array(
629 'connector' => 'yes'
630 )
631 )
632 );
633
634 $this->add_responsive_control(
635 'connector_color',
636 array(
637 'label' => __( 'Color', 'auxin-elements' ),
638 'type' => Controls_Manager::COLOR,
639 'selectors' => array(
640 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-color: {{VALUE}};'
641 ),
642 'condition' => array(
643 'connector' => 'yes'
644 )
645 )
646 );
647
648 $this->add_control(
649 'divider',
650 array(
651 'label' => __( 'Display Divider', 'auxin-elements' ),
652 'type' => Controls_Manager::SWITCHER,
653 'label_on' => __( 'On', 'auxin-elements' ),
654 'label_off' => __( 'Off', 'auxin-elements' ),
655 'return_value' => 'yes',
656 'default' => 'no',
657 'separator' => 'before'
658 )
659 );
660
661 $this->add_control(
662 'divider_style',
663 array(
664 'label' => __( 'Style', 'auxin-elements' ),
665 'type' => Controls_Manager::SELECT,
666 'options' => array(
667 'solid' => __( 'Solid', 'auxin-elements' ),
668 'double' => __( 'Double', 'auxin-elements' ),
669 'dotted' => __( 'Dotted', 'auxin-elements' ),
670 'dashed' => __( 'Dashed', 'auxin-elements' ),
671 ),
672 'default' => 'solid',
673 'selectors' => array(
674 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-style: {{VALUE}};',
675 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-style: {{VALUE}};'
676 ),
677 'condition' => array(
678 'divider' => 'yes'
679 )
680 )
681 );
682
683 $this->add_responsive_control(
684 'divider_weight',
685 array(
686 'label' => __( 'Weight', 'auxin-elements' ),
687 'type' => Controls_Manager::SLIDER,
688 'size_units' => array( 'px' ),
689 'range' => array(
690 'px' => array(
691 'max' => 10
692 )
693 ),
694 'selectors' => array(
695 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
696 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-width: {{SIZE}}{{UNIT}};'
697 ),
698 'condition' => array(
699 'divider' => 'yes'
700 )
701 )
702 );
703
704 $this->add_responsive_control(
705 'divider_width',
706 array(
707 'label' => __( 'Width', 'auxin-elements' ),
708 'type' => Controls_Manager::SLIDER,
709 'size_units' => array( 'px', '%' ),
710 'range' => array(
711 'px' => array(
712 'min' => 1,
713 'max' => 1200
714 ),
715 '%' => array(
716 'min' => 1,
717 'max' => 100
718 )
719 ),
720 'selectors' => array(
721 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:after' => 'width: {{SIZE}}{{UNIT}};'
722 ),
723 'condition' => array(
724 'divider' => 'yes',
725 'direction!' => 'horizontal'
726 )
727 )
728 );
729
730 $this->add_responsive_control(
731 'divider_color',
732 array(
733 'label' => __( 'Color', 'auxin-elements' ),
734 'type' => Controls_Manager::COLOR,
735 'selectors' => array(
736 '{{WRAPPER}} .aux-icon-list-divider .aux-icon-list-item:not(:last-child):after' => 'border-bottom-color: {{VALUE}};'
737 ),
738 'selectors' => array(
739 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-color: {{VALUE}};',
740 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-color: {{VALUE}};'
741 ),
742 'condition' => array(
743 'divider' => 'yes'
744 )
745 )
746 );
747
748 $this->end_controls_section();
749
750
751 /* Text Style Section
752 /*-------------------------------------*/
753
754 $this->start_controls_section(
755 'text_style_section',
756 array(
757 'label' => __( 'Text', 'auxin-elements' ),
758 'tab' => Controls_Manager::TAB_STYLE
759 )
760 );
761
762 $this->add_control(
763 'text_style_heading',
764 array(
765 'label' => __( 'Text', 'auxin-elements' ),
766 'type' => Controls_Manager::HEADING,
767 'separator' => 'before'
768 )
769 );
770
771 $this->add_responsive_control(
772 'text1_color',
773 array(
774 'label' => __( 'Color', 'auxin-elements' ),
775 'type' => Controls_Manager::COLOR,
776 'selectors' => array(
777 '{{WRAPPER}} .aux-icon-list-text' => 'color: {{VALUE}};'
778 )
779 )
780 );
781
782 $this->add_responsive_control(
783 'text1_hover_color',
784 array(
785 'label' => __( 'Hover Color', 'auxin-elements' ),
786 'type' => Controls_Manager::COLOR,
787 'selectors' => array(
788 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-text' => 'color: {{VALUE}};',
789 )
790 )
791 );
792
793 $this->add_group_control(
794 Group_Control_Typography::get_type(),
795 array(
796 'name' => 'text1_typography',
797 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
798 'selector' => '{{WRAPPER}} .aux-icon-list-text'
799 )
800 );
801
802 $this->add_responsive_control(
803 'text1_margin',
804 array(
805 'label' => __( 'Text Margin', 'auxin-elements' ),
806 'type' => Controls_Manager::DIMENSIONS,
807 'size_units' => array( 'px', 'em' ),
808 'allowed_dimensions' => 'all',
809 'selectors' => array(
810 '{{WRAPPER}} .aux-icon-list-text' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
811 )
812 )
813 );
814
815 /* Text2 Style Section
816 /*-------------------------------------*/
817
818 $this->add_control(
819 'text2_style_heading',
820 array(
821 'label' => __( 'Secondary Text', 'auxin-elements' ),
822 'type' => Controls_Manager::HEADING,
823 'separator' => 'before',
824 )
825 );
826
827 $this->add_responsive_control(
828 'text2_color',
829 array(
830 'label' => __( 'Color', 'auxin-elements' ),
831 'type' => Controls_Manager::COLOR,
832 'selectors' => array(
833 '{{WRAPPER}} .aux-icon-list-text2' => 'color: {{VALUE}};'
834 )
835 )
836 );
837
838 $this->add_responsive_control(
839 'text2_hover_color',
840 array(
841 'label' => __( 'Hover Color', 'auxin-elements' ),
842 'type' => Controls_Manager::COLOR,
843 'selectors' => array(
844 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-text2' => 'color: {{VALUE}};',
845 )
846 )
847 );
848
849 $this->add_group_control(
850 Group_Control_Typography::get_type(),
851 array(
852 'name' => 'text2_typography',
853 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
854 'selector' => '{{WRAPPER}} .aux-icon-list-text2'
855 )
856 );
857
858 $this->add_responsive_control(
859 'text2_margin',
860 array(
861 'label' => __( 'Text Margin', 'auxin-elements' ),
862 'type' => Controls_Manager::DIMENSIONS,
863 'size_units' => array( 'px', 'em' ),
864 'allowed_dimensions' => 'all',
865 'selectors' => array(
866 '{{WRAPPER}} .aux-icon-list-text2' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
867 )
868 )
869 );
870
871 $this->end_controls_section();
872
873 /* Icon Style Section
874 /*-------------------------------------*/
875
876 $this->start_controls_section(
877 'icon_style_section',
878 array(
879 'label' => __( 'Icon', 'auxin-elements' ),
880 'tab' => Controls_Manager::TAB_STYLE
881 )
882 );
883
884 $this->start_controls_tabs( 'icon_style_tabs' );
885
886 $this->start_controls_tab(
887 'icon_style_normal',
888 array(
889 'label' => __( 'Normal' , 'auxin-elements' )
890 )
891 );
892
893 $this->add_responsive_control(
894 'icon_color',
895 array(
896 'label' => __( 'Color', 'auxin-elements' ),
897 'type' => Controls_Manager::COLOR,
898 'default' => '#24af29',
899 'selectors' => array(
900 '{{WRAPPER}} .aux-icon-list-icon' => 'color: {{VALUE}};'
901 )
902 )
903 );
904
905 $this->add_group_control(
906 Group_Control_Background::get_type(),
907 array(
908 'name' => 'icon_background',
909 'selector' => '{{WRAPPER}} .aux-icon-list-item'
910 )
911 );
912
913 $this->end_controls_tab();
914
915 $this->start_controls_tab(
916 'icon_style_hover',
917 array(
918 'label' => __( 'Hover' , 'auxin-elements' )
919 )
920 );
921
922 $this->add_responsive_control(
923 'icon_hover_color',
924 array(
925 'label' => __( 'Color', 'auxin-elements' ),
926 'type' => Controls_Manager::COLOR,
927 'selectors' => array(
928 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-icon' => 'color: {{VALUE}};',
929 )
930 )
931 );
932
933 $this->add_group_control(
934 Group_Control_Background::get_type(),
935 array(
936 'name' => 'icon_background_hover',
937 'selector' => '{{WRAPPER}} .aux-icon-list-item'
938 )
939 );
940
941 $this->end_controls_tab();
942
943 $this->end_controls_tabs();
944
945
946 $this->add_responsive_control(
947 'icon_size',
948 array(
949 'label' => __( 'Size', 'auxin-elements' ),
950 'type' => Controls_Manager::SLIDER,
951 'size_units' => array( 'px', 'em' ),
952 'range' => array(
953 'px' => array(
954 'max' => 100
955 ),
956 'em' => array(
957 'max' => 10
958 )
959 ),
960 'selectors' => array(
961 '{{WRAPPER}} .aux-icon-list-icon' => 'font-size: {{SIZE}}{{UNIT}};',
962 ),
963 'separator' => 'before'
964 )
965 );
966
967 $this->add_responsive_control(
968 'icon_margin',
969 array(
970 'label' => __( 'Margin', 'auxin-elements' ),
971 'type' => Controls_Manager::DIMENSIONS,
972 'size_units' => array( 'px', 'em' ),
973 'allowed_dimensions' => 'all',
974 'selectors' => array(
975 '{{WRAPPER}} .aux-icon-list-icon' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
976 )
977 )
978 );
979
980 $this->add_responsive_control(
981 'icon_padding',
982 array(
983 'label' => __( 'Padding', 'auxin-elements' ),
984 'type' => Controls_Manager::DIMENSIONS,
985 'size_units' => array( 'px', 'em' ),
986 'allowed_dimensions' => 'all',
987 'selectors' => array(
988 '{{WRAPPER}} .aux-icon-list-icon' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; line-height:0;'
989 )
990 )
991 );
992
993 $this->end_controls_section();
994
995 /* List Item Style Section
996 /*-------------------------------------*/
997
998 $this->start_controls_section(
999 'list_item_style_section',
1000 array(
1001 'label' => __( 'List Item', 'auxin-elements' ),
1002 'tab' => Controls_Manager::TAB_STYLE
1003 )
1004 );
1005
1006 $this->add_responsive_control(
1007 'list_padding',
1008 array(
1009 'label' => __( 'Padding', 'auxin-elements' ),
1010 'type' => Controls_Manager::DIMENSIONS,
1011 'size_units' => array( 'px', 'em', '%' ),
1012 'separator' => 'before',
1013 'selectors' => array(
1014 '{{WRAPPER}} .aux-icon-list-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1015 )
1016 )
1017 );
1018
1019 $this->add_responsive_control(
1020 'list_margin',
1021 array(
1022 'label' => __( 'Margin', 'auxin-elements' ),
1023 'type' => Controls_Manager::DIMENSIONS,
1024 'size_units' => array( 'px', 'em' ),
1025 'allowed_dimensions' => 'all',
1026 'selectors' => array(
1027 '{{WRAPPER}} .aux-icon-list-item' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1028 ),
1029 'separator' => 'after'
1030 )
1031 );
1032
1033 $this->start_controls_tabs( 'list_colors' );
1034
1035 $this->start_controls_tab(
1036 'list_status_normal',
1037 array(
1038 'label' => __( 'Normal' , 'auxin-elements' )
1039 )
1040 );
1041
1042 $this->add_group_control(
1043 Group_Control_Box_Shadow::get_type(),
1044 array(
1045 'name' => 'list_boxshadow_normal',
1046 'label' => __( 'Box Shadow Normal', 'auxin-elements' ),
1047 'selector' => '{{WRAPPER}} .aux-icon-list-item',
1048 'separator' => 'none'
1049 )
1050 );
1051
1052 $this->add_group_control(
1053 Group_Control_Border::get_type(),
1054 array(
1055 'name' => 'list_border_normal',
1056 'selector' => '{{WRAPPER}} .aux-icon-list-item',
1057 'separator' => 'none'
1058 )
1059 );
1060
1061 $this->add_group_control(
1062 Group_Control_Background::get_type(),
1063 array(
1064 'name' => 'list_background_normal',
1065 'selector' => '{{WRAPPER}} .aux-icon-list-item',
1066 'separator' => 'none'
1067 )
1068 );
1069
1070 $this->end_controls_tab();
1071
1072 $this->start_controls_tab(
1073 'list_status_hover',
1074 array(
1075 'label' => __( 'Hover' , 'auxin-elements' )
1076 )
1077 );
1078
1079 $this->add_group_control(
1080 Group_Control_Box_Shadow::get_type(),
1081 array(
1082 'name' => 'list_boxshadow_hover',
1083 'label' => __( 'Box Shadow Hover', 'auxin-elements' ),
1084 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
1085 'separator' => 'none'
1086 )
1087 );
1088
1089 $this->add_group_control(
1090 Group_Control_Border::get_type(),
1091 array(
1092 'name' => 'list_border_hover',
1093 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
1094 'separator' => 'none'
1095 )
1096 );
1097
1098 $this->add_group_control(
1099 Group_Control_Background::get_type(),
1100 array(
1101 'name' => 'list_background_hover',
1102 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
1103 'separator' => 'none'
1104 )
1105 );
1106
1107 $this->end_controls_tab();
1108
1109 $this->end_controls_tabs();
1110
1111 $this->end_controls_section();
1112 }
1113
1114 /**
1115 * Render 'Custom List' widget output on the frontend.
1116 *
1117 * Written in PHP and used to generate the final HTML.
1118 *
1119 * @since 1.0.0
1120 * @access protected
1121 */
1122 protected function render() {
1123
1124 $settings = $this->get_settings_for_display();
1125
1126 foreach ( $settings['list'] as $key => $list_item ) {
1127
1128 $settings['list'][$key]['icon'] = ! empty( $list_item['aux_custom_list_icon']['value'] ) ? $list_item['aux_custom_list_icon']['value'] : ( ! empty( $list_item['icon'] ) ? $list_item['icon'] : '' ) ;
1129
1130 }
1131
1132 $args = array(
1133 'list' => $settings['list'], // repeater items
1134 'direction' => $settings['direction'],
1135 'connector' => $settings['connector'], // A line that connects primary and secondary text
1136 'divider' => $settings['divider'], // A line between list items
1137 'item_class_prefix' => '' // Default class prefix for each repeater item
1138 );
1139
1140 // pass the args through the corresponding shortcode callback
1141 echo auxin_widget_list_callback( $args );
1142 }
1143
1144 }
1145