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 / staff.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
staff.php
989 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\Kits\Documents\Tabs\Global_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 'global' => [
521 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
522 ],
523 'selector' => '{{WRAPPER}} .col-title, {{WRAPPER}} .col-title a',
524 'condition' => array(
525 'title!' => '',
526 ),
527 )
528 );
529
530 $this->add_responsive_control(
531 'title_margin_top',
532 array(
533 'label' => __( 'Top space', 'auxin-elements' ),
534 'type' => Controls_Manager::SLIDER,
535 'range' => array(
536 'px' => array(
537 'max' => 100,
538 ),
539 ),
540 'selectors' => array(
541 '{{WRAPPER}} .aux-staff-content .col-title' => 'margin-top: {{SIZE}}{{UNIT}};',
542 ),
543 'condition' => array(
544 'title!' => ''
545 )
546 )
547 );
548
549 $this->add_responsive_control(
550 'title_margin_bottom',
551 array(
552 'label' => __( 'Bottom space', 'auxin-elements' ),
553 'type' => Controls_Manager::SLIDER,
554 'range' => array(
555 'px' => array(
556 'max' => 100,
557 ),
558 ),
559 'selectors' => array(
560 '{{WRAPPER}} .aux-staff-content .col-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
561 ),
562 'condition' => array(
563 'title!' => ''
564 )
565 )
566 );
567
568 $this->end_controls_section();
569
570 /*-----------------------------------------------------------------------------------*/
571 /* subtitle_style_section
572 /*-----------------------------------------------------------------------------------*/
573
574 $this->start_controls_section(
575 'subtitle_style_section',
576 array(
577 'label' => __( 'Subtitle', 'auxin-elements' ),
578 'tab' => Controls_Manager::TAB_STYLE,
579 'condition' => array(
580 'subtitle!' => '',
581 ),
582 )
583 );
584
585 $this->add_control(
586 'subtitle_color',
587 array(
588 'label' => __( 'Color', 'auxin-elements' ),
589 'type' => Controls_Manager::COLOR,
590 'selectors' => array(
591 '{{WRAPPER}} .col-subtitle' => 'color: {{VALUE}} !important;',
592 ),
593 'condition' => array(
594 'subtitle!' => '',
595 ),
596 )
597 );
598
599 $this->add_group_control(
600 Group_Control_Typography::get_type(),
601 array(
602 'name' => 'subtitle_typography',
603 'global' => [
604 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
605 ],
606 'selector' => '{{WRAPPER}} .aux-staff-content .col-subtitle',
607 'condition' => array(
608 'subtitle!' => '',
609 ),
610 )
611 );
612
613 $this->add_responsive_control(
614 'subtitle_margin_bottom',
615 array(
616 'label' => __( 'Bottom space', 'auxin-elements' ),
617 'type' => Controls_Manager::SLIDER,
618 'range' => array(
619 'px' => array(
620 'max' => 100,
621 ),
622 ),
623 'selectors' => array(
624 '{{WRAPPER}} .col-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}};',
625 ),
626 'condition' => array(
627 'subtitle!' => '',
628 ),
629 )
630 );
631
632 $this->end_controls_section();
633
634 /*-----------------------------------------------------------------------------------*/
635 /* content_style_section
636 /*-----------------------------------------------------------------------------------*/
637
638 $this->start_controls_section(
639 'content_style_section',
640 array(
641 'label' => __( 'Content', 'auxin-elements' ),
642 'tab' => Controls_Manager::TAB_STYLE,
643 'condition' => array(
644 'content!' => '',
645 ),
646 )
647 );
648
649 $this->add_control(
650 'content_color',
651 array(
652 'label' => __( 'Color', 'auxin-elements' ),
653 'type' => Controls_Manager::COLOR,
654 'selectors' => array(
655 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}} !important;',
656 ),
657 'condition' => array(
658 'content!' => '',
659 ),
660 )
661 );
662
663 $this->add_group_control(
664 Group_Control_Typography::get_type(),
665 array(
666 'name' => 'content_typography',
667 'global' => [
668 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
669 ],
670 'selector' => '{{WRAPPER}} .entry-content',
671 'condition' => array(
672 'content!' => '',
673 ),
674 )
675 );
676
677 $this->add_responsive_control(
678 'content_margin_bottom',
679 array(
680 'label' => __( 'Bottom space', 'auxin-elements' ),
681 'type' => Controls_Manager::SLIDER,
682 'range' => array(
683 'px' => array(
684 'max' => 100,
685 ),
686 ),
687 'selectors' => array(
688 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
689 ),
690 'condition' => array(
691 'content!' => '',
692 ),
693 )
694 );
695
696 $this->end_controls_section();
697
698 /*-----------------------------------------------------------------------------------*/
699 /* content_style_section
700 /*-----------------------------------------------------------------------------------*/
701
702 $this->start_controls_section(
703 'socials_style_section',
704 array(
705 'label' => __( 'Socials', 'auxin-elements' ),
706 'tab' => Controls_Manager::TAB_STYLE,
707 'condition' => array(
708 'socials' => 'yes'
709 ),
710 )
711 );
712
713 $this->start_controls_tabs( 'socials_colors' );
714
715 $this->start_controls_tab(
716 'socials_color_normal',
717 array(
718 'label' => __( 'Normal' , 'auxin-elements' ),
719 'condition' => array(
720 'socials' => 'yes'
721 ),
722 )
723 );
724
725 $this->add_control(
726 'socials_color',
727 array(
728 'label' => __( 'Color', 'auxin-elements' ),
729 'type' => Controls_Manager::COLOR,
730 'selectors' => array(
731 '{{WRAPPER}} .aux-social-list a' => 'color: {{VALUE}};',
732 ),
733 'condition' => array(
734 'socials' => 'yes'
735 ),
736 )
737 );
738
739 $this->end_controls_tab();
740
741 $this->start_controls_tab(
742 'socials_color_hover',
743 array(
744 'label' => __( 'Hover' , 'auxin-elements' ),
745 'condition' => array(
746 'socials' => 'yes'
747 ),
748 )
749 );
750
751 $this->add_control(
752 'socials_hover_color',
753 array(
754 'label' => __( 'Color', 'auxin-elements' ),
755 'type' => Controls_Manager::COLOR,
756 'selectors' => array(
757 '{{WRAPPER}} .aux-social-list a:hover' => 'color: {{VALUE}};',
758 ),
759 'condition' => array(
760 'socials' => 'yes'
761 ),
762 )
763 );
764
765 $this->end_controls_tab();
766
767 $this->end_controls_tabs();
768
769 $this->add_control(
770 'icon_align',
771 array(
772 'label' => __('Icon Direction', 'auxin-elements'),
773 'type' => Controls_Manager::SELECT,
774 'default' => 'aux-horizontal',
775 'options' => array(
776 'aux-vertical' => __( 'Vertical' , 'auxin-elements' ),
777 'aux-horizontal' => __( 'Horizontal' , 'auxin-elements' ),
778 ),
779 'condition' => array(
780 'socials' => 'yes'
781 )
782 )
783 );
784
785
786 $this->add_control(
787 'icon_size',
788 array(
789 'label' => __('Socials Icon size', 'auxin-elements'),
790 'type' => Controls_Manager::SELECT,
791 'default' => 'aux-medium',
792 'options' => array(
793 'aux-small' => __( 'Small' , 'auxin-elements' ),
794 'aux-medium' => __( 'Medium' , 'auxin-elements' ),
795 'aux-large' => __( 'Large' , 'auxin-elements' ),
796 'aux-extra-large' => __( 'X-Large' , 'auxin-elements' )
797 ),
798 'condition' => array(
799 'socials' => 'yes'
800 )
801 )
802 );
803
804 $this->add_group_control(
805 Group_Control_Border::get_type(),
806 array(
807 'name' => 'socials_separator',
808 'label' => __( 'Separator', 'auxin-elements' ),
809 'selector' => '{{WRAPPER}} .aux-widget-staff .aux-staff-footer',
810 )
811 );
812
813 $this->add_responsive_control(
814 'socials_padding',
815 array(
816 'label' => __( 'Padding', 'auxin-elements' ),
817 'type' => Controls_Manager::DIMENSIONS,
818 'size_units' => array( 'px', '%' ),
819 'selectors' => array(
820 '{{WRAPPER}} .aux-widget-staff .aux-staff-footer' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
821 ),
822 'condition' => array(
823 'socials' => 'yes'
824 )
825 )
826 );
827
828 $this->end_controls_section();
829
830 /*-----------------------------------------------------------------------------------*/
831 /* Wrapper section
832 /*-----------------------------------------------------------------------------------*/
833
834 $this->start_controls_section(
835 'wrapper_style_section',
836 array(
837 'label' => __( 'Wrappers', 'auxin-elements' ),
838 'tab' => Controls_Manager::TAB_STYLE,
839 'condition' => array(
840 'title!' => '',
841 ),
842 )
843 );
844
845 $this->add_control(
846 'layout_style',
847 array(
848 'label' => __('Layout','auxin-elements'),
849 'type' => 'aux-visual-select',
850 'style_items' => 'max-width:31%;',
851 'options' => array(
852 'top' => array(
853 'label' => __('Top', 'auxin-elements'),
854 'image' => AUXIN_URL . 'images/visual-select/column-icon-top.svg'
855 ),
856 'right' => array(
857 'label' => __('Right', 'auxin-elements'),
858 'image' => AUXIN_URL . 'images/visual-select/column-icon-right.svg'
859 ),
860 'bottom' => array(
861 'label' => __('Bottom', 'auxin-elements'),
862 'image' => AUXIN_URL . 'images/visual-select/column-icon-bottom.svg'
863 ),
864 'left' => array(
865 'label' => __('Left', 'auxin-elements'),
866 'image' => AUXIN_URL . 'images/visual-select/column-icon-left.svg'
867 )
868 ),
869 'default' => 'top'
870 )
871 );
872
873 $this->add_control(
874 'text_align',
875 array(
876 'label' => __('Text Align','auxin-elements'),
877 'type' => Controls_Manager::CHOOSE,
878 'options' => array(
879 'left' => array(
880 'title' => __( 'Left', 'auxin-elements' ),
881 'icon' => 'eicon-text-align-left',
882 ),
883 'center' => array(
884 'title' => __( 'Center', 'auxin-elements' ),
885 'icon' => 'eicon-text-align-center',
886 ),
887 'right' => array(
888 'title' => __( 'Right', 'auxin-elements' ),
889 'icon' => 'eicon-text-align-right',
890 ),
891 ),
892 'default' => 'left',
893 'toggle' => true,
894 )
895 );
896
897 $this->add_responsive_control(
898 'wrapper_main_padding',
899 array(
900 'label' => __( 'Padding for main wrapper', 'auxin-elements' ),
901 'type' => Controls_Manager::DIMENSIONS,
902 'size_units' => array( 'px', '%' ),
903 'selectors' => array(
904 '{{WRAPPER}} .aux-widget-staff > div' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
905 )
906 )
907 );
908
909 $this->add_responsive_control(
910 'wrapper_content_padding',
911 array(
912 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
913 'type' => Controls_Manager::DIMENSIONS,
914 'size_units' => array( 'px', '%' ),
915 'selectors' => array(
916 '{{WRAPPER}} .aux-widget-staff .aux-staff-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
917 )
918 )
919 );
920
921 $this->end_controls_section();
922 }
923
924 /**
925 * Render image box widget output on the frontend.
926 *
927 * Written in PHP and used to generate the final HTML.
928 *
929 * @since 1.0.0
930 * @access protected
931 */
932 protected function render() {
933
934 $settings = $this->get_settings_for_display();
935
936 $width = !empty( $settings['staff_img_custom_dimension']['width'] ) ? $settings['staff_img_custom_dimension']['width'] : '';
937 $height = !empty( $settings['staff_img_custom_dimension']['height'] ) ? $settings['staff_img_custom_dimension']['height'] : '';
938
939 $args = array(
940 'title' => $settings['title'],
941 'subtitle' => $settings['subtitle'],
942 'staff_link' => $settings['staff_link']['url'],
943 'content' => $settings['content'],
944 'max_words' => $settings['max_words'],
945 'width' => $width,
946 'height' => $height,
947
948 'staff_img' => $settings['staff_img']['id'],
949 'staff_img_size' => $settings['staff_img_size'],
950 'img_shape' => $settings['img_shape'],
951 'preloadable' => $settings['preloadable'],
952 'preload_preview' => $settings['preload_preview'],
953 'preload_bgcolor' => $settings['preload_bgcolor'],
954
955 'socials' => $settings['socials'],
956
957 'icon_size' => $settings['icon_size'],
958 'icon_align' => $settings['icon_align'],
959
960 'wrapper_style' => 'simple', //$settings['wrapper_style'],
961 'layout_style' => $settings['layout_style'],
962 //'wrapper_bg_color' => $settings['wrapper_bg_color'],
963 'text_align' => $settings['text_align'],
964 );
965
966 if ( auxin_is_true( $settings['socials'] ) ) {
967 $socials = [
968 'social_twitter' ,
969 'social_facebook' ,
970 'social_gp' ,
971 'social_flickr' ,
972 'social_delicious',
973 'social_pinterest',
974 'social_github' ,
975 'social_instagram',
976 'social_dribbble' ,
977 'social_linkedin' ,
978 ];
979
980 foreach( $socials as $key => $social ) {
981 $args[ $social ] = $settings[ $social ]['url'];
982 }
983 }
984
985 echo auxin_widget_staff_callback( $args );
986 }
987
988 }
989