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
← All changes | includes/widgets/testimonial-slider.php +34 -48 1.0.4 → 1.3.18 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 namespace UiCoreElements;
3 4
4 5 defined('ABSPATH') || exit();
5 6
@@ -31,28 +32,32 @@
31 32 return ['testimonial', 'review', 'services', 'cards', 'box', 'client', 'slider'];
32 33 }
33 34 public function get_styles()
34 35 {
35 - $styles = [
36 - 'testimonial-slider',
37 - 'animation', // hover animations
38 - 'entrance', // entrance basic style
39 - ];
40 - if(!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')){
41 - $styles['e-animations'] = [ // entrance animations
42 - 'external' => true,
43 - ];
44 - }
36 + $styles = parent::get_styles();
37 +
38 + // replace 'testimonial-carousel' for 'testimonial-slider'
39 + unset($styles['testimonial-carousel']);
40 + $styles[] = 'testimonial-slider';
41 +
45 42 return $styles;
46 43 }
47 - protected function register_controls() {
44 + protected function register_controls()
45 + {
48 46
49 - parent::register_controls(); // keep original controls
47 + parent::register_controls();
48 + $this->TRAIT_update_slider_controls();
50 49
51 - // Control Updates
52 - $this->update_control('h_alignment', ['default' => 'center']);
50 + // Alignment adjustment
51 + $this->update_control(
52 + 'h_alignment',
53 + [
54 + 'default' => 'center'
55 + ]
56 + );
53 57 // Default avatar size with one slide visible per time is too big, needs a decrease
54 - $this->update_control( 'avatar_size',
58 + $this->update_control(
59 + 'avatar_size',
55 60 [
56 61 'devices' => ['desktop', 'tablet', 'mobile'],
57 62 'default' => [
58 63 'size' => 10,
@@ -68,40 +73,21 @@
68 73 ],
69 74 ]
70 75 );
71 76 // Change default border radius to zero
72 - $this->update_control( 'item_border_radius', [
73 - 'default' => [
74 - 'top' => 0,
75 - 'right' => 0,
76 - 'bottom' => 0,
77 - 'left' => 0,
78 - 'unit' => 'px',
79 - 'isLinked' => true,
80 - ],
81 - ]);
82 - // Add special animation slide
83 - $this->update_control('animation_style',[
84 - 'default' => 'fade',
85 - 'options' => [
86 - 'coverflow' => esc_html__('Coverflow', 'uicore-elements'),
87 - 'fade' => esc_html__('Fade', 'uicore-elements'),
88 - 'cards' => esc_html__('Cards', 'uicore-elements'),
89 - 'flip' => esc_html__('Flip', 'uicore-elements'),
90 - 'creative' => esc_html__('Creative', 'uicore-elements'),
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 + ],
91 89 ]
92 - ]);
93 -
94 - // Remove item entrance and hover animation
95 - $this->remove_control('animate_items');
96 - $this->remove_control('item_hover_animation');
97 -
98 - // Remove controls that are meant for carousel, not slide type widgets
99 - $this->remove_responsive_control('slides_per_view');
100 - $this->remove_control('show_hidden');
101 - $this->remove_control('fade_edges');
102 - $this->remove_control('fade_edges_alert');
103 - $this->remove_control('match_height');
104 - $this->remove_control('carousel_gap');
90 + );
105 91 }
106 92 }
107 -\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialSlider());
93 +\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialSlider());