PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.3.17
UiCore Elements – Free widgets and templates for Elementor v1.3.17
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 / widgets / custom-slider.php

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

93 lines 2.2 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 use Elementor\Plugin;
6
7 defined('ABSPATH') || exit();
8
9 /**
10 * Custom Slider
11 *
12 * @author Lucas Marini Falbo <lucas@uicore.co>
13 * @since 1.0.7
14 */
15
16 class CustomSlider extends CustomCarousel
17 {
18
19 public function get_name()
20 {
21 return 'uicore-custom-slider';
22 }
23 public function get_title()
24 {
25 return esc_html__('Custom Slider', 'uicore-elements');
26 }
27 public function get_icon()
28 {
29 return 'eicon-slides ui-e-widget';
30 }
31 public function get_categories()
32 {
33 return ['uicore'];
34 }
35 public function get_keywords()
36 {
37 return ['slide', 'carousel', 'nested'];
38 }
39 public function get_styles()
40 {
41 $styles = [
42 'custom-slider',
43 'carousel',
44 'animation', // hover animations
45 'entrance', // entrance basic style
46 ];
47 if (!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')) {
48 $styles['e-animations'] = [ // entrance animations
49 'external' => true,
50 ];
51 }
52 return $styles;
53 }
54
55 protected function register_controls(bool $is_slider = false)
56 {
57
58 parent::register_controls(true); // inherit original controls and enables slider height
59 $this->TRAIT_update_slider_controls();
60
61 // Change default border radius to zero
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 ],
73 ]
74 );
75
76 // Decrease default item padding
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 );
90 }
91 }
92 \Elementor\Plugin::instance()->widgets_manager->register(new CustomSlider());
93