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 / testimonial.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
testimonial.php
990 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\Scheme_Typography;
10 use Elementor\Utils;
11 use Elementor\Group_Control_Border;
12 use Elementor\Group_Control_Box_Shadow;
13 use Elementor\Group_Control_Background;
14
15
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit; // Exit if accessed directly.
18 }
19
20 /**
21 * Elementor 'Testimonial' widget.
22 *
23 * Elementor widget that displays an 'Testimonial' with lightbox.
24 *
25 * @since 1.0.0
26 */
27 class Testimonial extends Widget_Base {
28
29 /**
30 * Get widget name.
31 *
32 * Retrieve 'Testimonial' widget name.
33 *
34 * @since 1.0.0
35 * @access public
36 *
37 * @return string Widget name.
38 */
39 public function get_name() {
40 return 'aux_testimonial';
41 }
42
43 /**
44 * Get widget title.
45 *
46 * Retrieve 'Testimonial' widget title.
47 *
48 * @since 1.0.0
49 * @access public
50 *
51 * @return string Widget title.
52 */
53 public function get_title() {
54 return __('Testimonial', 'auxin-elements' );
55 }
56
57 /**
58 * Get widget icon.
59 *
60 * Retrieve 'Testimonial' widget icon.
61 *
62 * @since 1.0.0
63 * @access public
64 *
65 * @return string Widget icon.
66 */
67 public function get_icon() {
68 return 'eicon-testimonial auxin-badge';
69 }
70
71 /**
72 * Get widget categories.
73 *
74 * Retrieve 'Testimonial' widget icon.
75 *
76 * @since 1.0.0
77 * @access public
78 *
79 * @return string Widget icon.
80 */
81 public function get_categories() {
82 return array( 'auxin-core' );
83 }
84
85 /**
86 * Register 'Testimonial' widget controls.
87 *
88 * Adds different input fields to allow the user to change and customize the widget settings.
89 *
90 * @since 1.0.0
91 * @access protected
92 */
93 protected function _register_controls() {
94
95 /*-----------------------------------------------------------------------------------*/
96 /* audio_section
97 /*-----------------------------------------------------------------------------------*/
98
99 $this->start_controls_section(
100 'template_section',
101 array(
102 'label' => __('Image', 'auxin-elements' ),
103 )
104 );
105
106 $this->add_control(
107 'template',
108 array(
109 'label' => __('Templates','auxin-elements' ),
110 'label_block' => true,
111 'type' => Controls_Manager::SELECT, //'aux-visual-select',
112 'style_items' => 'max-width:31%;',
113 'options' => array(
114 'def-img' => __( 'Default template with image', 'auxin-elements' ),
115 'bordered' => __( 'Bordered on content', 'auxin-elements' ),
116 'quote' => __( 'Quotation mark on top of content', 'auxin-elements' ),
117 'info-top' => __( 'Show info on top of content', 'auxin-elements' ),
118 'image-top' => __( 'Show image on top of content', 'auxin-elements' )
119 /*
120 'default' => array(
121 'label' => __( 'Default template', 'auxin-elements' ),
122 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/testimonial-1.svg'
123 ),
124 'def-img' => array(
125 'label' => __( 'Default template with image', 'auxin-elements' ),
126 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/testimonial-2.svg'
127 ),
128 'bordered' => array(
129 'label' => __( 'Bordered on content', 'auxin-elements' ),
130 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/testimonial-3.svg'
131 ),
132 'quote' => array(
133 'label' => __( 'Quotation mark on top of the content', 'auxin-elements' ),
134 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/testimonial-4.svg'
135 ),
136 'info-top' => array(
137 'label' => __( 'Show info on top of content', 'auxin-elements' ),
138 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/testimonial-5.svg'
139 ),
140 'image-top' => array(
141 'label' => __( 'Show image on top of the content', 'auxin-elements' ),
142 'image' => AUXELS_ADMIN_URL . '/assets/images/visual-select/testimonial-6.svg'
143 )*/
144 ),
145 'default' => 'image-top'
146 )
147 );
148
149 $this->add_control(
150 'show_image',
151 array(
152 'label' => __('Display image','auxin-elements' ),
153 'type' => Controls_Manager::SWITCHER,
154 'label_on' => __( 'On', 'auxin-elements' ),
155 'label_off' => __( 'Off', 'auxin-elements' ),
156 'default' => 'yes'
157 )
158 );
159
160 $this->add_control(
161 'customer_img',
162 array(
163 'label' => __('Customer Image','auxin-elements' ),
164 'type' => Controls_Manager::MEDIA,
165 'show_label' => false,
166 'default' => array(
167 'url' => Utils::get_placeholder_image_src()
168 ),
169 'condition' => array(
170 'show_image' => 'yes'
171 )
172 )
173 );
174
175 $this->add_group_control(
176 Group_Control_Image_Size::get_type(),
177 array(
178 'name' => 'customer_img', // Usage: `{name}_size` and `{name}_custom_dimension`, in this case `thumbnail_size` and `thumbnail_custom_dimension`.
179 'exclude' => array( 'custom' ),
180 'separator' => 'none',
181 'default' => 'thumbnail',
182 'condition' => array(
183 'show_image' => 'yes'
184 )
185 )
186 );
187
188 $this->end_controls_section();
189
190 $this->start_controls_section(
191 'content_section',
192 array(
193 'label' => __('Content', 'auxin-elements' ),
194 )
195 );
196
197 $this->add_control(
198 'title',
199 array(
200 'label' => __('Customer Name','auxin-elements'),
201 'label_block' => true,
202 'type' => Controls_Manager::TEXT,
203 'default' => 'John Doe'
204 )
205 );
206
207 $this->add_control(
208 'subtitle',
209 array(
210 'label' => __('Customer Occupation','auxin-elements'),
211 'label_block' => true,
212 'type' => Controls_Manager::TEXT,
213 'default' => 'Manager'
214 )
215 );
216
217 $this->add_control(
218 'link',
219 array(
220 'label' => __('Customer Link','auxin-elements'),
221 'type' => Controls_Manager::URL,
222 'show_external' => false,
223 'placeholder' => 'http://phlox.pro',
224 'dynamic' => [
225 'active' => true
226 ]
227 )
228 );
229
230 $this->add_control(
231 'rating',
232 array(
233 'label' => __('Customer Rating','auxin-elements'),
234 'label_block' => true,
235 'type' => Controls_Manager::SELECT,
236 'default' => 'none',
237 'options' => array(
238 'none' => __( 'None' , 'auxin-elements' ),
239 '1' => '1',
240 '2' => '2',
241 '3' => '3',
242 '4' => '4',
243 '5' => '5',
244 )
245 )
246 );
247
248 $this->add_control(
249 'content',
250 array(
251 'label' => __('Review','auxin-elements'),
252 'type' => Controls_Manager::TEXTAREA,
253 'rows' => '10',
254 'default' => 'Click edit button to change this text. Collaboratively drive collaborative solutions with flexible e-services. Conveniently supply technically sound process improvements.'
255 )
256 );
257
258 $this->end_controls_section();
259
260 /*-----------------------------------------------------------------------------------*/
261 /* Image Style Section
262 /*-----------------------------------------------------------------------------------*/
263
264 $this->start_controls_section(
265 'section_image_border',
266 array(
267 'label' => __( 'Image', 'auxin-elements' ),
268 'tab' => Controls_Manager::TAB_STYLE
269 )
270 );
271
272 $this->add_group_control(
273 Group_Control_Border::get_type(),
274 array(
275 'name' => 'image_border',
276 'selector' => '{{WRAPPER}} .aux-testimonial-image img',
277 'separator' => 'before'
278 )
279 );
280
281 $this->add_responsive_control(
282 'image_width',
283 array(
284 'label' => __( 'Width', 'auxin-elements' ),
285 'type' => Controls_Manager::SLIDER,
286 'size_units' => array( 'px', '%' ),
287 'range' => array(
288 'px' => array(
289 'min' => 0,
290 'max' => 1000
291 ),
292 '%' => array(
293 'min' => 0,
294 'max' => 100
295 )
296 ),
297 'selectors' => array(
298 '{{WRAPPER}} .aux-widget-testimonial .aux-testimonial-image' => 'width:{{SIZE}}{{UNIT}};'
299 )
300 )
301 );
302
303 $this->add_control(
304 'image_border_radius',
305 array(
306 'label' => __( 'Border radius', 'auxin-elements' ),
307 'type' => Controls_Manager::DIMENSIONS,
308 'size_units' => array( 'px', '%' ),
309 'selectors' => array(
310 '{{WRAPPER}} .aux-testimonial-image img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow:hidden;'
311 ),
312 'default' => array(
313 'unit' => '%',
314 'top' => '100',
315 'right' => '100',
316 'bottom' => '100',
317 'left' => '100',
318 'isLinked' => true
319 ),
320 'allowed_dimensions' => 'all'
321 )
322 );
323
324 $this->add_responsive_control(
325 'image_margin',
326 array(
327 'label' => __( 'Top and bottom space', 'auxin-elements' ),
328 'type' => Controls_Manager::DIMENSIONS,
329 'size_units' => array( 'px', 'em' ),
330 'allowed_dimensions' => 'vertical',
331 'selectors' => array(
332 '{{WRAPPER}} .aux-testimonial-image' => 'margin-top:{{TOP}}{{UNIT}}; margin-bottom:{{BOTTOM}}{{UNIT}};'
333 )
334 )
335 );
336
337 $this->end_controls_section();
338
339 /*-----------------------------------------------------------------------------------*/
340 /* Title Style Section
341 /*-----------------------------------------------------------------------------------*/
342
343 $this->start_controls_section(
344 'title_style_section',
345 array(
346 'label' => __( 'Name', 'auxin-elements' ),
347 'tab' => Controls_Manager::TAB_STYLE,
348 'condition' => array(
349 'title!' => '',
350 ),
351 )
352 );
353
354 $this->start_controls_tabs( 'title_colors' );
355
356 $this->start_controls_tab(
357 'title_color_normal',
358 array(
359 'label' => __( 'Normal' , 'auxin-elements' ),
360 'condition' => array(
361 'title!' => '',
362 ),
363 )
364 );
365
366 $this->add_control(
367 'title_color',
368 array(
369 'label' => __( 'Color', 'auxin-elements' ),
370 'type' => Controls_Manager::COLOR,
371 'selectors' => array(
372 '{{WRAPPER}} .col-title a, {{WRAPPER}} .col-title' => 'color: {{VALUE}} !important;',
373 ),
374 'condition' => array(
375 'title!' => '',
376 ),
377 )
378 );
379
380 $this->add_group_control(
381 Group_Control_Typography::get_type(),
382 array(
383 'name' => 'title_typography',
384 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
385 'selector' => '{{WRAPPER}} .col-title, {{WRAPPER}} .col-title a',
386 'condition' => array(
387 'title!' => ''
388 )
389 )
390 );
391
392 $this->end_controls_tab();
393
394 $this->start_controls_tab(
395 'title_color_hover',
396 array(
397 'label' => __( 'Hover' , 'auxin-elements' ),
398 'condition' => array(
399 'title!' => '',
400 ),
401 )
402 );
403
404 $this->add_control(
405 'title_hover_color',
406 array(
407 'label' => __( 'Color', 'auxin-elements' ),
408 'type' => Controls_Manager::COLOR,
409 'selectors' => array(
410 '{{WRAPPER}} .aux-widget-testimonial:hover .col-title' => 'color: {{VALUE}} !important;',
411 '{{WRAPPER}} .aux-widget-testimonial:hover .col-title a' => 'color: {{VALUE}} !important;',
412 ),
413 'condition' => array(
414 'title!' => '',
415 ),
416 )
417 );
418
419 $this->add_group_control(
420 Group_Control_Typography::get_type(),
421 array(
422 'name' => 'title_hover_typography',
423 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
424 'selector' => '{{WRAPPER}} .aux-widget-testimonial:hover .col-title, {{WRAPPER}} .aux-widget-testimonial:hover .col-title a',
425 'condition' => array(
426 'title!' => ''
427 )
428 )
429 );
430
431 $this->end_controls_tab();
432
433 $this->end_controls_tabs();
434
435 $this->add_responsive_control(
436 'title_margin',
437 array(
438 'label' => __( 'Top and bottom space', 'auxin-elements' ),
439 'type' => Controls_Manager::DIMENSIONS,
440 'size_units' => array( 'px', 'em' ),
441 'allowed_dimensions' => 'vertical',
442 'selectors' => array(
443 '{{WRAPPER}} .col-title' => 'margin-top:{{TOP}}{{UNIT}}; margin-bottom:{{BOTTOM}}{{UNIT}};'
444 ),
445 'condition' => array(
446 'title!' => ''
447 )
448 )
449 );
450
451 $this->end_controls_section();
452
453 /*-----------------------------------------------------------------------------------*/
454 /* Subtitle style section
455 /*-----------------------------------------------------------------------------------*/
456
457 $this->start_controls_section(
458 'subtitle_style_section',
459 array(
460 'label' => __( 'Occupation', 'auxin-elements' ),
461 'tab' => Controls_Manager::TAB_STYLE,
462 'condition' => array(
463 'subtitle!' => ''
464 )
465 )
466 );
467
468 $this->start_controls_tabs( 'subtitle_styles_tabs' );
469
470 $this->start_controls_tab(
471 'subtitle_color_normal',
472 array(
473 'label' => __( 'Normal' , 'auxin-elements' ),
474 'condition' => array(
475 'title!' => '',
476 ),
477 )
478 );
479
480 $this->add_control(
481 'subtitle_color',
482 array(
483 'label' => __( 'Color', 'auxin-elements' ),
484 'type' => Controls_Manager::COLOR,
485 'selectors' => array(
486 '{{WRAPPER}} .col-subtitle' => 'color: {{VALUE}} !important;',
487 ),
488 'condition' => array(
489 'subtitle!' => '',
490 ),
491 )
492 );
493
494 $this->add_group_control(
495 Group_Control_Typography::get_type(),
496 array(
497 'name' => 'subtitle_typography',
498 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
499 'selector' => '{{WRAPPER}} .col-subtitle',
500 'condition' => array(
501 'subtitle!' => ''
502 )
503 )
504 );
505
506 $this->end_controls_tab();
507
508 $this->start_controls_tab(
509 'subtitle_color_hover',
510 array(
511 'label' => __( 'Hover' , 'auxin-elements' ),
512 'condition' => array(
513 'title!' => '',
514 ),
515 )
516 );
517
518 $this->add_control(
519 'subtitle_hover_color',
520 array(
521 'label' => __( 'Color', 'auxin-elements' ),
522 'type' => Controls_Manager::COLOR,
523 'selectors' => array(
524 '{{WRAPPER}} .aux-widget-testimonial:hover .col-subtitle' => 'color: {{VALUE}} !important;',
525 ),
526 'condition' => array(
527 'subtitle!' => '',
528 ),
529 )
530 );
531
532 $this->add_group_control(
533 Group_Control_Typography::get_type(),
534 array(
535 'name' => 'subtitle_hover_typography',
536 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
537 'selector' => '{{WRAPPER}} .aux-widget-testimonial:hover .col-subtitle',
538 'condition' => array(
539 'subtitle!' => ''
540 )
541 )
542 );
543
544
545
546 $this->end_controls_tab();
547
548 $this->end_controls_tabs();
549
550 $this->add_responsive_control(
551 'subtitle_margin_bottom',
552 array(
553 'label' => __( 'Bottom space', 'auxin-elements' ),
554 'type' => Controls_Manager::SLIDER,
555 'range' => array(
556 'px' => array(
557 'max' => 100
558 )
559 ),
560 'selectors' => array(
561 '{{WRAPPER}} .col-subtitle' => 'margin-bottom: {{SIZE}}{{UNIT}};'
562 ),
563 'condition' => array(
564 'subtitle!' => ''
565 )
566 )
567 );
568
569 $this->end_controls_section();
570
571 /*-----------------------------------------------------------------------------------*/
572 /* Review style section
573 /*-----------------------------------------------------------------------------------*/
574
575 $this->start_controls_section(
576 'review_style_section',
577 array(
578 'label' => __( 'Review', 'auxin-elements' ),
579 'tab' => Controls_Manager::TAB_STYLE,
580 'condition' => array(
581 'content!' => ''
582 )
583 )
584 );
585
586 $this->start_controls_tabs( 'review_style_tabs' );
587
588 $this->start_controls_tab(
589 'review_style_normal',
590 array(
591 'label' => __( 'Normal' , 'auxin-elements' ),
592 'condition' => array(
593 'content!' => '',
594 )
595 )
596 );
597
598 $this->add_control(
599 'content_color',
600 array(
601 'label' => __( 'Color', 'auxin-elements' ),
602 'type' => Controls_Manager::COLOR,
603 'selectors' => array(
604 '{{WRAPPER}} .aux-testimonial-content' => 'color: {{VALUE}} !important;'
605 ),
606 'condition' => array(
607 'content!' => ''
608 )
609 )
610 );
611
612 $this->add_group_control(
613 Group_Control_Typography::get_type(),
614 array(
615 'name' => 'content_typography',
616 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
617 'selector' => '{{WRAPPER}} .aux-testimonial-content',
618 'condition' => array(
619 'content!' => ''
620 )
621 )
622 );
623
624 $this->end_controls_tab();
625
626 $this->start_controls_tab(
627 'review_style_hover',
628 array(
629 'label' => __( 'Hover' , 'auxin-elements' ),
630 'condition' => array(
631 'content!' => '',
632 )
633 )
634 );
635
636 $this->add_control(
637 'content_color_hover',
638 array(
639 'label' => __( 'Color', 'auxin-elements' ),
640 'type' => Controls_Manager::COLOR,
641 'selectors' => array(
642 '{{WRAPPER}} .aux-widget-testimonial:hover .aux-testimonial-content' => 'color: {{VALUE}} !important;'
643 ),
644 'condition' => array(
645 'content!' => ''
646 )
647 )
648 );
649
650 $this->add_group_control(
651 Group_Control_Typography::get_type(),
652 array(
653 'name' => 'content_typography_hover',
654 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
655 'selector' => '{{WRAPPER}} .aux-widget-testimonial:hover .aux-testimonial-content',
656 'condition' => array(
657 'content!' => ''
658 )
659 )
660 );
661
662 $this->end_controls_tab();
663
664 $this->end_controls_tabs();
665
666 $this->add_responsive_control(
667 'content_margin',
668 array(
669 'label' => __( 'Top and bottom space', 'auxin-elements' ),
670 'type' => Controls_Manager::DIMENSIONS,
671 'size_units' => array( 'px', 'em' ),
672 'allowed_dimensions' => 'vertical',
673 'selectors' => array(
674 '{{WRAPPER}} .aux-testimonial-content .entry-content' => 'margin-top:{{TOP}}{{UNIT}}; margin-bottom:{{BOTTOM}}{{UNIT}};'
675 ),
676 'separator' => 'before'
677 )
678 );
679
680 $this->add_responsive_control(
681 'content_border_radius',
682 array(
683 'label' => __( 'Border radius', 'auxin-elements' ),
684 'type' => Controls_Manager::DIMENSIONS,
685 'size_units' => array( 'px' ),
686 'selectors' => array(
687 '{{WRAPPER}} .aux-testimonial-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
688 )
689 )
690 );
691
692 $this->add_responsive_control(
693 'content_padding',
694 array(
695 'label' => __( 'Padding', 'auxin-elements' ),
696 'type' => Controls_Manager::DIMENSIONS,
697 'size_units' => array( 'px', '%' ),
698 'selectors' => array(
699 '{{WRAPPER}} .aux-testimonial-content .entry-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
700 )
701 )
702 );
703
704 $this->add_group_control(
705 Group_Control_Border::get_type(),
706 array(
707 'name' => 'content_border',
708 'selector' => '{{WRAPPER}} .aux-testimonial-content',
709 'separator' => 'both'
710 )
711 );
712
713 $this->end_controls_section();
714
715 /*-----------------------------------------------------------------------------------*/
716 /* Rating Style Section
717 /*-----------------------------------------------------------------------------------*/
718
719 $this->start_controls_section(
720 'rating_style_section',
721 array(
722 'label' => __( 'Rating', 'auxin-elements' ),
723 'tab' => Controls_Manager::TAB_STYLE,
724 'condition' => array(
725 'rating!' => 'none'
726 )
727 )
728 );
729
730
731 $this->add_control(
732 'rating_empty_color',
733 array(
734 'label' => __( 'Empty Color', 'auxin-elements' ),
735 'type' => Controls_Manager::COLOR,
736 'selectors' => array(
737 '{{WRAPPER}} .aux-rating-box.aux-star-rating::before' => 'color: {{VALUE}} !important;'
738 )
739 )
740 );
741
742 $this->add_control(
743 'rating_fill_color',
744 array(
745 'label' => __( 'Fill Color', 'auxin-elements' ),
746 'type' => Controls_Manager::COLOR,
747 'selectors' => array(
748 '{{WRAPPER}} .aux-rating-box.aux-star-rating span::before' => 'color: {{VALUE}} !important;'
749 )
750 )
751 );
752
753 $this->add_responsive_control(
754 'rating_size',
755 array(
756 'label' => __( 'Size', 'auxin-elements' ),
757 'type' => Controls_Manager::SLIDER,
758 'size_units' => array( 'px', 'em', 'rem' ),
759 'range' => array(
760 'px' => array(
761 'min' => 1,
762 'max' => 200
763 )
764 ),
765 'selectors' => array(
766 '{{WRAPPER}} .aux-star-rating' => 'font-size: {{SIZE}}{{UNIT}};'
767 )
768 )
769 );
770
771 $this->add_responsive_control(
772 'rating_margin_bottom',
773 array(
774 'label' => __( 'Bottom space', 'auxin-elements' ),
775 'type' => Controls_Manager::SLIDER,
776 'range' => array(
777 'px' => array(
778 'max' => 100
779 )
780 ),
781 'selectors' => array(
782 '{{WRAPPER}} .aux-star-rating' => 'margin-bottom: {{SIZE}}{{UNIT}};'
783 )
784 )
785 );
786
787 $this->end_controls_section();
788
789 /*-----------------------------------------------------------------------------------*/
790 /* Block Style Section
791 /*-----------------------------------------------------------------------------------*/
792
793 $this->start_controls_section(
794 'box_style_section',
795 array(
796 'label' => __( 'Content Box', 'auxin-elements' ),
797 'tab' => Controls_Manager::TAB_STYLE
798 )
799 );
800
801 $this->add_control(
802 'box_alignment',
803 array(
804 'label' => __('Content Alignment', 'auxin-elements'),
805 'type' => Controls_Manager::CHOOSE,
806 'default' => 'center',
807 'options' => array(
808 'left' => array(
809 'title' => __( 'Left', 'auxin-elements' ),
810 'icon' => 'fa fa-align-left',
811 ),
812 'center' => array(
813 'title' => __( 'Center', 'auxin-elements' ),
814 'icon' => 'fa fa-align-center',
815 ),
816 'right' => array(
817 'title' => __( 'Right', 'auxin-elements' ),
818 'icon' => 'fa fa-align-right',
819 )
820 ),
821 'return_value' => '',
822 'selectors' => array(
823 '{{WRAPPER}} .aux-widget-testimonial' => 'text-align:{{VALUE}};',
824 )
825 )
826 );
827
828 $this->add_responsive_control(
829 'box_border_radius',
830 array(
831 'label' => __( 'Border radius', 'auxin-elements' ),
832 'type' => Controls_Manager::DIMENSIONS,
833 'size_units' => array( 'px' ),
834 'selectors' => array(
835 '{{WRAPPER}} .aux-widget-testimonial' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
836 )
837 )
838 );
839
840 $this->add_responsive_control(
841 'box_padding',
842 array(
843 'label' => __( 'Padding', 'auxin-elements' ),
844 'type' => Controls_Manager::DIMENSIONS,
845 'size_units' => array( 'px', '%' ),
846 'selectors' => array(
847 '{{WRAPPER}} .aux-widget-testimonial' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
848 )
849 )
850 );
851
852 $this->add_responsive_control(
853 'box_width',
854 array(
855 'label' => __('Width','auxin-elements' ),
856 'type' => Controls_Manager::SLIDER,
857 'size_units' => array('px', 'em','%'),
858 'range' => array(
859 '%' => array(
860 'min' => 1,
861 'max' => 120,
862 'step' => 1
863 ),
864 'em' => array(
865 'min' => 1,
866 'max' => 120,
867 'step' => 1
868 ),
869 'px' => array(
870 'min' => 1,
871 'max' => 1900,
872 'step' => 1
873 )
874 ),
875 'selectors' => array(
876 '{{WRAPPER}} .aux-widget-testimonial' => 'max-width:{{SIZE}}{{UNIT}}; margin-left:auto; margin-right:auto;'
877 ),
878 'separator' => 'after'
879 )
880 );
881
882 $this->start_controls_tabs( 'box_tabs' );
883
884 $this->start_controls_tab(
885 'box_normal',
886 array(
887 'label' => __( 'Normal' , 'auxin-elements' )
888 )
889 );
890
891 $this->add_group_control(
892 Group_Control_Background::get_type(),
893 array(
894 'name' => 'box_backgound',
895 'label' => __( 'Background', 'auxin-elements' ),
896 'selector' => '{{WRAPPER}} .aux-widget-testimonial'
897 )
898 );
899
900 $this->add_group_control(
901 Group_Control_Box_Shadow::get_type(),
902 array(
903 'name' => 'box_shadow',
904 'selector' => '{{WRAPPER}} .aux-widget-testimonial',
905 'separator' => 'both'
906 )
907 );
908
909 $this->add_group_control(
910 Group_Control_Border::get_type(),
911 array(
912 'name' => 'box_border',
913 'selector' => '{{WRAPPER}} .aux-widget-testimonial',
914 'separator' => 'none'
915 )
916 );
917
918 $this->end_controls_tab();
919
920 $this->start_controls_tab(
921 'box_hover',
922 array(
923 'label' => __( 'Hover' , 'auxin-elements' )
924 )
925 );
926
927 $this->add_group_control(
928 Group_Control_Background::get_type(),
929 array(
930 'name' => 'box_backgound_hover',
931 'label' => __( 'Background', 'auxin-elements' ),
932 'selector' => '{{WRAPPER}} .aux-widget-testimonial:hover'
933 )
934 );
935
936 $this->add_group_control(
937 Group_Control_Box_Shadow::get_type(),
938 array(
939 'name' => 'box_shadow_hover',
940 'selector' => '{{WRAPPER}} .aux-widget-testimonial:hover',
941 'separator' => 'both'
942 )
943 );
944
945 $this->add_group_control(
946 Group_Control_Border::get_type(),
947 array(
948 'name' => 'box_border_hover',
949 'selector' => '{{WRAPPER}} .aux-widget-testimonial:hover',
950 'separator' => 'none'
951 )
952 );
953
954 $this->end_controls_tab();
955
956 $this->end_controls_tabs();
957
958 $this->end_controls_section();
959 }
960
961 /**
962 * Render image box widget output on the frontend.
963 *
964 * Written in PHP and used to generate the final HTML.
965 *
966 * @since 1.0.0
967 * @access protected
968 */
969 protected function render() {
970
971 $settings = $this->get_settings_for_display();
972
973 $args = array(
974 'template' => $settings['template'],
975 'image_html' => Group_Control_Image_Size::get_attachment_image_html( $settings, 'customer_img' ),
976 'image_size' => $settings['customer_img_size'],
977
978 'title' => $settings['title'],
979 'subtitle' => $settings['subtitle'],
980 'link' => $settings['link']['url'],
981 'rating' => $settings['rating'],
982 'content' => $settings['content']
983 );
984
985 // pass the args through the corresponding shortcode callback
986 echo auxin_widget_testimonial_callback( $args );
987 }
988
989 }
990