# uicore-elements/1.2.4/includes/widgets/custom-slider.php

UiCore Elements – Free widgets and templates for Elementor, version 1.2.4. 89 lines.

- Page: https://pluginprobe.com/plugins/uicore-elements/1.2.4/code/includes/widgets/custom-slider.php
- Raw: https://pluginprobe.com/plugins/uicore-elements/1.2.4/raw/includes/widgets/custom-slider.php
- Modified: 2025-04-30T13:46:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/uicore-elements/1.2.4/code/includes/widgets/custom-slider.php#L10-L20`.

```php
<?php
namespace UiCoreElements;
use Elementor\Plugin;

defined('ABSPATH') || exit();

/**
 * Custom Slider
 *
 * @author Lucas Marini Falbo <lucas@uicore.co>
 * @since 1.0.7
 */

class CustomSlider extends CustomCarousel {

    public function get_name()
    {
        return 'uicore-custom-slider';
    }
    public function get_title()
    {
        return esc_html__('Custom Slider', 'uicore-elements');
    }
    public function get_icon()
    {
        return 'eicon-slides ui-e-widget';
    }
    public function get_categories()
    {
        return ['uicore'];
    }
    public function get_keywords()
    {
        return ['slide', 'carousel', 'nested'];
    }
    public function get_styles()
    {
        $styles = [
            'custom-slider',
            'carousel',
            'animation', // hover animations
            'entrance', // entrance basic style
        ];
        if(!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')){
            $styles['e-animations'] = [ // entrance animations
                'external' => true,
            ];
        }
        return $styles;
    }

    protected function register_controls(bool $is_slider = false)
    {

        parent::register_controls(true); // inherit original controls and enables slider height
        $this->TRAIT_update_slider_controls();

        // Change default border radius to zero
        $this->update_control(
            'item_border_radius',
            [
                'default' => [
                    'top' => 0,
                    'right' => 0,
                    'bottom' => 0,
                    'left' => 0,
                    'unit' => 'px',
                    'isLinked' => true,
                ],
            ]
        );

        // Decrease default item padding
        $this->update_control(
            'item_padding',
            [
                'default' => [
                    'top' => 25,
                    'right' => 25,
                    'bottom' => 25,
                    'left' => 25,
                    'unit' => 'px',
                    'isLinked' => true,
                ],
            ]
        );
    }
}
\Elementor\Plugin::instance()->widgets_manager->register(new CustomSlider());
```
