PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.15.2
Shortcodes and extra features for Phlox theme v2.15.2
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 / staff.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 2 years ago accordion.php 4 years ago audio.php 4 years ago before-after.php 3 years ago button.php 4 years ago carousel-navigation.php 4 years ago circle-chart.php 3 years ago contact-box.php 4 years ago contact-form.php 4 years ago custom-list.php 4 years ago divider.php 4 years ago gallery.php 2 years ago gmap.php 4 years ago heading-modern.php 3 years ago icon.php 3 years ago image.php 4 years ago mailchimp.php 4 years ago modern-button.php 4 years ago products-grid.php 3 years ago quote.php 4 years ago recent-comments.php 3 years ago recent-posts-grid-carousel.php 4 years ago recent-posts-land-style.php 4 years ago recent-posts-masonry.php 4 years ago recent-posts-tiles-carousel.php 4 years ago recent-posts-tiles.php 4 years ago recent-posts-timeline.php 4 years ago recent-products.php 4 years ago responsive-table.php 3 years ago search.php 4 years ago staff.php 4 years ago svg.php 3 years ago tabs.php 3 years ago testimonial.php 4 years ago text.php 4 years ago touch-slider.php 4 years ago video.php 4 years ago
staff.php
983 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_Image_Size;
8 use Elementor\Group_Control_Typography;
9 use Elementor\Core\Schemes\Typography;
10 use Elementor\Utils;
11 use Elementor\Group_Control_Border;
12
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly.
16 }
17
18 /**
19 * Elementor 'Staff' widget.
20 *
21 * Elementor widget that displays an 'Staff' with lightbox.
22 *
23 * @since 1.0.0
24 */
25 class Staff extends Widget_Base {
26
27 /**
28 * Get widget name.
29 *
30 * Retrieve 'Staff' widget name.
31 *
32 * @since 1.0.0
33 * @access public
34 *
35 * @return string Widget name.
36 */
37 public function get_name() {
38 return 'aux_staff';
39 }
40
41 /**
42 * Get widget title.
43 *
44 * Retrieve 'Staff' widget title.
45 *
46 * @since 1.0.0
47 * @access public
48 *
49 * @return string Widget title.
50 */
51 public function get_title() {
52 return __('Staff', 'auxin-elements' );
53 }
54
55 /**
56 * Get widget icon.
57 *
58 * Retrieve 'Staff' widget icon.
59 *
60 * @since 1.0.0
61 * @access public
62 *
63 * @return string Widget icon.
64 */
65 public function get_icon() {
66 return 'eicon-person auxin-badge';
67 }
68
69 /**
70 * Get widget categories.
71 *
72 * Retrieve 'Staff' widget icon.
73 *
74 * @since 1.0.0
75 * @access public
76 *
77 * @return string Widget icon.
78 */
79 public function get_categories() {
80 return array( 'auxin-core' );
81 }
82
83 /**
84 * Register 'Staff' widget controls.
85 *
86 * Adds different input fields to allow the user to change and customize the widget settings.
87 *
88 * @since 1.0.0
89 * @access protected
90 */
91 protected function register_controls() {
92
93 /*-----------------------------------------------------------------------------------*/
94 /* content_section
95 /*-----------------------------------------------------------------------------------*/
96
97 $this->start_controls_section(
98 'content_section',
99 array(
100 'label' => __('Content', 'auxin-elements' ),
101 )
102 );
103
104 $this->add_control(
105 'title',
106 array(
107 'label' => __('Staff Name','auxin-elements' ),
108 'description' => __('Text title, leave it empty if you don`t need title.', 'auxin-elements'),
109 'type' => Controls_Manager::TEXT,
110 'default' => 'John Doe'
111 )
112 );
113
114 $this->add_control(
115 'subtitle',
116 array(
117 'label' => __('Staff Occupation','auxin-elements' ),
118 'type' => Controls_Manager::TEXT,
119 'default' => 'Manager'
120 )
121 );
122
123 $this->add_control(
124 'staff_link',
125 array(
126 'label' => __('Staff Page Link','auxin-elements' ),
127 'type' => Controls_Manager::URL,
128 'placeholder' => 'https://your-link.com',
129 'show_external' => false,
130 'dynamic' => [
131 'active' => true
132 ]
133 )
134 );
135
136
137 $this->add_control(
138 'content',
139 array(
140 'label' => __('Content','auxin-elements'),
141 'description' => __('Enter a text as a text content.','auxin-elements'),
142 'type' => Controls_Manager::TEXTAREA
143 )
144 );
145
146 $this->add_control(
147 'max_words',
148 array(
149 'label' => __('Maximum Words','auxin-elements' ),
150 'description' => __('Limit the number of words in the Content','auxin-elements' ),
151 'type' => Controls_Manager::NUMBER,
152 'default' => '',
153 'step' => 1,
154 'condition' => array(
155 'content!' => '',
156 )
157 )
158 );
159
160 $this->end_controls_section();
161
162 /*-----------------------------------------------------------------------------------*/
163 /* image_section
164 /*-----------------------------------------------------------------------------------*/
165
166 $this->start_controls_section(
167 'image_section',
168 array(
169 'label' => __('Image', 'auxin-elements' ),
170 )
171 );
172
173 $this->add_control(
174 'staff_img',
175 array(
176 'label' => __('Image','auxin-elements' ),
177 'type' => Controls_Manager::MEDIA,
178 'default' => array(
179 'url' => Utils::get_placeholder_image_src()
180 ),
181 )
182 );
183
184 $this->add_group_control(
185 Group_Control_Image_Size::get_type(),
186 array(
187 'name' => 'staff_img', // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `thumbnail_size` and `thumbnail_custom_dimension`.
188 'separator' => 'none',
189 'default' => 'full'
190 )
191 );
192
193 $this->add_control(
194 'img_shape',
195 array(
196 'label' => __('Image shape','auxin-elements'),
197 'type' => 'aux-visual-select',
198 'options' => array(
199 'circle' => array(
200 'label' => __('Circle', 'auxin-elements'),
201 'image' => AUXIN_URL . 'images/visual-select/icon-style-circle.svg'
202 ),
203 'semi-circle' => array(
204 'label' => __('Semi-circle', 'auxin-elements'),
205 'image' => AUXIN_URL . 'images/visual-select/icon-style-semi-circle.svg'
206 ),
207 'round-rect' => array(
208 'label' => __('Round Rectangle', 'auxin-elements'),
209 'image' => AUXIN_URL . 'images/visual-select/icon-style-round-rectangle.svg'
210 ),
211 'rect' => array(
212 'label' => __('Rectangle', 'auxin-elements'),
213 'image' => AUXIN_URL . 'images/visual-select/icon-style-rectangle.svg'
214 )
215 ),
216 'default' => 'circle'
217 )
218 );
219
220 $this->add_control(
221 'preloadable',
222 array(
223 'label' => __('Preload image','auxin-elements' ),
224 'type' => Controls_Manager::SWITCHER,
225 'label_on' => __( 'On', 'auxin-elements' ),
226 'label_off' => __( 'Off', 'auxin-elements' ),
227 'return_value' => 'yes',
228 'default' => 'no'
229 )
230 );
231
232 $this->add_control(
233 'preload_preview',
234 array(
235 'label' => __('While loading image display','auxin-elements' ),
236 'label_block' => true,
237 'type' => Controls_Manager::SELECT,
238 'options' => auxin_get_preloadable_previews(),
239 'return_value' => 'yes',
240 'default' => 'yes',
241 'condition' => array(
242 'preloadable' => 'yes'
243 )
244 )
245 );
246
247 $this->add_control(
248 'preload_bgcolor',
249 array(
250 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ),
251 'type' => Controls_Manager::COLOR,
252 'condition' => array(
253 'preloadable' => 'yes',
254 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark')
255 )
256 )
257 );
258
259 $this->end_controls_section();
260
261 /*-----------------------------------------------------------------------------------*/
262 /* social_section
263 /*-----------------------------------------------------------------------------------*/
264
265 $this->start_controls_section(
266 'social_section',
267 array(
268 'label' => __('Social', 'auxin-elements' ),
269 )
270 );
271
272 $this->add_control(
273 'socials',
274 array(
275 'label' => __('Enable Socials','auxin-elements' ),
276 'type' => Controls_Manager::SWITCHER,
277 'label_on' => __( 'On', 'auxin-elements' ),
278 'label_off' => __( 'Off', 'auxin-elements' ),
279 'default' => 'no'
280 )
281 );
282
283 $this->add_control(
284 'social_twitter',
285 array(
286 'label' => __('Twitter Address','auxin-elements' ),
287 'type' => Controls_Manager::URL,
288 'placeholder' => 'https://your-link.com',
289 'show_external' => false,
290 'condition' => [
291 'socials' => 'yes'
292 ],
293 'dynamic' => [
294 'active' => true
295 ]
296 )
297 );
298
299 $this->add_control(
300 'social_facebook',
301 array(
302 'label' => __('Facebook Address','auxin-elements' ),
303 'type' => Controls_Manager::URL,
304 'placeholder' => 'https://your-link.com',
305 'show_external' => false,
306 'condition' => [
307 'socials' => 'yes'
308 ],
309 'dynamic' => [
310 'active' => true
311 ]
312 )
313 );
314
315 $this->add_control(
316 'social_gp',
317 array(
318 'label' => __('Google Plus Address','auxin-elements' ),
319 'type' => Controls_Manager::URL,
320 'placeholder' => 'https://your-link.com',
321 'show_external' => false,
322 'condition' => [
323 'socials' => 'yes'
324 ],
325 'dynamic' => [
326 'active' => true
327 ]
328 )
329 );
330
331 $this->add_control(
332 'social_flickr',
333 array(
334 'label' => __('Flickr Address','auxin-elements' ),
335 'type' => Controls_Manager::URL,
336 'placeholder' => 'https://your-link.com',
337 'show_external' => false,
338 'condition' => [
339 'socials' => 'yes'
340 ],
341 'dynamic' => [
342 'active' => true
343 ]
344 )
345 );
346
347 $this->add_control(
348 'social_delicious',
349 array(
350 'label' => __('Delicious Address','auxin-elements' ),
351 'type' => Controls_Manager::URL,
352 'placeholder' => 'https://your-link.com',
353 'show_external' => false,
354 'condition' => [
355 'socials' => 'yes'
356 ],
357 'dynamic' => [
358 'active' => true
359 ]
360 )
361 );
362
363 $this->add_control(
364 'social_pinterest',
365 array(
366 'label' => __('Pinterest Address','auxin-elements' ),
367 'type' => Controls_Manager::URL,
368 'placeholder' => 'https://your-link.com',
369 'show_external' => false,
370 'condition' => [
371 'socials' => 'yes'
372 ],
373 'dynamic' => [
374 'active' => true
375 ]
376 )
377 );
378
379 $this->add_control(
380 'social_github',
381 array(
382 'label' => __('GitHub Address','auxin-elements' ),
383 'type' => Controls_Manager::URL,
384 'placeholder' => 'https://your-link.com',
385 'show_external' => false,
386 'condition' => [
387 'socials' => 'yes'
388 ],
389 'dynamic' => [
390 'active' => true
391 ]
392 )
393 );
394
395 $this->add_control(
396 'social_instagram',
397 array(
398 'label' => __('Instagram Address','auxin-elements' ),
399 'type' => Controls_Manager::URL,
400 'placeholder' => 'https://your-link.com',
401 'show_external' => false,
402 'condition' => [
403 'socials' => 'yes'
404 ],
405 'dynamic' => [
406 'active' => true
407 ]
408 )
409 );
410
411 $this->add_control(
412 'social_dribbble',
413 array(
414 'label' => __('Dribbble Address','auxin-elements' ),
415 'type' => Controls_Manager::URL,
416 'placeholder' => 'https://your-link.com',
417 'show_external' => false,
418 'condition' => [
419 'socials' => 'yes'
420 ],
421 'dynamic' => [
422 'active' => true
423 ]
424 )
425 );
426
427 $this->add_control(
428 'social_linkedin',
429 array(
430 'label' => __('LinkedIn Address','auxin-elements' ),
431 'type' => Controls_Manager::URL,
432 'placeholder' => 'https://your-link.com',
433 'show_external' => false,
434 'condition' => [
435 'socials' => 'yes'
436 ],
437 'dynamic' => [
438 'active' => true
439 ]
440 )
441 );
442
443 $this->end_controls_section();
444
445 /*-----------------------------------------------------------------------------------*/
446 /* title_style_section
447 /*-----------------------------------------------------------------------------------*/
448
449 $this->start_controls_section(
450 'title_style_section',
451 array(
452 'label' => __( 'Title', 'auxin-elements' ),
453 'tab' => Controls_Manager::TAB_STYLE,
454 'condition' => array(
455 'title!' => '',
456 ),
457 )
458 );
459
460 $this->start_controls_tabs( 'title_colors' );
461
462 $this->start_controls_tab(
463 'title_color_normal',
464 array(
465 'label' => __( 'Normal' , 'auxin-elements' ),
466 'condition' => array(
467 'title!' => '',
468 ),
469 )
470 );
471
472 $this->add_control(
473 'title_color',
474 array(
475 'label' => __( 'Color', 'auxin-elements' ),
476 'type' => Controls_Manager::COLOR,
477 'selectors' => array(
478 '{{WRAPPER}} .col-title a, {{WRAPPER}} .col-title' => 'color: {{VALUE}} !important;',
479 ),
480 'condition' => array(
481 'title!' => '',
482 ),
483 )
484 );
485
486 $this->end_controls_tab();
487
488 $this->start_controls_tab(
489 'title_color_hover',
490 array(
491 'label' => __( 'Hover' , 'auxin-elements' ),
492 'condition' => array(
493 'title!' => '',
494 ),
495 )
496 );
497
498 $this->add_control(
499 'title_hover_color',
500 array(
501 'label' => __( 'Color', 'auxin-elements' ),
502 'type' => Controls_Manager::COLOR,
503 'selectors' => array(
504 '{{WRAPPER}} .col-title a:hover' => 'color: {{VALUE}} !important;',
505 ),
506 'condition' => array(
507 'title!' => '',
508 ),
509 )
510 );
511
512 $this->end_controls_tab();
513
514 $this->end_controls_tabs();
515
516 $this->add_group_control(
517 Group_Control_Typography::get_type(),
518 array(
519 'name' => 'title_typography',
520 'scheme' => Typography::TYPOGRAPHY_1,
521 'selector' => '{{WRAPPER}} .col-title, {{WRAPPER}} .col-title a',
522 'condition' => array(
523 'title!' => '',
524 ),
525 )
526 );
527
528 $this->add_responsive_control(
529 'title_margin_top',
530 array(
531 'label' => __( 'Top space', 'auxin-elements' ),
532 'type' => Controls_Manager::SLIDER,
533 'range' => array(
534 'px' => array(
535 'max' => 100,
536 ),
537 ),
538 'selectors' => array(
539 '{{WRAPPER}} .aux-staff-content .col-title' => 'margin-top: {{SIZE}}{{UNIT}};',
540 ),
541 'condition' => array(
542 'title!' => ''
543 )
544 )
545 );
546
547 $this->add_responsive_control(
548 'title_margin_bottom',
549 array(
550 'label' => __( 'Bottom space', 'auxin-elements' ),
551 'type' => Controls_Manager::SLIDER,
552 'range' => array(
553 'px' => array(
554 'max' => 100,
555 ),
556 ),
557 'selectors' => array(
558 '{{WRAPPER}} .aux-staff-content .col-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
559 ),
560 'condition' => array(
561 'title!' => ''
562 )
563 )
564 );
565
566 $this->end_controls_section();
567
568 /*-----------------------------------------------------------------------------------*/
569 /* subtitle_style_section
570 /*-----------------------------------------------------------------------------------*/
571
572 $this->start_controls_section(
573 'subtitle_style_section',
574 array(
575 'label' => __( 'Subtitle', 'auxin-elements' ),
576 'tab' => Controls_Manager::TAB_STYLE,
577 'condition' => array(
578 'subtitle!' => '',
579 ),
580 )
581 );
582
583 $this->add_control(
584 'subtitle_color',
585 array(
586 'label' => __( 'Color', 'auxin-elements' ),
587 'type' => Controls_Manager::COLOR,
588 'selectors' => array(
589 '{{WRAPPER}} .col-subtitle' => 'color: {{VALUE}} !important;',
590 ),
591 'condition' => array(
592 'subtitle!' => '',
593 ),
594 )
595 );
596
597 $this->add_group_control(
598 Group_Control_Typography::get_type(),
599 array(
600 'name' => 'subtitle_typography',
601 'scheme' => Typography::TYPOGRAPHY_1,
602 'selector' => '{{WRAPPER}} .aux-staff-content .col-subtitle',
603 'condition' => array(
604 'subtitle!' => '',
605 ),
606 )
607 );
608
609 $this->add_responsive_control(
610 'subtitle_margin_bottom',
611 array(
612 'label' => __( 'Bottom space', 'auxin-elements' ),
613 'type' => Controls_Manager::SLIDER,
614 'range' => array(
615 'px' => array(
616 'max' => 100,
617 ),
618 ),
619 'selectors' => array(
620 '{{WRAPPER}} .col-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}};',
621 ),
622 'condition' => array(
623 'subtitle!' => '',
624 ),
625 )
626 );
627
628 $this->end_controls_section();
629
630 /*-----------------------------------------------------------------------------------*/
631 /* content_style_section
632 /*-----------------------------------------------------------------------------------*/
633
634 $this->start_controls_section(
635 'content_style_section',
636 array(
637 'label' => __( 'Content', 'auxin-elements' ),
638 'tab' => Controls_Manager::TAB_STYLE,
639 'condition' => array(
640 'content!' => '',
641 ),
642 )
643 );
644
645 $this->add_control(
646 'content_color',
647 array(
648 'label' => __( 'Color', 'auxin-elements' ),
649 'type' => Controls_Manager::COLOR,
650 'selectors' => array(
651 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}} !important;',
652 ),
653 'condition' => array(
654 'content!' => '',
655 ),
656 )
657 );
658
659 $this->add_group_control(
660 Group_Control_Typography::get_type(),
661 array(
662 'name' => 'content_typography',
663 'scheme' => Typography::TYPOGRAPHY_1,
664 'selector' => '{{WRAPPER}} .entry-content',
665 'condition' => array(
666 'content!' => '',
667 ),
668 )
669 );
670
671 $this->add_responsive_control(
672 'content_margin_bottom',
673 array(
674 'label' => __( 'Bottom space', 'auxin-elements' ),
675 'type' => Controls_Manager::SLIDER,
676 'range' => array(
677 'px' => array(
678 'max' => 100,
679 ),
680 ),
681 'selectors' => array(
682 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
683 ),
684 'condition' => array(
685 'content!' => '',
686 ),
687 )
688 );
689
690 $this->end_controls_section();
691
692 /*-----------------------------------------------------------------------------------*/
693 /* content_style_section
694 /*-----------------------------------------------------------------------------------*/
695
696 $this->start_controls_section(
697 'socials_style_section',
698 array(
699 'label' => __( 'Socials', 'auxin-elements' ),
700 'tab' => Controls_Manager::TAB_STYLE,
701 'condition' => array(
702 'socials' => 'yes'
703 ),
704 )
705 );
706
707 $this->start_controls_tabs( 'socials_colors' );
708
709 $this->start_controls_tab(
710 'socials_color_normal',
711 array(
712 'label' => __( 'Normal' , 'auxin-elements' ),
713 'condition' => array(
714 'socials' => 'yes'
715 ),
716 )
717 );
718
719 $this->add_control(
720 'socials_color',
721 array(
722 'label' => __( 'Color', 'auxin-elements' ),
723 'type' => Controls_Manager::COLOR,
724 'selectors' => array(
725 '{{WRAPPER}} .aux-social-list a' => 'color: {{VALUE}};',
726 ),
727 'condition' => array(
728 'socials' => 'yes'
729 ),
730 )
731 );
732
733 $this->end_controls_tab();
734
735 $this->start_controls_tab(
736 'socials_color_hover',
737 array(
738 'label' => __( 'Hover' , 'auxin-elements' ),
739 'condition' => array(
740 'socials' => 'yes'
741 ),
742 )
743 );
744
745 $this->add_control(
746 'socials_hover_color',
747 array(
748 'label' => __( 'Color', 'auxin-elements' ),
749 'type' => Controls_Manager::COLOR,
750 'selectors' => array(
751 '{{WRAPPER}} .aux-social-list a:hover' => 'color: {{VALUE}};',
752 ),
753 'condition' => array(
754 'socials' => 'yes'
755 ),
756 )
757 );
758
759 $this->end_controls_tab();
760
761 $this->end_controls_tabs();
762
763 $this->add_control(
764 'icon_align',
765 array(
766 'label' => __('Icon Direction', 'auxin-elements'),
767 'type' => Controls_Manager::SELECT,
768 'default' => 'aux-horizontal',
769 'options' => array(
770 'aux-vertical' => __( 'Vertical' , 'auxin-elements' ),
771 'aux-horizontal' => __( 'Horizontal' , 'auxin-elements' ),
772 ),
773 'condition' => array(
774 'socials' => 'yes'
775 )
776 )
777 );
778
779
780 $this->add_control(
781 'icon_size',
782 array(
783 'label' => __('Socials Icon size', 'auxin-elements'),
784 'type' => Controls_Manager::SELECT,
785 'default' => 'aux-medium',
786 'options' => array(
787 'aux-small' => __( 'Small' , 'auxin-elements' ),
788 'aux-medium' => __( 'Medium' , 'auxin-elements' ),
789 'aux-large' => __( 'Large' , 'auxin-elements' ),
790 'aux-extra-large' => __( 'X-Large' , 'auxin-elements' )
791 ),
792 'condition' => array(
793 'socials' => 'yes'
794 )
795 )
796 );
797
798 $this->add_group_control(
799 Group_Control_Border::get_type(),
800 array(
801 'name' => 'socials_separator',
802 'label' => __( 'Separator', 'auxin-elements' ),
803 'selector' => '{{WRAPPER}} .aux-widget-staff .aux-staff-footer',
804 )
805 );
806
807 $this->add_responsive_control(
808 'socials_padding',
809 array(
810 'label' => __( 'Padding', 'auxin-elements' ),
811 'type' => Controls_Manager::DIMENSIONS,
812 'size_units' => array( 'px', '%' ),
813 'selectors' => array(
814 '{{WRAPPER}} .aux-widget-staff .aux-staff-footer' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
815 ),
816 'condition' => array(
817 'socials' => 'yes'
818 )
819 )
820 );
821
822 $this->end_controls_section();
823
824 /*-----------------------------------------------------------------------------------*/
825 /* Wrapper section
826 /*-----------------------------------------------------------------------------------*/
827
828 $this->start_controls_section(
829 'wrapper_style_section',
830 array(
831 'label' => __( 'Wrappers', 'auxin-elements' ),
832 'tab' => Controls_Manager::TAB_STYLE,
833 'condition' => array(
834 'title!' => '',
835 ),
836 )
837 );
838
839 $this->add_control(
840 'layout_style',
841 array(
842 'label' => __('Layout','auxin-elements'),
843 'type' => 'aux-visual-select',
844 'style_items' => 'max-width:31%;',
845 'options' => array(
846 'top' => array(
847 'label' => __('Top', 'auxin-elements'),
848 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg'
849 ),
850 'right' => array(
851 'label' => __('Right', 'auxin-elements'),
852 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg'
853 ),
854 'bottom' => array(
855 'label' => __('Bottom', 'auxin-elements'),
856 'image' => AUXIN_URL . 'images/visual-select/column-icon-bottom.svg'
857 ),
858 'left' => array(
859 'label' => __('Left', 'auxin-elements'),
860 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg'
861 )
862 ),
863 'default' => 'top'
864 )
865 );
866
867 $this->add_control(
868 'text_align',
869 array(
870 'label' => __('Text Align','auxin-elements'),
871 'type' => Controls_Manager::CHOOSE,
872 'options' => array(
873 'left' => array(
874 'title' => __( 'Left', 'auxin-elements' ),
875 'icon' => 'eicon-text-align-left',
876 ),
877 'center' => array(
878 'title' => __( 'Center', 'auxin-elements' ),
879 'icon' => 'eicon-text-align-center',
880 ),
881 'right' => array(
882 'title' => __( 'Right', 'auxin-elements' ),
883 'icon' => 'eicon-text-align-right',
884 ),
885 ),
886 'default' => 'left',
887 'toggle' => true,
888 )
889 );
890
891 $this->add_responsive_control(
892 'wrapper_main_padding',
893 array(
894 'label' => __( 'Padding for main wrapper', 'auxin-elements' ),
895 'type' => Controls_Manager::DIMENSIONS,
896 'size_units' => array( 'px', '%' ),
897 'selectors' => array(
898 '{{WRAPPER}} .aux-widget-staff > div' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
899 )
900 )
901 );
902
903 $this->add_responsive_control(
904 'wrapper_content_padding',
905 array(
906 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
907 'type' => Controls_Manager::DIMENSIONS,
908 'size_units' => array( 'px', '%' ),
909 'selectors' => array(
910 '{{WRAPPER}} .aux-widget-staff .aux-staff-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
911 )
912 )
913 );
914
915 $this->end_controls_section();
916 }
917
918 /**
919 * Render image box widget output on the frontend.
920 *
921 * Written in PHP and used to generate the final HTML.
922 *
923 * @since 1.0.0
924 * @access protected
925 */
926 protected function render() {
927
928 $settings = $this->get_settings_for_display();
929
930 $width = !empty( $settings['staff_img_custom_dimension']['width'] ) ? $settings['staff_img_custom_dimension']['width'] : '';
931 $height = !empty( $settings['staff_img_custom_dimension']['height'] ) ? $settings['staff_img_custom_dimension']['height'] : '';
932
933 $args = array(
934 'title' => $settings['title'],
935 'subtitle' => $settings['subtitle'],
936 'staff_link' => $settings['staff_link']['url'],
937 'content' => $settings['content'],
938 'max_words' => $settings['max_words'],
939 'width' => $width,
940 'height' => $height,
941
942 'staff_img' => $settings['staff_img']['id'],
943 'staff_img_size' => $settings['staff_img_size'],
944 'img_shape' => $settings['img_shape'],
945 'preloadable' => $settings['preloadable'],
946 'preload_preview' => $settings['preload_preview'],
947 'preload_bgcolor' => $settings['preload_bgcolor'],
948
949 'socials' => $settings['socials'],
950
951 'icon_size' => $settings['icon_size'],
952 'icon_align' => $settings['icon_align'],
953
954 'wrapper_style' => 'simple', //$settings['wrapper_style'],
955 'layout_style' => $settings['layout_style'],
956 //'wrapper_bg_color' => $settings['wrapper_bg_color'],
957 'text_align' => $settings['text_align'],
958 );
959
960 if ( auxin_is_true( $settings['socials'] ) ) {
961 $socials = [
962 'social_twitter' ,
963 'social_facebook' ,
964 'social_gp' ,
965 'social_flickr' ,
966 'social_delicious',
967 'social_pinterest',
968 'social_github' ,
969 'social_instagram',
970 'social_dribbble' ,
971 'social_linkedin' ,
972 ];
973
974 foreach( $socials as $key => $social ) {
975 $args[ $social ] = $settings[ $social ]['url'];
976 }
977 }
978
979 echo auxin_widget_staff_callback( $args );
980 }
981
982 }
983