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/custom-slider.php +33 -42 1.2.0 → 1.3.18 View file →
@@ -1,6 +1,8 @@
1 1 <?php
2 +
2 3 namespace UiCoreElements;
4 +
3 5 use Elementor\Plugin;
4 6
5 7 defined('ABSPATH') || exit();
6 8
@@ -10,9 +12,10 @@
10 12 * @author Lucas Marini Falbo <[email protected]>
11 13 * @since 1.0.7
12 14 */
13 15
14 -class CustomSlider extends CustomCarousel {
16 +class CustomSlider extends CustomCarousel
17 +{
15 18
16 19 public function get_name()
17 20 {
18 21 return 'uicore-custom-slider';
@@ -40,9 +43,9 @@
40 43 'carousel',
41 44 'animation', // hover animations
42 45 'entrance', // entrance basic style
43 46 ];
44 - if(!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')){
47 + if (!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')) {
45 48 $styles['e-animations'] = [ // entrance animations
46 49 'external' => true,
47 50 ];
48 51 }
@@ -52,50 +55,38 @@
52 55 protected function register_controls(bool $is_slider = false)
53 56 {
54 57
55 58 parent::register_controls(true); // inherit original controls and enables slider height
59 + $this->TRAIT_update_slider_controls();
56 60
57 61 // Change default border radius to zero
58 - $this->update_control( 'item_border_radius', [
59 - 'default' => [
60 - 'top' => 0,
61 - 'right' => 0,
62 - 'bottom' => 0,
63 - 'left' => 0,
64 - 'unit' => 'px',
65 - 'isLinked' => true,
66 - ],
67 - ]);
68 - // Add special animation slide
69 - $this->update_control('animation_style',[
70 - 'default' => 'fade',
71 - 'options' => [
72 - 'coverflow' => esc_html__('Coverflow', 'uicore-elements'),
73 - 'fade' => esc_html__('Fade', 'uicore-elements'),
74 - 'cards' => esc_html__('Cards', 'uicore-elements'),
75 - 'flip' => esc_html__('Flip', 'uicore-elements'),
76 - 'creative' => esc_html__('Creative', 'uicore-elements'),
77 - 'stacked' => esc_html__('Stacked', 'uicore-elements'),
62 + $this->update_control(
63 + 'item_border_radius',
64 + [
65 + 'default' => [
66 + 'top' => 0,
67 + 'right' => 0,
68 + 'bottom' => 0,
69 + 'left' => 0,
70 + 'unit' => 'px',
71 + 'isLinked' => true,
72 + ],
78 73 ]
79 - ]);
74 + );
75 +
80 76 // Decrease default item padding
81 - $this->update_control('item_padding', [
82 - 'default' => [
83 - 'top' => 25,
84 - 'right' => 25,
85 - 'bottom' => 25,
86 - 'left' => 25,
87 - 'unit' => 'px',
88 - 'isLinked' => true,
89 - ],
90 - ]);
91 -
92 - // Remove controls that are meant for carousel, not slide type widgets
93 - $this->remove_responsive_control('slides_per_view');
94 - $this->remove_control('show_hidden');
95 - $this->remove_control('fade_edges');
96 - $this->remove_control('fade_edges_alert');
97 - $this->remove_control('match_height');
98 - $this->remove_control('carousel_gap');
77 + $this->update_control(
78 + 'item_padding',
79 + [
80 + 'default' => [
81 + 'top' => 25,
82 + 'right' => 25,
83 + 'bottom' => 25,
84 + 'left' => 25,
85 + 'unit' => 'px',
86 + 'isLinked' => true,
87 + ],
88 + ]
89 + );
99 90 }
100 91 }
101 -\Elementor\Plugin::instance()->widgets_manager->register(new CustomSlider());
92 +\Elementor\Plugin::instance()->widgets_manager->register(new CustomSlider());