PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.3.18
UiCore Elements – Free widgets and templates for Elementor v1.3.18
1.3.18 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 All 42 releases
uicore-elements / includes / widgets / testimonial-slider.php

testimonial-slider.php in UiCore Elements – Free widgets and templates for Elementor 1.3.18, at includes/widgets/testimonial-slider.php

94 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UiCoreElements;
4
5 defined('ABSPATH') || exit();
6
7 /**
8 * Testimonial Slider
9 *
10 * Use Testimonial Carousel as base
11 *
12 * @author Lucas Marini Falbo <[email protected]>
13 * @since 1.0.1
14 */
15
16 class TestimonialSlider extends TestimonialCarousel
17 {
18 public function get_name()
19 {
20 return 'uicore-testimonial-slider';
21 }
22 public function get_title()
23 {
24 return esc_html__('Testimonial Slider', 'uicore-elements');
25 }
26 public function get_icon()
27 {
28 return 'eicon-testimonial ui-e-widget';
29 }
30 public function get_keywords()
31 {
32 return ['testimonial', 'review', 'services', 'cards', 'box', 'client', 'slider'];
33 }
34 public function get_styles()
35 {
36 $styles = parent::get_styles();
37
38 // replace 'testimonial-carousel' for 'testimonial-slider'
39 unset($styles['testimonial-carousel']);
40 $styles[] = 'testimonial-slider';
41
42 return $styles;
43 }
44 protected function register_controls()
45 {
46
47 parent::register_controls();
48 $this->TRAIT_update_slider_controls();
49
50 // Alignment adjustment
51 $this->update_control(
52 'h_alignment',
53 [
54 'default' => 'center'
55 ]
56 );
57 // Default avatar size with one slide visible per time is too big, needs a decrease
58 $this->update_control(
59 'avatar_size',
60 [
61 'devices' => ['desktop', 'tablet', 'mobile'],
62 'default' => [
63 'size' => 10,
64 'unit' => '%'
65 ],
66 'tablet_default' => [
67 'size' => 15,
68 'unit' => '%'
69 ],
70 'mobile_default' => [
71 'size' => 40,
72 'unit' => '%'
73 ],
74 ]
75 );
76 // Change default border radius to zero
77 $this->update_control(
78 '
79 item_border_radius',
80 [
81 'default' => [
82 'top' => 0,
83 'right' => 0,
84 'bottom' => 0,
85 'left' => 0,
86 'unit' => 'px',
87 'isLinked' => true,
88 ],
89 ]
90 );
91 }
92 }
93 \Elementor\Plugin::instance()->widgets_manager->register(new TestimonialSlider());
94