PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.0.2
UiCore Elements – Free widgets and templates for Elementor v1.0.2
1.3.17 1.3.16 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 All 41 releases
uicore-elements / includes / utils / testimonial-component.php

testimonial-component.php in UiCore Elements – Free widgets and templates for Elementor 1.0.2, at includes/utils/testimonial-component.php

1,561 lines 57.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace UiCoreElements\Utils;
3
4 use Elementor\Controls_Manager;
5 use Elementor\Plugin;
6 use Elementor\Utils;
7 use Elementor\Repeater;
8 use Elementor\Icons_Manager;
9 use Elementor\Group_Control_Image_Size;
10 use Elementor\Group_Control_Box_Shadow;
11 use Elementor\Group_Control_Border;
12 use Elementor\Group_Control_Typography;
13 use Elementor\Group_Control_Text_Shadow;
14 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
15 use UiCoreElements\Helper;
16
17
18 defined('ABSPATH') || exit();
19
20 trait Testimonial_Trait {
21
22 // Content Controls Functions
23 function register_testimonial_repeater_controls($logo)
24 {
25 $this->start_controls_section(
26 'section_reviewer_content',
27 [
28 'label' => __($logo, 'uicore-elements'),
29 'tab' => Controls_Manager::TAB_CONTENT,
30 ]
31 );
32
33 $repeater = new Repeater();
34
35 $repeater->add_control(
36 'avatar',
37 [
38 'label' => __('Avatar', 'uicore-elements'),
39 'type' => Controls_Manager::MEDIA,
40 'render_type' => 'template',
41 'dynamic' => [
42 'active' => true,
43 ],
44 'default' => [
45 'url' => Utils::get_placeholder_image_src(),
46 ],
47 ]
48 );
49 $repeater->add_control(
50 'reviewer_name',
51 [
52 'label' => __('Name', 'uicore-elements'),
53 'type' => Controls_Manager::TEXT,
54 'dynamic' => [
55 'active' => true,
56 ],
57 'default' => __('Adam Smith', 'uicore-elements'),
58 'placeholder' => __('Enter reviewer name', 'uicore-elements'),
59 'label_block' => true,
60 ]
61 );
62 $repeater->add_control(
63 'reviewer_job_title',
64 [
65 'label' => __('Job Title', 'uicore-elements'),
66 'type' => Controls_Manager::TEXT,
67 'dynamic' => [
68 'active' => true,
69 ],
70 'default' => __('SEO Expert', 'uicore-elements'),
71 'placeholder' => __('Enter reviewer job title', 'uicore-elements'),
72 'label_block' => true,
73 ]
74 );
75 $repeater->add_control(
76 'rating_number',
77 [
78 'label' => __( 'Rating', 'uicore-elements' ),
79 'type' => Controls_Manager::SLIDER,
80 'size_units' => [ 'px' ],
81 'default' => [
82 'size' => 4.5,
83 ],
84 'range' => [
85 'px' => [
86 'min' => 0,
87 'max' => 5,
88 'step' => .5,
89 ],
90 ],
91 'dynamic' => [
92 'active' => true,
93 ],
94 ]
95 );
96 $repeater->add_control(
97 'review_text',
98 [
99 'label' => __('Review Text', 'uicore-elements'),
100 'type' => Controls_Manager::WYSIWYG,
101 'dynamic' => [
102 'active' => true,
103 ],
104 'default' => __('Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'uicore-elements'),
105 'placeholder' => __('Enter review text', 'uicore-elements'),
106 ]
107 );
108 $repeater->add_control(
109 'image',
110 [
111 'label' => __('Secondary Image', 'uicore-elements'),
112 'type' => Controls_Manager::MEDIA,
113 'render_type' => 'template',
114 'dynamic' => [
115 'active' => true,
116 ],
117 'default' => [
118 'url' => Utils::get_placeholder_image_src(),
119 ],
120 ]
121 );
122 $this->add_control(
123 'review_items',
124 [
125 'show_label' => false,
126 'type' => Controls_Manager::REPEATER,
127 'fields' => $repeater->get_controls(),
128 'title_field' => '{{{ reviewer_name }}}',
129 'default' => [
130 [
131 'reviewer_name' => __( 'Adam', 'uicore-elements' ),
132 'reviewer_job_title' => __( 'SEO Expert', 'uicore-elements' ),
133 ],
134 [
135 'reviewer_name' => __( 'Karl', 'uicore-elements' ),
136 'reviewer_job_title' => __( 'Designer', 'uicore-elements' ),
137 ],
138 [
139 'reviewer_name' => __( 'Maria', 'uicore-elements' ),
140 'reviewer_job_title' => __( 'Developer', 'uicore-elements' ),
141 ],
142 [
143 'reviewer_name' => __( 'Michael', 'uicore-elements' ),
144 'reviewer_job_title' => __( 'Manager', 'uicore-elements' ),
145 ],
146 [
147 'reviewer_name' => __( 'Lena', 'uicore-elements' ),
148 'reviewer_job_title' => __( 'CEO', 'uicore-elements' ),
149 ],
150 [
151 'reviewer_name' => __( 'Jennifer', 'uicore-elements' ),
152 'reviewer_job_title' => __( 'Consultant', 'uicore-elements' ),
153 ],
154 ]
155 ]
156 );
157
158 $this->end_controls_section();
159 }
160 function register_testimonial_additional_controls()
161 {
162 $this->add_control(
163 'show_reviewer_name',
164 [
165 'label' => __('Show Name', 'uicore-elements'),
166 'type' => Controls_Manager::SWITCHER,
167 'default' => 'yes',
168 'separator' => 'before',
169 ]
170 );
171 $this->add_control(
172 'review_name_tag',
173 [
174 'label' => __('Name HTML Tag', 'uicore-elements'),
175 'type' => Controls_Manager::SELECT,
176 'default' => 'h3',
177 'options' => Helper::get_title_tags(),
178 'condition' => [
179 'show_reviewer_name' => 'yes',
180 ]
181 ]
182 );
183 $this->add_control(
184 'show_reviewer_job_title',
185 [
186 'label' => __('Show Job Title', 'uicore-elements'),
187 'type' => Controls_Manager::SWITCHER,
188 'default' => 'yes',
189 'separator' => 'before',
190 ]
191 );
192 $this->add_control(
193 'show_reviewer_rating',
194 [
195 'label' => __('Show Rating', 'uicore-elements'),
196 'type' => Controls_Manager::SWITCHER,
197 'default' => 'yes',
198 'separator' => 'before'
199 ]
200 );
201 $this->add_control(
202 'rating_type',
203 [
204 'label' => __( 'Rating Type', 'uicore-elements' ),
205 'type' => Controls_Manager::SELECT,
206 'default' => 'star',
207 'options' => [
208 'star' => __( 'Star', 'uicore-elements' ),
209 'number' => __( 'Number', 'uicore-elements' ),
210 ],
211 'condition' => [
212 'show_reviewer_rating' => 'yes'
213 ]
214 ]
215 );
216 $this->add_control(
217 'show_reviewer_text',
218 [
219 'label' => __('Show Review Text', 'uicore-elements'),
220 'type' => Controls_Manager::SWITCHER,
221 'default' => 'yes',
222 'separator' => 'before',
223 ]
224 );
225 $this->add_control(
226 'show_reviewer_image',
227 [
228 'label' => __('Show Image', 'uicore-elements'),
229 'type' => Controls_Manager::SWITCHER,
230 'default' => 'yes',
231 'separator' => 'before',
232 ]
233 );
234 $this->add_group_control(
235 Group_Control_Image_Size::get_type(),
236 [
237 'name' => 'image_media_size',
238 'default' => 'medium',
239 'condition' => [
240 'show_reviewer_image' => 'yes'
241 ]
242 ]
243 );
244 $this->add_control(
245 'show_reviewer_avatar',
246 [
247 'label' => __('Show Avatar', 'uicore-elements'),
248 'type' => Controls_Manager::SWITCHER,
249 'default' => 'yes',
250 'separator' => 'before',
251 ]
252 );
253 $this->add_group_control(
254 Group_Control_Image_Size::get_type(),
255 [
256 'name' => 'avatar_media_size',
257 'default' => 'medium',
258 'condition' => [
259 'show_reviewer_avatar' => 'yes'
260 ]
261 ]
262 );
263 $this->add_control(
264 'image_inline',
265 [
266 'label' => esc_html__('Image Inline', 'uicore-elements'),
267 'type' => Controls_Manager::SWITCHER,
268 'condition' => [
269 'show_reviewer_avatar' => 'yes'
270 ],
271 'prefix_class' => 'ui-e-img-inline-',
272 'render_type' => 'template',
273 'condition' => [
274 'layout' => ['layout_1', 'layout_2', 'layout_3'],
275 'show_reviewer_avatar' => 'yes'
276 ]
277 ]
278 );
279 $this->add_responsive_control(
280 'v_alignment',
281 [
282 'label' => __('Image Alignment', 'uicore-elements'),
283 'type' => Controls_Manager::CHOOSE,
284 'default' => 'flex-start',
285 'toggle' => false,
286 'options' => [
287 'flex-start' => [
288 'title' => __( 'Top', 'uicore-elements' ),
289 'icon' => 'eicon-v-align-top',
290 ],
291 'center' => [
292 'title' => __( 'Center', 'uicore-elements' ),
293 'icon' => 'eicon-v-align-middle',
294 ],
295 'flex-end' => [
296 'title' => __( 'Bottom', 'uicore-elements' ),
297 'icon' => 'eicon-v-align-bottom',
298 ],
299 ],
300 'selectors' => [
301 '{{WRAPPER}} .ui-e-item' => '--ui-e-img-alignment: {{VALUE}};',
302 ],
303 'condition' => [
304 'layout' => 'layout_6'
305 ],
306 ]
307 );
308 $this->add_control(
309 'show_reviewer_divider',
310 [
311 'label' => __('Show Divider', 'uicore-elements'),
312 'type' => Controls_Manager::SWITCHER,
313 'default' => 'yes',
314 'separator' => 'before',
315 'condition' => [
316 'layout' => 'layout_3'
317 ]
318 ]
319 );
320 $this->add_responsive_control(
321 'h_alignment',
322 [
323 'label' => __('Content Alignment', 'uicore-elements'),
324 'type' => Controls_Manager::CHOOSE,
325 'options' => [
326 'left' => [
327 'title' => __('Left', 'uicore-elements'),
328 'icon' => 'eicon-text-align-left',
329 ],
330 'center' => [
331 'title' => __('Center', 'uicore-elements'),
332 'icon' => 'eicon-text-align-center',
333 ],
334 'right' => [
335 'title' => __('Right', 'uicore-elements'),
336 'icon' => 'eicon-text-align-right',
337 ],
338 'justify' => [
339 'title' => __('Justified', 'uicore-elements'),
340 'icon' => 'eicon-text-align-justify',
341 ],
342 ],
343 'prefix_class' => 'ui-e-h-align-',
344 'selectors' => [
345 '{{WRAPPER}} .ui-e-item' => 'text-align: {{VALUE}};',
346 ],
347 'separator' => 'before'
348 ]
349 );
350 }
351
352 // Style Controls Functions}
353 function register_testimonial_image_controls()
354 {
355 $this->start_controls_section(
356 'section_style_avatar',
357 [
358 'label' => __('Avatar', 'uicore-elements'),
359 'tab' => Controls_Manager::TAB_STYLE,
360 'condition' => [
361 'show_reviewer_avatar' => 'yes'
362 ]
363 ]
364 );
365
366 $this->add_group_control(
367 Group_Control_Border::get_type(),
368 [
369 'name' => 'avatar_border',
370 'selector' => '{{WRAPPER}} .ui-e-testimonial-avatar img'
371 ]
372 );
373 $this->add_control(
374 'avatar_radius',
375 [
376 'label' => esc_html__('Border Radius', 'uicore-elements'),
377 'type' => Controls_Manager::DIMENSIONS,
378 'size_units' => ['px', 'em', '%'],
379 'selectors' => [
380 '{{WRAPPER}} .ui-e-testimonial-avatar img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
381 ],
382 ]
383 );
384 $this->add_control(
385 'avatar_padding',
386 [
387 'label' => __('Padding', 'uicore-elements'),
388 'type' => Controls_Manager::DIMENSIONS,
389 'size_units' => ['px', 'em', '%'],
390 'selectors' => [
391 '{{WRAPPER}} .ui-e-testimonial-avatar img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
392 ],
393 ]
394 );
395 $this->add_responsive_control(
396 'avatar_size',
397 [
398 'label' => __('Size', 'uicore-elements'),
399 'type' => Controls_Manager::SLIDER,
400 'default' => [
401 'size' => 40,
402 'unit' => '%'
403 ],
404 'range' => [
405 '%' => [
406 'min' => 1,
407 'max' => 100,
408 ],
409 ],
410 'selectors' => [
411 '{{WRAPPER}}' => '--ui-e-avatar-size: {{SIZE}}%;',
412 ],
413 'condition' => [
414 'layout!' => 'layout_5',
415 ]
416 ]
417 );
418 $this->add_control(
419 'avatar_size_px',
420 [
421 'label' => __('Size', 'uicore-elements'),
422 'type' => Controls_Manager::SLIDER,
423 'default' => [
424 'size' => 80,
425 'unit' => 'px'
426 ],
427 'range' => [
428 'px' => [
429 'min' => 1,
430 'max' => 250,
431 ],
432 ],
433 'selectors' => [
434 '{{WRAPPER}}' => '--ui-e-avatar-size: {{SIZE}}{{UNIT}};',
435 ],
436 'condition' => [
437 'layout' => 'layout_5',
438 ]
439 ]
440 );
441 $this->add_control(
442 'avatar_spacing',
443 [
444 'label' => __('Spacing', 'uicore-elements'),
445 'type' => Controls_Manager::SLIDER,
446 'default' => [
447 'size' => 15,
448 ],
449 'selectors' => [
450 '{{WRAPPER}}' => '--ui-e-avatar-spacing: {{SIZE}}{{UNIT}}'
451 ],
452 ]
453 );
454 $this->add_group_control(
455 Group_Control_Box_Shadow::get_type(),
456 [
457 'name' => 'avatar_shadow',
458 'selector' => '{{WRAPPER}} .ui-e-testimonial-avatar img'
459 ]
460 );
461 $this->add_control(
462 'avatar_offset_toggle',
463 [
464 'label' => __('Offset', 'uicore-elements'),
465 'type' => Controls_Manager::POPOVER_TOGGLE,
466 'label_off' => __('None', 'uicore-elements'),
467 'label_on' => __('Custom', 'uicore-elements'),
468 'return_value' => 'yes',
469 ]
470 );
471 $this->start_popover();
472
473 $this->add_responsive_control(
474 'avatar_horizontal_offset',
475 [
476 'label' => __('Horizontal', 'uicore-elements'),
477 'type' => Controls_Manager::SLIDER,
478 'default' => [
479 'size' => 0,
480 ],
481 'tablet_default' => [
482 'size' => 0,
483 ],
484 'mobile_default' => [
485 'size' => 0,
486 ],
487 'range' => [
488 'px' => [
489 'min' => -200,
490 'max' => 200,
491 ],
492 ],
493 'condition' => [
494 'avatar_offset_toggle' => 'yes'
495 ],
496 'render_type' => 'ui',
497 'selectors' => [
498 '{{WRAPPER}}' => '--ui-e-avatar-h-offset: {{SIZE}}px;'
499 ],
500 ]
501 );
502 $this->add_responsive_control(
503 'avatar_vertical_offset',
504 [
505 'label' => __('Vertical', 'uicore-elements'),
506 'type' => Controls_Manager::SLIDER,
507 'default' => [
508 'size' => 0,
509 ],
510 'tablet_default' => [
511 'size' => 0,
512 ],
513 'mobile_default' => [
514 'size' => 0,
515 ],
516 'range' => [
517 'px' => [
518 'min' => -200,
519 'max' => 200,
520 ],
521 ],
522 'condition' => [
523 'avatar_offset_toggle' => 'yes'
524 ],
525 'render_type' => 'ui',
526 'selectors' => [
527 '{{WRAPPER}}' => '--ui-e-avatar-v-offset: {{SIZE}}px;'
528 ],
529 ]
530 );
531 $this->end_popover();
532
533 $this->end_controls_section();
534 $this->start_controls_section(
535 'section_style_image',
536 [
537 'label' => __('Secondary Image', 'uicore-elements'),
538 'tab' => Controls_Manager::TAB_STYLE,
539 'condition' => [
540 'show_reviewer_image' => 'yes'
541 ]
542 ]
543 );
544 $this->add_control(
545 'image_size',
546 [
547 'label' => __('Size', 'uicore-elements'),
548 'type' => Controls_Manager::SLIDER,
549 'default' => [
550 'size' => 40,
551 'unit' => 'px'
552 ],
553 'range' => [
554 'px' => [
555 'min' => 10,
556 'max' => 500,
557 ],
558 ],
559 'selectors' => [
560 '{{WRAPPER}}' => '--ui-e-image-size: {{SIZE}}{{UNIT}};',
561 ],
562 ]
563 );
564 $this->add_control(
565 'image_spacing',
566 [
567 'label' => __('Spacing', 'uicore-elements'),
568 'type' => Controls_Manager::SLIDER,
569 'default' => [
570 'size' => 15,
571 ],
572 'selectors' => [
573 '{{WRAPPER}}' => '--ui-e-img-spacing: {{SIZE}}{{UNIT}}'
574 ],
575 'condition' => [
576 'layout!' => ['layout_2', 'layout_4', 'layout_6'],
577 ]
578 ]
579 );
580 $this->add_control(
581 'image_offset_toggle',
582 [
583 'label' => __('Offset', 'uicore-elements'),
584 'type' => Controls_Manager::POPOVER_TOGGLE,
585 'label_off' => __('None', 'uicore-elements'),
586 'label_on' => __('Custom', 'uicore-elements'),
587 'return_value' => 'yes',
588 ]
589 );
590 $this->start_popover();
591
592 $this->add_responsive_control(
593 'image_horizontal_offset',
594 [
595 'label' => __('Horizontal', 'uicore-elements'),
596 'type' => Controls_Manager::SLIDER,
597 'default' => [
598 'size' => 0,
599 ],
600 'tablet_default' => [
601 'size' => 0,
602 ],
603 'mobile_default' => [
604 'size' => 0,
605 ],
606 'range' => [
607 'px' => [
608 'min' => -200,
609 'max' => 200,
610 ],
611 ],
612 'condition' => [
613 'image_offset_toggle' => 'yes'
614 ],
615 'render_type' => 'ui',
616 'selectors' => [
617 '{{WRAPPER}}' => '--ui-e-img-h-offset: {{SIZE}}px;'
618 ],
619 ]
620 );
621 $this->add_responsive_control(
622 'image_vertical_offset',
623 [
624 'label' => __('Vertical', 'uicore-elements'),
625 'type' => Controls_Manager::SLIDER,
626 'default' => [
627 'size' => 0,
628 ],
629 'tablet_default' => [
630 'size' => 0,
631 ],
632 'mobile_default' => [
633 'size' => 0,
634 ],
635 'range' => [
636 'px' => [
637 'min' => -200,
638 'max' => 200,
639 ],
640 ],
641 'condition' => [
642 'image_offset_toggle' => 'yes'
643 ],
644 'render_type' => 'ui',
645 'selectors' => [
646 '{{WRAPPER}}' => '--ui-e-img-v-offset: {{SIZE}}px;'
647 ],
648 ]
649 );
650 $this->end_popover();
651 $this->end_controls_section();
652 }
653 function register_testimonial_name_controls()
654 {
655 $this->start_controls_section(
656 'section_style_name',
657 [
658 'label' => __('Name', 'uicore-elements'),
659 'tab' => Controls_Manager::TAB_STYLE,
660 'condition' => [
661 'show_reviewer_name' => 'yes',
662 ]
663 ]
664 );
665
666 $this->add_control(
667 'name_color',
668 [
669 'label' => __('Color', 'uicore-elements'),
670 'type' => Controls_Manager::COLOR,
671 'selectors' => [
672 '{{WRAPPER}} .ui-e-testimonial-name' => 'color: {{VALUE}};',
673 ],
674 ]
675 );
676 $this->add_control(
677 'name_hover_color',
678 [
679 'label' => __('Hover Color', 'uicore-elements'),
680 'type' => Controls_Manager::COLOR,
681 'selectors' => [
682 '{{WRAPPER}} .ui-e-item:hover .ui-e-testimonial-name' => 'color: {{VALUE}};',
683 ],
684 ]
685 );
686 $this->add_control(
687 'name_bottom_space',
688 [
689 'label' => __('Spacing', 'uicore-elements'),
690 'type' => Controls_Manager::SLIDER,
691 'range' => [
692 'px' => [
693 'min' => 0,
694 'max' => 100,
695 ],
696 ],
697 'selectors' => [
698 '{{WRAPPER}} .ui-e-testimonial-name' => 'padding-bottom: {{SIZE}}{{UNIT}};',
699 ],
700 ]
701 );
702 $this->add_group_control(
703 Group_Control_Typography::get_type(),
704 [
705 'name' => 'name_typography',
706 'selector' => '{{WRAPPER}} .ui-e-testimonial-name',
707 ]
708 );
709 $this->add_group_control(
710 Group_Control_Text_Shadow::get_type(),
711 [
712 'name' => 'name_shadow',
713 'label' => __( 'Text Shadow', 'uicore-elements' ),
714 'selector' => '{{WRAPPER}} .ui-e-testimonial-name',
715 ]
716 );
717
718 $this->end_controls_section();
719 }
720 function register_testimonial_job_controls()
721 {
722 $this->start_controls_section(
723 'section_style_job_title',
724 [
725 'label' => __('Job Title', 'uicore-elements'),
726 'tab' => Controls_Manager::TAB_STYLE,
727 'condition' => [
728 'show_reviewer_job_title' => 'yes',
729 ]
730 ]
731 );
732
733 $this->add_control(
734 'job_title_color',
735 [
736 'label' => __('Color', 'uicore-elements'),
737 'type' => Controls_Manager::COLOR,
738 'selectors' => [
739 '{{WRAPPER}} .ui-e-testimonial-job-title' => 'color: {{VALUE}};',
740 ],
741 ]
742 );
743 $this->add_control(
744 'job_title_hover_color',
745 [
746 'label' => __('Hover Color', 'uicore-elements'),
747 'type' => Controls_Manager::COLOR,
748 'selectors' => [
749 '{{WRAPPER}} .ui-e-item:hover .ui-e-testimonial-job-title' => 'color: {{VALUE}};',
750 ],
751 ]
752 );
753 $this->add_control(
754 'job_title_bottom_space',
755 [
756 'label' => __('Spacing', 'uicore-elements'),
757 'type' => Controls_Manager::SLIDER,
758 'range' => [
759 'px' => [
760 'min' => 0,
761 'max' => 100,
762 ],
763 ],
764 'default' => [
765 'size' => 10,
766 'unit' => 'px'
767 ],
768 'selectors' => [
769 '{{WRAPPER}} .ui-e-testimonial-job-title' => 'padding-bottom: {{SIZE}}{{UNIT}};',
770 ],
771 ]
772 );
773 $this->add_group_control(
774 Group_Control_Typography::get_type(),
775 [
776 'name' => 'job_title_typography',
777 'selector' => '{{WRAPPER}} .ui-e-testimonial-job-title',
778 ]
779 );
780
781 $this->end_controls_section();
782 }
783 function register_testimonial_text_controls()
784 {
785 $this->start_controls_section(
786 'section_style_text',
787 [
788 'label' => __('Text', 'uicore-elements'),
789 'tab' => Controls_Manager::TAB_STYLE,
790 'condition' => [
791 'show_reviewer_text' => 'yes',
792 ]
793 ]
794 );
795
796 $this->add_control(
797 'text_color',
798 [
799 'label' => __('Color', 'uicore-elements'),
800 'type' => Controls_Manager::COLOR,
801 'selectors' => [
802 '{{WRAPPER}} .ui-e-testimonial-text' => 'color: {{VALUE}};',
803 ],
804 ]
805 );
806 $this->add_control(
807 'text_hover_color',
808 [
809 'label' => __('Hover Color', 'uicore-elements'),
810 'type' => Controls_Manager::COLOR,
811 'selectors' => [
812 '{{WRAPPER}} .ui-e-item:hover .ui-e-testimonial-text' => 'color: {{VALUE}};',
813 ],
814 ]
815 );
816 $this->add_group_control(
817 Group_Control_Typography::get_type(),
818 [
819 'name' => 'text_typography',
820 'selector' => '{{WRAPPER}} .ui-e-testimonial-text',
821 ]
822 );
823 $this->add_control(
824 'text_bottom_space',
825 [
826 'label' => __('Spacing', 'uicore-elements'),
827 'type' => Controls_Manager::SLIDER,
828 'range' => [
829 'px' => [
830 'min' => 0,
831 'max' => 100,
832 ],
833 ],
834 'default' => [
835 'size' => 15,
836 'unit' => 'px'
837 ],
838 'selectors' => [
839 '{{WRAPPER}} .ui-e-testimonial-text' => 'padding-bottom: {{SIZE}}{{UNIT}};',
840 ],
841 ]
842 );
843
844 $this->end_controls_section();
845 }
846 function register_testimonial_rating_controls()
847 {
848 $this->start_controls_section(
849 'section_style_rating',
850 [
851 'label' => esc_html__('Rating', 'uicore-elements'),
852 'tab' => Controls_Manager::TAB_STYLE,
853 'condition' => [
854 'show_reviewer_rating' => 'yes',
855 ],
856 ]
857 );
858
859 // If SVG inline, we only need one color control because the semi-star bg color hack is not enabled with this experiment
860 if(Plugin::$instance->experiments->is_feature_active('e_font_icon_svg')) {
861 $this->add_control(
862 'active_rating_color',
863 [
864 'label' => esc_html__('Color', 'uicore-elements'),
865 'type' => Controls_Manager::COLOR,
866 'default' => '#ffab1a',
867 'selectors' => [
868 '{{WRAPPER}} .ui-e-testimonial-rating svg' => 'fill: {{VALUE}};',
869 ],
870 'condition' => [
871 'rating_type' => 'star',
872 ],
873 ]
874 );
875 // Without the experiment, two colors are usefull because <i> elements can be cut and printed as decimal-stars
876 } else {
877 $this->add_control(
878 'active_rating_color',
879 [
880 'label' => esc_html__('Active Color', 'uicore-elements'),
881 'type' => Controls_Manager::COLOR,
882 'default' => '#ffab1a',
883 'selectors' => [
884 '{{WRAPPER}} .ui-e-testimonial-rating .ui-e-marked i' => 'color: {{VALUE}};',
885 ],
886 'condition' => [
887 'rating_type' => 'star',
888 ],
889 ]
890 );
891 $this->add_control(
892 'rating_color',
893 [
894 'label' => esc_html__('Color', 'uicore-elements'),
895 'type' => Controls_Manager::COLOR,
896 'default' => '#ccd6df',
897 'selectors' => [
898 '{{WRAPPER}} .ui-e-testimonial-rating .ui-e-unmarked i' => 'color: {{VALUE}};',
899 ],
900 'condition' => [
901 'rating_type' => 'star',
902 ],
903 ]
904 );
905 }
906 $this->add_control(
907 'rating_number_color',
908 [
909 'label' => esc_html__('Color', 'uicore-elements'),
910 'type' => Controls_Manager::COLOR,
911 'selectors' => [
912 '{{WRAPPER}} .ui-e-testimonial-rating' => 'color: {{VALUE}};',
913 ],
914 'condition' => [
915 'rating_type' => 'number',
916 ],
917 ]
918 );
919 $this->add_control(
920 'rating_background',
921 [
922 'label' => __( 'Background Color', 'uicore-elements' ),
923 'type' => Controls_Manager::COLOR,
924 'selectors' => [
925 '{{WRAPPER}} .ui-e-testimonial-rating' => 'background-color: {{VALUE}};',
926 ],
927 'condition' => [
928 'rating_type' => 'star',
929 ],
930 ]
931 );
932 $this->add_control(
933 'rating_number_background',
934 [
935 'label' => __( 'Background Color', 'uicore-elements' ),
936 'type' => Controls_Manager::COLOR,
937 'selectors' => [
938 '{{WRAPPER}} .ui-e-testimonial-rating' => 'background-color: {{VALUE}};',
939 ],
940 'global' => [
941 'default' => Global_Colors::COLOR_PRIMARY,
942 ],
943 'condition' => [
944 'rating_type' => 'number',
945 ],
946 ]
947 );
948
949 $this->add_group_control(
950 Group_Control_Border::get_type(),
951 [
952 'name' => 'rating_border',
953 'selector' => '{{WRAPPER}} .ui-e-testimonial-rating',
954 ]
955 );
956 $this->add_control(
957 'rating_border_radius',
958 [
959 'label' => __( 'Border Radius', 'uicore-elements' ),
960 'type' => Controls_Manager::DIMENSIONS,
961 'size_units' => [ 'px', 'em', '%' ],
962 'selectors' => [
963 '{{WRAPPER}} .ui-e-testimonial-rating' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
964 ],
965 ]
966 );
967 $this->add_control(
968 'rating_padding',
969 [
970 'label' => esc_html__('Padding', 'uicore-elements'),
971 'type' => Controls_Manager::DIMENSIONS,
972 'size_units' => ['px', 'em', '%'],
973 'selectors' => [
974 '{{WRAPPER}} .ui-e-testimonial-rating' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
975 ],
976 ]
977 );
978 $this->add_control(
979 'rating_margin',
980 [
981 'label' => esc_html__('Margin', 'uicore-elements'),
982 'type' => Controls_Manager::DIMENSIONS,
983 'size_units' => ['px', '%'],
984 'selectors' => [
985 '{{WRAPPER}} .ui-e-testimonial-rating' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
986 ],
987 ]
988 );
989 $this->add_control(
990 'rating_size',
991 [
992 'label' => esc_html__('Size', 'uicore-elements'),
993 'type' => Controls_Manager::SLIDER,
994 'default' => [
995 'size' => 14,
996 'unit' => 'px'
997 ],
998 'selectors' => [
999 '{{WRAPPER}} .ui-e-testimonial-rating' => 'font-size: {{SIZE}}{{UNIT}};',
1000 '{{WRAPPER}} .ui-e-testimonial-rating svg' => 'width: {{SIZE}}{{UNIT}};',
1001 ],
1002 ]
1003 );
1004 $this->add_control(
1005 'rating_space_between',
1006 [
1007 'label' => esc_html__('Space Between', 'uicore-elements'),
1008 'type' => Controls_Manager::SLIDER,
1009 'range' => [
1010 'px' => [
1011 'min' => 0,
1012 'max' => 10,
1013 ],
1014 ],
1015 'selectors' => [
1016 '{{WRAPPER}} .ui-e-testimonial-rating .ui-e-icon + .ui-e-icon' => 'margin-left: {{SIZE}}{{UNIT}};', // star type
1017 '{{WRAPPER}} .ui-e-testimonial-rating span' => 'margin-right: {{SIZE}}{{UNIT}};', // number type
1018 ],
1019 'condition' => [
1020 'rating_type' => 'star',
1021 ],
1022 ]
1023 );
1024
1025 $this->end_controls_section();
1026 }
1027 function register_testimonial_divider_controls()
1028 {
1029 $this->start_controls_section(
1030 'section_style_divider',
1031 [
1032 'label' => __('Divider', 'uicore-elements'),
1033 'tab' => Controls_Manager::TAB_STYLE,
1034 'condition' => [
1035 'layout' => 'layout_3',
1036 'show_reviewer_divider' => 'yes'
1037 ]
1038 ]
1039 );
1040
1041 $this->add_control(
1042 'divider_color',
1043 [
1044 'label' => __('Color', 'uicore-elements'),
1045 'type' => Controls_Manager::COLOR,
1046 'selectors' => [
1047 '{{WRAPPER}} .ui-e-testimonial-divider' => 'border-color: {{VALUE}};',
1048 ],
1049 ]
1050 );
1051 $this->add_control(
1052 'divider_spacing',
1053 [
1054 'label' => __('Spacing', 'uicore-elements'),
1055 'type' => Controls_Manager::SLIDER,
1056 'default' => [
1057 'size' => 20,
1058 'unit' => 'px'
1059 ],
1060 'selectors' => [
1061 '{{WRAPPER}} .ui-e-testimonial-divider' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1062 ],
1063 ]
1064 );
1065
1066 $this->end_controls_section();
1067 }
1068
1069 // Register all Style Controls at once but Cards Controls since different widgets may/may not require an 'active' state
1070 function register_style_controls()
1071 {
1072 $this->register_testimonial_image_controls();
1073 $this->register_testimonial_name_controls();
1074 $this->register_testimonial_job_controls();
1075 $this->register_testimonial_text_controls();
1076 $this->register_testimonial_rating_controls();
1077 $this->register_testimonial_divider_controls();
1078 }
1079 // Register all Animation Controls at once
1080 function register_testimonial_animation_controls()
1081 {
1082 $this->TRAIT_register_entrance_animations_controls(); // animate each item
1083 // Hover Animations
1084 $this->TRAIT_register_hover_animation_control(
1085 'Item Hover Animation',
1086 [],
1087 ['underline']
1088 );
1089 $this->TRAIT_register_hover_animation_control(
1090 'Image Animations',
1091 ['show_reviewer_image' => 'yes'],
1092 ['underline']
1093 );
1094 $this->TRAIT_register_hover_animation_control(
1095 'Avatar Animations',
1096 ['show_reviewer_avatar' => 'yes'],
1097 ['underline']
1098 );
1099 $this->TRAIT_register_hover_animation_control(
1100 'Text Animations',
1101 ['show_reviewer_text' => 'yes'],
1102 ['zoom', 'underline']
1103 );
1104 $this->TRAIT_register_hover_animation_control(
1105 'Name Animations',
1106 ['show_reviewer_name' => 'yes'],
1107 ['zoom']
1108 );
1109 $this->TRAIT_register_hover_animation_control(
1110 'Job Animations',
1111 ['show_reviewer_job_title' => 'yes'],
1112 ['zoom']
1113 );
1114 $this->TRAIT_register_hover_animation_control(
1115 'Rating Animations',
1116 ['show_reviewer_rating' => 'yes'],
1117 ['underline']
1118 );
1119 }
1120 // Register specific Controls that can't be called in blocks because are positioned differently on widgets, or used only by specific testimonial types, such as grid or carousel
1121 function register_specific_testimonial_controls($arg)
1122 {
1123
1124 switch ($arg){
1125 case 'layout' :
1126 $this->add_control(
1127 'layout',
1128 [
1129 'label' => esc_html__( 'Layout', 'uicore-elements' ),
1130 'type' => Controls_Manager::SELECT,
1131 'default' => 'layout_1',
1132 'options' => [
1133 'layout_1' => esc_html__( 'Layout 1', 'uicore-elements' ),
1134 'layout_2' => esc_html__( 'Layout 2', 'uicore-elements' ),
1135 'layout_3' => esc_html__( 'Layout 3', 'uicore-elements' ),
1136 'layout_4' => esc_html__( 'Layout 4', 'uicore-elements' ),
1137 'layout_5' => esc_html__( 'Layout 5', 'uicore-elements' ),
1138 'layout_6' => esc_html__( 'Layout 6', 'uicore-elements' ),
1139 ],
1140 'render_type' => 'template',
1141 'prefix_class' => 'ui-e-',
1142 'frontend_available' => true
1143 ]
1144 );
1145 break;
1146
1147 case 'item_animations' :
1148 $this->add_control(
1149 'item_hover_animation',
1150 [
1151 'label' => esc_html__( 'Item Hover Animation', 'uicore-elements' ),
1152 'type' => Controls_Manager::SELECT,
1153 'default' => '',
1154 'label_block' => true,
1155 'options' => $this->get_animations(),
1156 ]
1157 );
1158 break;
1159 }
1160
1161 }
1162
1163 // HTML Rendering Functions
1164 function render_reviewer_avatar($item)
1165 {
1166 $settings = $this->get_settings_for_display();
1167
1168 if ( ! $settings['show_reviewer_avatar'] ) {
1169 return;
1170 }
1171
1172 ?>
1173 <div class="ui-e-testimonial-avatar <?php esc_attr_e($settings['avatar_animations']);?>">
1174 <?php
1175 $avatar_url = Group_Control_Image_Size::get_attachment_image_src($item['avatar']['id'], 'avatar_media_size', $settings);
1176 if (!$avatar_url) {
1177 printf('<img src="%1$s" alt="%2$s">', $item['avatar']['url'], esc_html($item['reviewer_name']));
1178 } else {
1179 print(wp_get_attachment_image(
1180 $item['avatar']['id'],
1181 $settings['avatar_media_size_size'],
1182 false,
1183 [
1184 'alt' => esc_html($item['reviewer_name'])
1185 ]
1186 ));
1187 }
1188 ?>
1189 </div>
1190 <?php
1191 }
1192 function render_reviewer_secondary_image($item)
1193 {
1194 $settings = $this->get_settings_for_display();
1195
1196 $thumb_url = Group_Control_Image_Size::get_attachment_image_src($item['image']['id'], 'image_media_size', $settings);
1197
1198 if ( ! $settings['show_reviewer_image'] || !$thumb_url ) {
1199 return;
1200 }
1201
1202 ?>
1203 <div class="ui-e-testimonial-image <?php esc_attr_e($settings['image_animations']);?>">
1204 <?php
1205 if ($thumb_url) {
1206 print(wp_get_attachment_image(
1207 $item['image']['id'],
1208 $settings['image_media_size_size'],
1209 false,
1210 []
1211 ));
1212 }
1213 ?>
1214 </div>
1215 <?php
1216 }
1217 function render_reviewer_name($item)
1218 {
1219 $settings = $this->get_settings_for_display();
1220
1221 if ( ! $settings['show_reviewer_name'] ) {
1222 return;
1223 }
1224
1225 ?>
1226 <?php if ( $item['reviewer_name'] ) : ?>
1227 <<?php esc_html_e($settings['review_name_tag']); ?> class="ui-e-testimonial-name <?php esc_attr_e($settings['name_animations']);?>">
1228 <span><?php echo wp_kses_post($item['reviewer_name']);?></span>
1229 </<?php esc_html_e($settings['review_name_tag']); ?>>
1230 <?php endif; ?>
1231 <?php
1232 }
1233 function render_reviewer_job_title($item)
1234 {
1235 $settings = $this->get_settings_for_display();
1236
1237 if ( ! $settings['show_reviewer_job_title'] ) {
1238 return;
1239 }
1240
1241 ?>
1242 <?php if ( $item['reviewer_job_title'] ) : ?>
1243 <div class="ui-e-testimonial-job-title <?php esc_attr_e($settings['job_animations']);?>">
1244 <span><?php esc_html_e($item['reviewer_job_title']); ?></span>
1245 </div>
1246 <?php endif; ?>
1247 <?php
1248 }
1249 function render_review_text($item)
1250 {
1251 $settings = $this->get_settings_for_display();
1252
1253 if ( ! $settings['show_reviewer_text'] ) {
1254 return;
1255 }
1256
1257 ?>
1258 <?php if ( $item['review_text'] ) : ?>
1259 <div class="ui-e-testimonial-text <?php esc_attr_e($settings['text_animations']);?>">
1260 <?php echo wp_kses_post( $item['review_text'] ); ?>
1261 </div>
1262 <?php endif; ?>
1263 <?php
1264 }
1265 function render_review_rating($item)
1266 {
1267
1268 $settings = $this->get_settings_for_display();
1269
1270 $ID = $item['_id'];
1271 if ( !$settings['show_reviewer_rating'] ) {
1272 return;
1273 }
1274
1275 $rating_value = $item['rating_number']['size']; // get rating value
1276
1277 if ($settings['rating_type'] == 'star') {
1278
1279 ?>
1280 <div class="ui-e-testimonial-rating <?php esc_attr_e($settings['rating_animations']);?>">
1281 <?php
1282
1283 $rating_scale = 5;
1284
1285 if ( '' === $rating_value ) {
1286 $rating_value = $rating_scale;
1287 }
1288
1289 $rating_value = floatval( $rating_value );
1290 $rating_value = round( $rating_value, 2 );
1291
1292 for ( $index = 1; $index <= $rating_scale; $index++ ) {
1293
1294 // SVG Method (uses font-awesome library for it's half-star icon, and can prints full and half-star)
1295 if (Plugin::$instance->experiments->is_feature_active('e_font_icon_svg')){
1296 ?>
1297 <div class="ui-e-icon">
1298 <?php
1299 if ( $rating_value >= $index ) {
1300 echo Icons_Manager::try_get_icon_html( ['value' => 'fas fa-star', 'library' => 'fa-solid'], [ 'aria-hidden' => 'true' ] );
1301 } elseif ( intval( ceil( $rating_value ) ) === $index ) {
1302 echo Icons_Manager::try_get_icon_html( ['value' => 'fas fa-star-half', 'library' => 'fa-solid'], ['aria-hidden' => 'true'] );
1303 }
1304 ?>
1305 </div>
1306 <?php
1307 // Font Icon Method (uses elementor library and can print decimal specific stars)
1308 } else {
1309
1310 if ( $rating_value >= $index ) {
1311 $width = '100%'; // Full star if rate superior to current loop
1312 } elseif ( intval( ceil( $rating_value ) ) === $index ) {
1313 $width = ( $rating_value - ( $index - 1 ) ) * 100 . '%'; // Semi-star, calculating the width based on the decimal value
1314 } else {
1315 $width = '0%'; // No star if rate inferior to current loop
1316 }
1317
1318 // Creates the atts
1319 $this->add_render_attribute( "icon_marked_$ID" . "_$index", [
1320 'class' => 'ui-e-marked',
1321 ] );
1322 if ( '100%' !== $width ) {
1323 $this->add_render_attribute( "icon_marked_$ID" . "_$index", [
1324 'style' => '--ui-e-rate-width: ' . $width . ';',
1325 ] );
1326 }
1327
1328 ?>
1329 <div class="ui-e-icon">
1330 <div <?php $this->print_render_attribute_string( "icon_marked_$ID" . "_$index",); ?>>
1331 <?php echo Icons_Manager::try_get_icon_html( ['value' => 'eicon-star','library' => 'eicons'], [ 'aria-hidden' => 'true' ] );?>
1332 </div>
1333 <div class="ui-e-unmarked">
1334 <?php echo Icons_Manager::try_get_icon_html( ['value' => 'eicon-star','library' => 'eicons'], [ 'aria-hidden' => 'true' ] );?>
1335 </div>
1336 </div>
1337 <?php
1338 }
1339 }
1340 ?>
1341 </div>
1342 <?php
1343
1344 } else { // number type rating
1345 ?>
1346 <div class="ui-e-testimonial-rating number">
1347 <span><?php esc_html_e($rating_value);?></span>
1348 </div>
1349 <?php
1350 }
1351 }
1352 function render_review_divider()
1353 {
1354 $settings = $this->get_settings_for_display();
1355
1356 if ( !$settings['show_reviewer_divider'] ) {
1357 return;
1358 }
1359
1360 ?>
1361 <span class="ui-e-testimonial-divider"></span>
1362 <?php
1363 }
1364 function render_review_item($item, $layout, $entranceAnimation = true)
1365 {
1366 $settings = $this->get_settings_for_display();
1367
1368 // Atts used by some layouts
1369 $atts = [
1370 'inline' => $settings['image_inline'] == 'yes' ? true : false,
1371 ];
1372
1373 // Checks for animations
1374 $entrance = $entranceAnimation && $settings['animate_items'] == 'ui-e-grid-animate' ? 'elementor-invisible' : '';
1375 $hover = isset($settings['item_hover_animation']) ? $settings['item_hover_animation'] : null;
1376 $animations = sprintf('%s %s', $entrance, $hover);
1377
1378 ?>
1379
1380 <div class="ui-e-wrp">
1381 <div class="ui-e-animations-wrp <?php echo esc_attr($animations);?>">
1382 <div class="ui-e-item-wrp">
1383 <div class="ui-e-item">
1384 <?php
1385 switch($layout){
1386 case 'layout_2' :
1387 $this->render_layout_2($item, $atts);
1388 break;
1389 case 'layout_3' :
1390 $this->render_layout_3($item, $atts);
1391 break;
1392 case 'layout_4' :
1393 $this->render_layout_4($item);
1394 break;
1395 case 'layout_5' :
1396 $this->render_layout_5($item);
1397 break;
1398 case 'layout_6' :
1399 $this->render_layout_6($item);
1400 break;
1401 default:
1402 $this->render_layout_1($item, $atts);
1403 break;
1404 }
1405 ?>
1406 </div>
1407 </div>
1408 </div>
1409 </div>
1410 <?php
1411 }
1412
1413 // Layouts
1414 function render_layout_1($item, $atts)
1415 {
1416
1417 $this->render_reviewer_secondary_image($item);
1418 ?>
1419 <div class="ui-e-content">
1420
1421 <?php $this->render_review_text($item); ?>
1422
1423 <?php if ($atts['inline']) : ?>
1424
1425 <div class="ui-e-testimonial-flex">
1426 <?php $this->render_reviewer_avatar($item); ?>
1427 <div class="ui-e-inner-content">
1428 <?php
1429 $this->render_reviewer_name($item);
1430 $this->render_reviewer_job_title($item);
1431 $this->render_review_rating($item);
1432 ?>
1433 </div>
1434 </div>
1435
1436 <?php else :
1437 $this->render_reviewer_avatar($item);
1438 $this->render_reviewer_name($item);
1439 $this->render_reviewer_job_title($item);
1440 $this->render_review_rating($item);
1441 endif; ?>
1442
1443 </div>
1444 <?php
1445 }
1446 function render_layout_2($item, $atts)
1447 {
1448 ?>
1449 <div class="ui-e-content">
1450
1451 <?php if ($atts['inline']) : ?>
1452 <div class="ui-e-testimonial-flex">
1453 <?php $this->render_reviewer_avatar($item); ?>
1454 <div class="ui-e-inner-content">
1455 <?php
1456 $this->render_reviewer_name($item);
1457 $this->render_reviewer_job_title($item);
1458 $this->render_review_rating($item);
1459 ?>
1460 </div>
1461 </div>
1462
1463 <?php else :
1464 $this->render_reviewer_avatar($item);
1465 $this->render_reviewer_name($item);
1466 $this->render_reviewer_job_title($item);
1467 $this->render_review_rating($item);
1468 endif; ?>
1469
1470 <?php $this->render_review_text($item); ?>
1471 </div>
1472
1473 <?php
1474 $this->render_reviewer_secondary_image($item);
1475 }
1476 function render_layout_3($item, $atts)
1477 {
1478 $this->render_reviewer_secondary_image($item);
1479 ?>
1480 <div class="ui-e-content">
1481
1482 <?php
1483 $this->render_review_rating($item);
1484 $this->render_review_text($item);
1485 $this->render_review_divider();
1486 ?>
1487
1488 <?php if ($atts['inline']) :?>
1489
1490 <div class="ui-e-testimonial-flex">
1491 <?php $this->render_reviewer_avatar($item); ?>
1492 <div class="ui-e-inner-content">
1493 <?php $this->render_reviewer_name($item); ?>
1494 <?php $this->render_reviewer_job_title($item); ?>
1495 </div>
1496 </div>
1497
1498 <?php else :
1499 $this->render_reviewer_avatar($item);
1500 $this->render_reviewer_name($item);
1501 $this->render_reviewer_job_title($item);
1502 endif; ?>
1503 </div>
1504 <?php
1505 }
1506 function render_layout_4($item)
1507 {
1508 ?>
1509 <div class="ui-e-testimonial-flex">
1510 <?php $this->render_reviewer_avatar($item); ?>
1511 <?php $this->render_reviewer_secondary_image($item); ?>
1512 </div>
1513
1514 <div class="ui-e-content">
1515 <?php
1516 $this->render_review_text($item);
1517 $this->render_reviewer_name($item);
1518 $this->render_reviewer_job_title($item);
1519 $this->render_review_rating($item);
1520 ?>
1521 </div>
1522 <?php
1523 }
1524 function render_layout_5($item)
1525 {
1526 ?>
1527 <div class="ui-e-testimonial-flex">
1528 <div class="ui-e-content">
1529
1530 <?php
1531 $this->render_reviewer_secondary_image($item);
1532 $this->render_review_text($item);
1533 $this->render_review_rating($item);
1534 $this->render_reviewer_name($item);
1535 $this->render_reviewer_job_title($item);
1536 ?>
1537 </div>
1538 <?php $this->render_reviewer_avatar($item); ?>
1539 </div>
1540 <?php
1541 }
1542 function render_layout_6($item)
1543 {
1544 ?>
1545 <div class="ui-e-testimonial-flex">
1546
1547 <?php $this->render_reviewer_avatar($item); ?>
1548
1549 <div class="ui-e-content">
1550 <?php
1551 $this->render_reviewer_name($item);
1552 $this->render_reviewer_job_title($item);
1553 $this->render_review_rating($item);
1554 $this->render_review_text($item);
1555 $this->render_reviewer_secondary_image($item);
1556 ?>
1557 </div>
1558 </div>
1559 <?php
1560 }
1561 }