templates
2 years ago
Accordion.php
2 years ago
Alerts_Box.php
2 years ago
Animated_Heading.php
2 years ago
Before_after.php
2 years ago
Blog_Grid.php
2 years ago
Buttons.php
2 years ago
Cheat_sheet.php
2 years ago
Counter.php
2 years ago
Fullscreen_Slider.php
2 years ago
Icon_box.php
2 years ago
Instagram.php
2 years ago
Integrations.php
2 years ago
List_Item.php
2 years ago
Marquee_Slides.php
2 years ago
Pricing_Table_Switcher.php
2 years ago
Pricing_Table_Tabs.php
2 years ago
Skill_Showcase.php
2 years ago
Tabs.php
2 years ago
Team_Carousel.php
2 years ago
Testimonial.php
2 years ago
Timeline.php
2 years ago
Video_Playlist.php
2 years ago
Video_Popup.php
2 years ago
Fullscreen_Slider.php
205 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Use namespace to avoid conflict |
| 4 | */ |
| 5 | |
| 6 | namespace SPEL\Widgets; |
| 7 | |
| 8 | use Elementor\Group_Control_Typography; |
| 9 | use Elementor\Widget_Base; |
| 10 | use Elementor\Controls_Manager; |
| 11 | |
| 12 | // Exit if accessed directly |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Class Team |
| 19 | * @package spider\Widgets |
| 20 | * @since 1.0.0 |
| 21 | */ |
| 22 | class Fullscreen_Slider extends Widget_Base { |
| 23 | |
| 24 | public function get_name() { |
| 25 | return 'spe_fullscreen_slider'; // ID of the widget (Don't change this name) |
| 26 | } |
| 27 | |
| 28 | public function get_title() { |
| 29 | return esc_html__( 'Fullscreen Slider', 'spider-elements' ); |
| 30 | } |
| 31 | |
| 32 | public function get_icon() { |
| 33 | return 'eicon-counter spel-icon'; |
| 34 | } |
| 35 | |
| 36 | public function get_keywords() { |
| 37 | return [ 'spider', 'Counter', 'Progress bar', ]; |
| 38 | } |
| 39 | |
| 40 | public function get_categories() { |
| 41 | return [ 'spider-elements' ]; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Name: get_style_depends() |
| 46 | * Desc: Register the required CSS dependencies for the frontend. |
| 47 | */ |
| 48 | public function get_style_depends() { |
| 49 | return [ 'spel-main', 'swiper' ]; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Name: get_script_depends() |
| 54 | * Desc: Register the required JS dependencies for the frontend. |
| 55 | */ |
| 56 | public function get_script_depends() { |
| 57 | return [ 'spel-el-widgets' ]; |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * Name: register_controls() |
| 62 | * Desc: Register controls for these widgets |
| 63 | * Params: no params |
| 64 | * Return: @void |
| 65 | * Since: @1.0.0 |
| 66 | * Package: @spider-elements |
| 67 | * Author: spider-themes |
| 68 | */ |
| 69 | protected function register_controls() { |
| 70 | $this->elementor_content_control(); |
| 71 | $this->counter_style_control(); |
| 72 | } |
| 73 | |
| 74 | |
| 75 | /** |
| 76 | * Name: elementor_content_control() |
| 77 | * Desc: Register the Content Tab output on the Elementor editor. |
| 78 | * Params: no params |
| 79 | * Return: @void |
| 80 | * Since: @1.0.0 |
| 81 | * Package: @spider-elements |
| 82 | * Author: spider-themes |
| 83 | */ |
| 84 | |
| 85 | public function elementor_content_control() { |
| 86 | //==================== Select Preset Skin ====================// |
| 87 | $this->start_controls_section( |
| 88 | 'counter_preset', [ |
| 89 | 'label' => __( 'Preset Skin', 'spider-elements' ), |
| 90 | ] |
| 91 | ); |
| 92 | |
| 93 | $this->add_control( |
| 94 | 'style', |
| 95 | [ |
| 96 | 'label' => esc_html__( 'Style', 'spider-elements' ), |
| 97 | 'type' => Controls_Manager::CHOOSE, |
| 98 | 'options' => [ |
| 99 | '1' => [ |
| 100 | 'icon' => 'counter1', |
| 101 | 'title' => esc_html__( '01 : Fullscreen Slider', 'spider-elements' ) |
| 102 | ], |
| 103 | ], |
| 104 | 'default' => '1', |
| 105 | ] |
| 106 | ); |
| 107 | |
| 108 | $this->end_controls_section(); // End Preset Skin |
| 109 | |
| 110 | //=================== SecCountertion ===================// |
| 111 | $this->start_controls_section( |
| 112 | 'sec_sliders', [ |
| 113 | 'label' => esc_html__( 'Sliders', 'spider-elements' ), |
| 114 | ] |
| 115 | ); |
| 116 | |
| 117 | $slider = new \Elementor\Repeater(); |
| 118 | $slider->add_control( |
| 119 | 'title', [ |
| 120 | 'label' => esc_html__( 'Title', 'textdomain' ), |
| 121 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 122 | 'default' => 'Capturing Beauty <br /><span class="text-stroke">Photo</span>', |
| 123 | 'label_block' => true, |
| 124 | ] |
| 125 | ); |
| 126 | |
| 127 | $slider->add_control( |
| 128 | 'subtitle', [ |
| 129 | 'label' => esc_html__( 'Subtitle', 'textdomain' ), |
| 130 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 131 | 'label_block' => true, |
| 132 | ] |
| 133 | ); |
| 134 | |
| 135 | $slider->add_control( |
| 136 | 'btn_label', [ |
| 137 | 'label' => esc_html__( 'Button Label', 'textdomain' ), |
| 138 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 139 | 'default' => __( 'View More', 'spider-elements' ), |
| 140 | ] |
| 141 | ); |
| 142 | |
| 143 | $slider->add_control( |
| 144 | 'btn_url', [ |
| 145 | 'label' => esc_html__( 'Button Label', 'textdomain' ), |
| 146 | 'type' => \Elementor\Controls_Manager::URL, |
| 147 | 'default' => [ |
| 148 | 'url' => '#' |
| 149 | ] |
| 150 | ] |
| 151 | ); |
| 152 | |
| 153 | $slider->add_control( |
| 154 | 'bg_img', [ |
| 155 | 'label' => esc_html__( 'Background Image', 'textdomain' ), |
| 156 | 'type' => \Elementor\Controls_Manager::MEDIA, |
| 157 | ] |
| 158 | ); |
| 159 | |
| 160 | $this->add_control( |
| 161 | 'sliders', [ |
| 162 | 'label' => esc_html__( 'Add Slides', 'textdomain' ), |
| 163 | 'type' => \Elementor\Controls_Manager::REPEATER, |
| 164 | 'fields' => $slider->get_controls(), |
| 165 | 'title_field' => '{{{ title }}}', |
| 166 | 'prevent_empty' => false |
| 167 | ] |
| 168 | ); |
| 169 | |
| 170 | |
| 171 | $this->end_controls_section(); |
| 172 | |
| 173 | } |
| 174 | |
| 175 | |
| 176 | /** |
| 177 | * Name: counter_style_control() |
| 178 | * Desc: Register the Style Tab output on the Elementor editor. |
| 179 | * Params: no params |
| 180 | * Return: @void |
| 181 | * Since: @1.0.0 |
| 182 | * Package: @spider-elements |
| 183 | * Author: spider-themes |
| 184 | */ |
| 185 | public function counter_style_control() { |
| 186 | |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Name: elementor_render() |
| 191 | * Desc: Render the widget output on the frontend. |
| 192 | * Params: no params |
| 193 | * Return: @void |
| 194 | * Since: @1.0.0 |
| 195 | * Package: @spider-elements |
| 196 | * Author: spider-themes |
| 197 | */ |
| 198 | protected function render() { |
| 199 | $settings = $this->get_settings_for_display(); |
| 200 | extract( $settings ); //extract all settings array to variables converted to name of key |
| 201 | |
| 202 | //================= Template Parts =================// |
| 203 | include "templates/fullscreeen-slider/slider-1.php"; |
| 204 | } |
| 205 | } |