PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.0
Shortcodes and extra features for Phlox theme v2.5.0
2.17.22 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 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
1018 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 'icon',
119 array(
120 'label' => __( 'Icon', 'auxin-elements' ),
121 'type' => 'aux-icon',
122 'default' => 'check-1',
123 'label_block' => true
124 )
125 );
126
127 $repeater->add_control(
128 'text_secondary',
129 array(
130 'label' => __( 'Secondary Text', 'auxin-elements' ),
131 'type' => Controls_Manager::TEXT,
132 'default' => '',
133 'label_block' => true
134 )
135 );
136
137 $repeater->add_control(
138 'link',
139 array(
140 'label' => __('Link','auxin-elements' ),
141 'type' => Controls_Manager::URL,
142 'placeholder' => '',
143 'show_external' => true,
144 'label_block' => true,
145 'dynamic' => [
146 'active' => true
147 ]
148 )
149 );
150
151 $repeater->add_control(
152 'display_advanced',
153 array(
154 'label' => __( 'Customize this item', 'auxin-elements' ),
155 'type' => Controls_Manager::SWITCHER,
156 'label_on' => __( 'On', 'auxin-elements' ),
157 'label_off' => __( 'Off', 'auxin-elements' ),
158 'return_value' => 'yes',
159 'default' => 'no',
160 'separator' => 'after'
161 )
162 );
163
164 $repeater->add_responsive_control(
165 'icon_color',
166 array(
167 'label' => __( 'Icon Color', 'auxin-elements' ),
168 'label_block' => 'true',
169 'type' => Controls_Manager::COLOR,
170 'selectors' => array(
171 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-icon' => 'color: {{VALUE}};',
172 ),
173 'condition' => array(
174 'display_advanced' => 'yes'
175 )
176 )
177 );
178
179 $repeater->add_responsive_control(
180 'icon_item_margin',
181 array(
182 'label' => __( 'Icon Margin', 'auxin-elements' ),
183 'type' => Controls_Manager::DIMENSIONS,
184 'size_units' => array( 'px', 'em' ),
185 'selectors' => array(
186 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
187 ),
188 'condition' => array(
189 'display_advanced' => 'yes'
190 ),
191 'separator'=> 'after'
192 )
193 );
194
195 $repeater->add_responsive_control(
196 'text_primary_color',
197 array(
198 'label' => __( 'Text Color', 'auxin-elements' ),
199 'type' => Controls_Manager::COLOR,
200 'selectors' => array(
201 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text' => 'color: {{VALUE}};',
202 ),
203 'condition' => array(
204 'display_advanced' => 'yes'
205 )
206 )
207 );
208
209 $repeater->add_group_control(
210 Group_Control_Typography::get_type(),
211 array(
212 'name' => 'text_primary_typography',
213 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
214 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text',
215 'condition'=> array(
216 'display_advanced' => 'yes'
217 )
218 )
219 );
220
221 $repeater->add_responsive_control(
222 'text_primary_margin',
223 array(
224 'label' => __( 'Text Margin', 'auxin-elements' ),
225 'type' => Controls_Manager::DIMENSIONS,
226 'size_units' => array( 'px', 'em' ),
227 'selectors' => array(
228 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
229 ),
230 'condition' => array(
231 'display_advanced' => 'yes'
232 )
233 )
234 );
235
236 $repeater->add_control(
237 'text_tag',
238 array(
239 'label' => __( 'Text HTML Tag', 'auxin-elements' ),
240 'type' => Controls_Manager::SELECT,
241 'options' => array(
242 'span' => 'span',
243 'p' => 'p',
244 'h1' => 'H1',
245 'h2' => 'H2',
246 'h3' => 'H3',
247 'h4' => 'H4',
248 'h5' => 'H5',
249 'h6' => 'H6'
250 ),
251 'default' => 'span',
252 'condition' => array(
253 'display_advanced' => 'yes'
254 ),
255 'separator' => 'after'
256 )
257 );
258
259 $repeater->add_responsive_control(
260 'text_secondary_color',
261 array(
262 'label' => __( 'Secondary Text Color', 'auxin-elements' ),
263 'type' => Controls_Manager::COLOR,
264 'selectors' => array(
265 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2' => 'color: {{VALUE}};',
266 ),
267 'condition' => array(
268 'display_advanced' => 'yes',
269 'text_secondary!' => ''
270 )
271 )
272 );
273
274 $repeater->add_group_control(
275 Group_Control_Typography::get_type(),
276 array(
277 'name' => 'text_secondary_typography',
278 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
279 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2',
280 'condition'=> array(
281 'display_advanced' => 'yes',
282 'text_secondary!' => ''
283 )
284 )
285 );
286
287 $repeater->add_responsive_control(
288 'text_secondary_margin',
289 array(
290 'label' => __( 'Secondary Text Margin', 'auxin-elements' ),
291 'type' => Controls_Manager::DIMENSIONS,
292 'size_units' => array( 'px', 'em' ),
293 'selectors' => array(
294 '{{WRAPPER}} {{CURRENT_ITEM}} .aux-icon-list-text2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
295 ),
296 'condition' => array(
297 'display_advanced' => 'yes',
298 'text_secondary!' => ''
299 ),
300 'separator'=> 'after'
301 )
302 );
303
304 $this->add_control(
305 'list',
306 array(
307 'label' => __( 'List Items', 'auxin-elements' ),
308 'type' => Controls_Manager::REPEATER,
309 'default' => array(
310 array(
311 'text_primary' => 'List Item #1',
312 'icon' => 'check-1'
313 ),
314 array(
315 'text_primary' => 'List Item #2',
316 'icon' => 'check-1'
317 ),
318 array(
319 'text_primary' => 'List Item #3',
320 'icon' => 'check-1'
321 )
322 ),
323 'fields' => array_values( $repeater->get_controls() ),
324 'title_field' => '{{{ text_primary }}}'
325 )
326 );
327
328 $this->end_controls_section();
329
330 /*-----------------------------------------------------------------------------------*/
331 /* Style TAB
332 /*-----------------------------------------------------------------------------------*/
333
334 /* List Section
335 /*-------------------------------------*/
336
337 $this->start_controls_section(
338 'list_layout_section',
339 array(
340 'label' => __( 'Layout', 'auxin-elements' ),
341 'tab' => Controls_Manager::TAB_LAYOUT
342 )
343 );
344
345 $this->add_control(
346 'direction',
347 array(
348 'label' => __( 'Direction', 'auxin-elements' ),
349 'type' => Controls_Manager::SELECT,
350 'options' => array(
351 'default' => __( 'Default' , 'auxin-elements' ),
352 'vertical' => __( 'Vertical' , 'auxin-elements' ),
353 'horizontal' => __( 'Horizontal', 'auxin-elements' )
354 ),
355 'default' => 'default'
356 )
357 );
358
359 $this->add_responsive_control(
360 'list_height',
361 array(
362 'label' => __( 'Height', 'auxin-elements' ),
363 'type' => Controls_Manager::SLIDER,
364 'size_units' => array( 'px', 'em' ),
365 'range' => array(
366 'px' => array(
367 'max' => 1000
368 ),
369 'em' => array(
370 'max' => 30
371 )
372 ),
373 'selectors' => array(
374 '{{WRAPPER}} .aux-icon-list-items' => 'max-height: {{SIZE}}{{UNIT}};',
375 ),
376 'condition' => array(
377 'direction' => 'vertical'
378 )
379 )
380 );
381
382 $this->add_responsive_control(
383 'list_width',
384 array(
385 'label' => __( 'Width', 'auxin-elements' ),
386 'type' => Controls_Manager::SLIDER,
387 'size_units' => array( 'px', 'em', '%' ),
388 'range' => array(
389 'px' => array(
390 'max' => 1000
391 ),
392 'em' => array(
393 'max' => 30
394 ),
395 '%' => array(
396 'max' => 100
397 )
398 ),
399 'selectors' => array(
400 '{{WRAPPER}} .aux-icon-list-item' => 'min-width: {{SIZE}}{{UNIT}};',
401 ),
402 'condition' => array(
403 'direction' => 'horizontal'
404 )
405 )
406 );
407
408 $this->add_responsive_control(
409 'list_column_gutter',
410 array(
411 'label' => __( 'Space Between Columns', 'auxin-elements' ),
412 'type' => Controls_Manager::SLIDER,
413 'size_units' => array( 'px', 'em' ),
414 'range' => array(
415 'px' => array(
416 'max' => 100
417 ),
418 'em' => array(
419 'max' => 10
420 )
421 ),
422 'selectors' => array(
423 '{{WRAPPER}} .aux-icon-list-item' => 'margin-right: {{SIZE}}{{UNIT}};',
424 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'right: calc(-{{SIZE}}{{UNIT}}/2);',
425 ),
426 'condition' => array(
427 'direction!' => 'default'
428 )
429 )
430 );
431
432 $this->add_responsive_control(
433 'align',
434 array(
435 'label' => __('Align','auxin-elements'),
436 'type' => Controls_Manager::CHOOSE,
437 'options' => array(
438 'left' => array(
439 'title' => __( 'Left', 'auxin-elements' ),
440 'icon' => 'fa fa-align-left',
441 ),
442 'center' => array(
443 'title' => __( 'Center', 'auxin-elements' ),
444 'icon' => 'fa fa-align-center',
445 ),
446 'right' => array(
447 'title' => __( 'Right', 'auxin-elements' ),
448 'icon' => 'fa fa-align-right',
449 ),
450 ),
451 'default' => 'center',
452 'toggle' => true,
453 'selectors' => array(
454 '{{WRAPPER}}' => 'text-align: {{VALUE}}',
455 )
456 )
457 );
458
459 $this->end_controls_section();
460
461 /*-----------------------------------------------------------------------------------*/
462 /* Style TAB
463 /*-----------------------------------------------------------------------------------*/
464
465 /* List Section
466 /*-------------------------------------*/
467
468 $this->start_controls_section(
469 'list_style_section',
470 array(
471 'label' => __( 'List', 'auxin-elements' ),
472 'tab' => Controls_Manager::TAB_STYLE
473 )
474 );
475
476 $this->add_responsive_control(
477 'list_items_space',
478 array(
479 'label' => __( 'Space Between Rows', 'auxin-elements' ),
480 'type' => Controls_Manager::SLIDER,
481 'size_units' => array( 'px', 'em' ),
482 'range' => array(
483 'px' => array(
484 'max' => 25
485 )
486 ),
487 'selectors' => array(
488 '{{WRAPPER}} .aux-icon-list-item:not(:last-child)' => 'padding-bottom: {{SIZE}}{{UNIT}};',
489 '{{WRAPPER}} .aux-icon-list-item:not(:first-child)' => 'margin-top: {{SIZE}}{{UNIT}};'
490 )
491 )
492 );
493
494 $this->add_control(
495 'connector',
496 array(
497 'label' => __( 'Display Connector', 'auxin-elements' ),
498 'type' => Controls_Manager::SWITCHER,
499 'label_on' => __( 'On', 'auxin-elements' ),
500 'label_off' => __( 'Off', 'auxin-elements' ),
501 'return_value' => 'yes',
502 'default' => 'yes',
503 'separator' => 'before'
504 )
505 );
506
507 $this->add_control(
508 'connector_style',
509 array(
510 'label' => __( 'Style', 'auxin-elements' ),
511 'type' => Controls_Manager::SELECT,
512 'options' => array(
513 'solid' => __( 'Solid', 'auxin-elements' ),
514 'double' => __( 'Double', 'auxin-elements' ),
515 'dotted' => __( 'Dotted', 'auxin-elements' ),
516 'dashed' => __( 'Dashed', 'auxin-elements' ),
517 ),
518 'default' => 'dashed',
519 'selectors' => array(
520 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-style: {{VALUE}};',
521 ),
522 'condition' => array(
523 'connector' => 'yes'
524 )
525 )
526 );
527
528 $this->add_responsive_control(
529 'connector_weight',
530 array(
531 'label' => __( 'Weight', 'auxin-elements' ),
532 'type' => Controls_Manager::SLIDER,
533 'range' => array(
534 'px' => array(
535 'max' => 10
536 )
537 ),
538 'selectors' => array(
539 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
540 ),
541 'condition' => array(
542 'connector' => 'yes'
543 )
544 )
545 );
546
547 $this->add_responsive_control(
548 'connector_margin_left',
549 array(
550 'label' => __( 'Left Space', 'auxin-elements' ),
551 'type' => Controls_Manager::SLIDER,
552 'range' => array(
553 'px' => array(
554 'max' => 20
555 )
556 ),
557 'selectors' => array(
558 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'margin-left: {{SIZE}}{{UNIT}};',
559 ),
560 'condition' => array(
561 'connector' => 'yes'
562 )
563 )
564 );
565
566 $this->add_responsive_control(
567 'connector_color',
568 array(
569 'label' => __( 'Color', 'auxin-elements' ),
570 'type' => Controls_Manager::COLOR,
571 'selectors' => array(
572 '{{WRAPPER}} .aux-icon-list-item .aux-list-connector' => 'border-bottom-color: {{VALUE}};'
573 ),
574 'condition' => array(
575 'connector' => 'yes'
576 )
577 )
578 );
579
580 $this->add_control(
581 'divider',
582 array(
583 'label' => __( 'Display Divider', 'auxin-elements' ),
584 'type' => Controls_Manager::SWITCHER,
585 'label_on' => __( 'On', 'auxin-elements' ),
586 'label_off' => __( 'Off', 'auxin-elements' ),
587 'return_value' => 'yes',
588 'default' => 'no',
589 'separator' => 'before'
590 )
591 );
592
593 $this->add_control(
594 'divider_style',
595 array(
596 'label' => __( 'Style', 'auxin-elements' ),
597 'type' => Controls_Manager::SELECT,
598 'options' => array(
599 'solid' => __( 'Solid', 'auxin-elements' ),
600 'double' => __( 'Double', 'auxin-elements' ),
601 'dotted' => __( 'Dotted', 'auxin-elements' ),
602 'dashed' => __( 'Dashed', 'auxin-elements' ),
603 ),
604 'default' => 'solid',
605 'selectors' => array(
606 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-style: {{VALUE}};',
607 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-style: {{VALUE}};'
608 ),
609 'condition' => array(
610 'divider' => 'yes'
611 )
612 )
613 );
614
615 $this->add_responsive_control(
616 'divider_weight',
617 array(
618 'label' => __( 'Weight', 'auxin-elements' ),
619 'type' => Controls_Manager::SLIDER,
620 'size_units' => array( 'px' ),
621 'range' => array(
622 'px' => array(
623 'max' => 10
624 )
625 ),
626 'selectors' => array(
627 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
628 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-width: {{SIZE}}{{UNIT}};'
629 ),
630 'condition' => array(
631 'divider' => 'yes'
632 )
633 )
634 );
635
636 $this->add_responsive_control(
637 'divider_width',
638 array(
639 'label' => __( 'Width', 'auxin-elements' ),
640 'type' => Controls_Manager::SLIDER,
641 'size_units' => array( 'px', '%' ),
642 'range' => array(
643 'px' => array(
644 'min' => 1,
645 'max' => 1200
646 ),
647 '%' => array(
648 'min' => 1,
649 'max' => 100
650 )
651 ),
652 'selectors' => array(
653 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:after' => 'width: {{SIZE}}{{UNIT}};'
654 ),
655 'condition' => array(
656 'divider' => 'yes',
657 'direction!' => 'horizontal'
658 )
659 )
660 );
661
662 $this->add_responsive_control(
663 'divider_color',
664 array(
665 'label' => __( 'Color', 'auxin-elements' ),
666 'type' => Controls_Manager::COLOR,
667 'selectors' => array(
668 '{{WRAPPER}} .aux-icon-list-divider .aux-icon-list-item:not(:last-child):after' => 'border-bottom-color: {{VALUE}};'
669 ),
670 'selectors' => array(
671 '{{WRAPPER}} .aux-direction-vertical .aux-icon-list-item:not(:last-child):after' => 'border-bottom-color: {{VALUE}};',
672 '{{WRAPPER}} .aux-direction-horizontal .aux-icon-list-item:after' => 'border-right-color: {{VALUE}};'
673 ),
674 'condition' => array(
675 'divider' => 'yes'
676 )
677 )
678 );
679
680 $this->end_controls_section();
681
682
683 /* Text Style Section
684 /*-------------------------------------*/
685
686 $this->start_controls_section(
687 'text_style_section',
688 array(
689 'label' => __( 'Text', 'auxin-elements' ),
690 'tab' => Controls_Manager::TAB_STYLE
691 )
692 );
693
694 $this->add_control(
695 'text_style_heading',
696 array(
697 'label' => __( 'Text', 'auxin-elements' ),
698 'type' => Controls_Manager::HEADING,
699 'separator' => 'before'
700 )
701 );
702
703 $this->add_responsive_control(
704 'text1_color',
705 array(
706 'label' => __( 'Color', 'auxin-elements' ),
707 'type' => Controls_Manager::COLOR,
708 'selectors' => array(
709 '{{WRAPPER}} .aux-icon-list-text' => 'color: {{VALUE}};'
710 )
711 )
712 );
713
714 $this->add_responsive_control(
715 'text1_hover_color',
716 array(
717 'label' => __( 'Hover Color', 'auxin-elements' ),
718 'type' => Controls_Manager::COLOR,
719 'selectors' => array(
720 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-text' => 'color: {{VALUE}};',
721 )
722 )
723 );
724
725 $this->add_group_control(
726 Group_Control_Typography::get_type(),
727 array(
728 'name' => 'text1_typography',
729 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
730 'selector' => '{{WRAPPER}} .aux-icon-list-text'
731 )
732 );
733
734 $this->add_responsive_control(
735 'text1_margin',
736 array(
737 'label' => __( 'Text Margin', 'auxin-elements' ),
738 'type' => Controls_Manager::DIMENSIONS,
739 'size_units' => array( 'px', 'em' ),
740 'allowed_dimensions' => 'all',
741 'selectors' => array(
742 '{{WRAPPER}} .aux-icon-list-text' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
743 )
744 )
745 );
746
747 /* Text2 Style Section
748 /*-------------------------------------*/
749
750 $this->add_control(
751 'text2_style_heading',
752 array(
753 'label' => __( 'Secondary Text', 'auxin-elements' ),
754 'type' => Controls_Manager::HEADING,
755 'separator' => 'before',
756 )
757 );
758
759 $this->add_responsive_control(
760 'text2_color',
761 array(
762 'label' => __( 'Color', 'auxin-elements' ),
763 'type' => Controls_Manager::COLOR,
764 'selectors' => array(
765 '{{WRAPPER}} .aux-icon-list-text2' => 'color: {{VALUE}};'
766 )
767 )
768 );
769
770 $this->add_responsive_control(
771 'text2_hover_color',
772 array(
773 'label' => __( 'Hover Color', 'auxin-elements' ),
774 'type' => Controls_Manager::COLOR,
775 'selectors' => array(
776 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-text2' => 'color: {{VALUE}};',
777 )
778 )
779 );
780
781 $this->add_group_control(
782 Group_Control_Typography::get_type(),
783 array(
784 'name' => 'text2_typography',
785 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
786 'selector' => '{{WRAPPER}} .aux-icon-list-text2'
787 )
788 );
789
790 $this->add_responsive_control(
791 'text2_margin',
792 array(
793 'label' => __( 'Text Margin', 'auxin-elements' ),
794 'type' => Controls_Manager::DIMENSIONS,
795 'size_units' => array( 'px', 'em' ),
796 'allowed_dimensions' => 'all',
797 'selectors' => array(
798 '{{WRAPPER}} .aux-icon-list-text2' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
799 )
800 )
801 );
802
803 $this->end_controls_section();
804
805 /* Icon Style Section
806 /*-------------------------------------*/
807
808 $this->start_controls_section(
809 'icon_style_section',
810 array(
811 'label' => __( 'Icon', 'auxin-elements' ),
812 'tab' => Controls_Manager::TAB_STYLE
813 )
814 );
815
816 $this->add_responsive_control(
817 'icon_color',
818 array(
819 'label' => __( 'Color', 'auxin-elements' ),
820 'type' => Controls_Manager::COLOR,
821 'default' => '#24af29',
822 'selectors' => array(
823 '{{WRAPPER}} .aux-icon-list-icon' => 'color: {{VALUE}};'
824 )
825 )
826 );
827
828 $this->add_responsive_control(
829 'icon_hover_color',
830 array(
831 'label' => __( 'Hover Color', 'auxin-elements' ),
832 'type' => Controls_Manager::COLOR,
833 'selectors' => array(
834 '{{WRAPPER}} .aux-icon-list-item:hover .aux-icon-list-icon' => 'color: {{VALUE}};',
835 )
836 )
837 );
838
839 $this->add_responsive_control(
840 'icon_size',
841 array(
842 'label' => __( 'Size', 'auxin-elements' ),
843 'type' => Controls_Manager::SLIDER,
844 'size_units' => array( 'px', 'em' ),
845 'range' => array(
846 'px' => array(
847 'max' => 100
848 ),
849 'em' => array(
850 'max' => 10
851 )
852 ),
853 'selectors' => array(
854 '{{WRAPPER}} .aux-icon-list-icon' => 'font-size: {{SIZE}}{{UNIT}};',
855 )
856 )
857 );
858
859 $this->add_responsive_control(
860 'icon_margin',
861 array(
862 'label' => __( 'Icon Margin', 'auxin-elements' ),
863 'type' => Controls_Manager::DIMENSIONS,
864 'size_units' => array( 'px', 'em' ),
865 'allowed_dimensions' => 'all',
866 'selectors' => array(
867 '{{WRAPPER}} .aux-icon-list-icon' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
868 )
869 )
870 );
871
872 $this->end_controls_section();
873
874 /* List Item Style Section
875 /*-------------------------------------*/
876
877 $this->start_controls_section(
878 'list_item_style_section',
879 array(
880 'label' => __( 'List Item', 'auxin-elements' ),
881 'tab' => Controls_Manager::TAB_STYLE
882 )
883 );
884
885 $this->add_responsive_control(
886 'list_padding',
887 array(
888 'label' => __( 'Padding', 'auxin-elements' ),
889 'type' => Controls_Manager::DIMENSIONS,
890 'size_units' => array( 'px', 'em', '%' ),
891 'separator' => 'before',
892 'selectors' => array(
893 '{{WRAPPER}} .aux-icon-list-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
894 )
895 )
896 );
897
898 $this->add_responsive_control(
899 'list_margin',
900 array(
901 'label' => __( 'Margin', 'auxin-elements' ),
902 'type' => Controls_Manager::DIMENSIONS,
903 'size_units' => array( 'px', 'em' ),
904 'allowed_dimensions' => 'all',
905 'selectors' => array(
906 '{{WRAPPER}} .aux-icon-list-item' => 'margin:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
907 ),
908 'separator' => 'after'
909 )
910 );
911
912 $this->start_controls_tabs( 'list_colors' );
913
914 $this->start_controls_tab(
915 'list_status_normal',
916 array(
917 'label' => __( 'Normal' , 'auxin-elements' )
918 )
919 );
920
921 $this->add_group_control(
922 Group_Control_Box_Shadow::get_type(),
923 array(
924 'name' => 'list_boxshadow_normal',
925 'label' => __( 'Box Shadow Normal', 'auxin-elements' ),
926 'selector' => '{{WRAPPER}} .aux-icon-list-item',
927 'separator' => 'none'
928 )
929 );
930
931 $this->add_group_control(
932 Group_Control_Border::get_type(),
933 array(
934 'name' => 'list_border_normal',
935 'selector' => '{{WRAPPER}} .aux-icon-list-item',
936 'separator' => 'none'
937 )
938 );
939
940 $this->add_group_control(
941 Group_Control_Background::get_type(),
942 array(
943 'name' => 'list_background_normal',
944 'selector' => '{{WRAPPER}} .aux-icon-list-item',
945 'separator' => 'none'
946 )
947 );
948
949 $this->end_controls_tab();
950
951 $this->start_controls_tab(
952 'list_status_hover',
953 array(
954 'label' => __( 'Hover' , 'auxin-elements' )
955 )
956 );
957
958 $this->add_group_control(
959 Group_Control_Box_Shadow::get_type(),
960 array(
961 'name' => 'list_boxshadow_hover',
962 'label' => __( 'Box Shadow Hover', 'auxin-elements' ),
963 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
964 'separator' => 'none'
965 )
966 );
967
968 $this->add_group_control(
969 Group_Control_Border::get_type(),
970 array(
971 'name' => 'list_border_hover',
972 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
973 'separator' => 'none'
974 )
975 );
976
977 $this->add_group_control(
978 Group_Control_Background::get_type(),
979 array(
980 'name' => 'list_background_hover',
981 'selector' => '{{WRAPPER}} .aux-icon-list-item:hover',
982 'separator' => 'none'
983 )
984 );
985
986 $this->end_controls_tab();
987
988 $this->end_controls_tabs();
989
990 $this->end_controls_section();
991 }
992
993 /**
994 * Render 'Custom List' widget output on the frontend.
995 *
996 * Written in PHP and used to generate the final HTML.
997 *
998 * @since 1.0.0
999 * @access protected
1000 */
1001 protected function render() {
1002
1003 $settings = $this->get_settings_for_display();
1004
1005 $args = array(
1006 'list' => $settings['list'], // repeater items
1007 'direction' => $settings['direction'],
1008 'connector' => $settings['connector'], // A line that connects primary and secondary text
1009 'divider' => $settings['divider'], // A line between list items
1010 'item_class_prefix' => '' // Default class prefix for each repeater item
1011 );
1012
1013 // pass the args through the corresponding shortcode callback
1014 echo auxin_widget_list_callback( $args );
1015 }
1016
1017 }
1018