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 +28 -40 1.2.0 → 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
@@ -39,16 +40,24 @@
39 40 $styles[] = 'testimonial-slider';
40 41
41 42 return $styles;
42 43 }
43 - protected function register_controls() {
44 + protected function register_controls()
45 + {
44 46
45 - parent::register_controls(); // keep original controls
47 + parent::register_controls();
48 + $this->TRAIT_update_slider_controls();
46 49
47 - // Control Updates
48 - $this->update_control('h_alignment', ['default' => 'center']);
50 + // Alignment adjustment
51 + $this->update_control(
52 + 'h_alignment',
53 + [
54 + 'default' => 'center'
55 + ]
56 + );
49 57 // Default avatar size with one slide visible per time is too big, needs a decrease
50 - $this->update_control( 'avatar_size',
58 + $this->update_control(
59 + 'avatar_size',
51 60 [
52 61 'devices' => ['desktop', 'tablet', 'mobile'],
53 62 'default' => [
54 63 'size' => 10,
@@ -64,42 +73,21 @@
64 73 ],
65 74 ]
66 75 );
67 76 // Change default border radius to zero
68 - $this->update_control( 'item_border_radius', [
69 - 'default' => [
70 - 'top' => 0,
71 - 'right' => 0,
72 - 'bottom' => 0,
73 - 'left' => 0,
74 - 'unit' => 'px',
75 - 'isLinked' => true,
76 - ],
77 - ]);
78 - // Add special animation slide
79 - $this->update_control('animation_style',[
80 - 'default' => 'fade',
81 - 'options' => [
82 - 'coverflow' => esc_html__('Coverflow', 'uicore-elements'),
83 - 'fade' => esc_html__('Fade', 'uicore-elements'),
84 - 'cards' => esc_html__('Cards', 'uicore-elements'),
85 - 'flip' => esc_html__('Flip', 'uicore-elements'),
86 - 'creative' => esc_html__('Creative', 'uicore-elements'),
87 - 'stacked' => esc_html__('Stacked', 'uicore-elements'),
88 - 'circular_avatar' => esc_html__('Circular Avatar', '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 + ],
89 89 ]
90 - ]);
91 -
92 - // Remove item entrance and hover animation
93 - $this->remove_control('animate_items');
94 - $this->remove_control('item_hover_animation');
95 -
96 - // Remove controls that are meant for carousel, not slide type widgets
97 - $this->remove_responsive_control('slides_per_view');
98 - $this->remove_control('show_hidden');
99 - $this->remove_control('fade_edges');
100 - $this->remove_control('fade_edges_alert');
101 - $this->remove_control('match_height');
102 - $this->remove_control('carousel_gap');
90 + );
103 91 }
104 92 }
105 -\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialSlider());
93 +\Elementor\Plugin::instance()->widgets_manager->register(new TestimonialSlider());