| 1 |
<?php |
| 2 |
|
| 3 |
namespace Borderless\Widgets; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 6 |
|
| 7 |
use Elementor\Widget_Base; |
| 8 |
use Elementor\Core\Kits\Documents\Tabs\Global_Colors; |
| 9 |
use Elementor\Core\Kits\Documents\Tabs\Global_Typography; |
| 10 |
use Elementor\Controls_Manager; |
| 11 |
use Elementor\Group_Control_Border; |
| 12 |
use Elementor\Group_Control_Box_Shadow; |
| 13 |
use Elementor\Group_Control_Image_Size; |
| 14 |
use \Elementor\Group_Control_Typography; |
| 15 |
use \Elementor\Core\Schemes\Typography; |
| 16 |
use \Elementor\Group_Control_Background; |
| 17 |
use \Elementor\Group_Control_Css_Filter; |
| 18 |
use \Elementor\Core\Schemes\Color; |
| 19 |
use \Elementor\Repeater; |
| 20 |
use Elementor\Utils; |
| 21 |
|
| 22 |
class Slider extends Widget_Base { |
| 23 |
|
| 24 |
public function get_name() { |
| 25 |
return 'borderless-elementor-slider'; |
| 26 |
} |
| 27 |
|
| 28 |
public function get_title() { |
| 29 |
return esc_html__('Slider', 'borderless'); |
| 30 |
} |
| 31 |
|
| 32 |
public function get_icon() { |
| 33 |
return 'borderless-icon-slider'; |
| 34 |
} |
| 35 |
|
| 36 |
public function get_categories() { |
| 37 |
return [ 'borderless' ]; |
| 38 |
} |
| 39 |
|
| 40 |
public function get_keywords() |
| 41 |
{ |
| 42 |
return [ |
| 43 |
'slide', |
| 44 |
'slider', |
| 45 |
'slides', |
| 46 |
'borderless slide', |
| 47 |
'borderless slider', |
| 48 |
'borderless slides', |
| 49 |
'borderless' |
| 50 |
]; |
| 51 |
} |
| 52 |
|
| 53 |
public function get_style_depends() { |
| 54 |
return |
| 55 |
[ |
| 56 |
'elementor-widget-slider', |
| 57 |
'borderless-elementor-flickity-style', |
| 58 |
'borderless-elementor-flickity-fullscreen-style', |
| 59 |
'borderless-elementor-flickity-fade-style' |
| 60 |
]; |
| 61 |
} |
| 62 |
|
| 63 |
public function get_script_depends() { |
| 64 |
return |
| 65 |
[ |
| 66 |
'borderless-elementor-flickity-script', |
| 67 |
'borderless-elementor-flickity-fullscreen-script', |
| 68 |
'borderless-elementor-flickity-fade-script', |
| 69 |
'borderless-elementor-flickity-as-nav-for-script' |
| 70 |
]; |
| 71 |
} |
| 72 |
|
| 73 |
protected function _register_controls() { |
| 74 |
|
| 75 |
|
| 76 |
/*-----------------------------------------------------------------------------------*/ |
| 77 |
/* *. Slider/Slides - Content |
| 78 |
/*-----------------------------------------------------------------------------------*/ |
| 79 |
|
| 80 |
$this->start_controls_section( |
| 81 |
'borderless_elementor_section_slider_slides', |
| 82 |
[ |
| 83 |
'label' => esc_html__( 'Slides', 'borderless' ), |
| 84 |
'tab' => Controls_Manager::TAB_CONTENT, |
| 85 |
] |
| 86 |
); |
| 87 |
|
| 88 |
$repeater = new Repeater(); |
| 89 |
|
| 90 |
$repeater->start_controls_tabs( 'slides_repeater' ); |
| 91 |
|
| 92 |
$repeater->start_controls_tab( 'borderless_elementor_slider_background_tab', [ 'label' => __( 'Background', 'borderless' ) ] ); |
| 93 |
|
| 94 |
$repeater->add_responsive_control( |
| 95 |
'borderless_elementor_slider_slide_background_color', |
| 96 |
[ |
| 97 |
'label' => __( 'Color', 'borderless' ), |
| 98 |
'type' => Controls_Manager::COLOR, |
| 99 |
'default' => '#0000FF', |
| 100 |
'selectors' => [ |
| 101 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-color: {{VALUE}}', |
| 102 |
], |
| 103 |
] |
| 104 |
); |
| 105 |
|
| 106 |
$repeater->add_responsive_control( |
| 107 |
'borderless_elementor_slider_slide_background_image', |
| 108 |
[ |
| 109 |
'label' => __( 'Image', 'Background Control', 'borderless' ), |
| 110 |
'type' => Controls_Manager::MEDIA, |
| 111 |
'selectors' => [ |
| 112 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-image: url({{URL}})', |
| 113 |
], |
| 114 |
] |
| 115 |
); |
| 116 |
|
| 117 |
$repeater->add_responsive_control( |
| 118 |
'borderless_elementor_slider_slide_background_image_position', |
| 119 |
[ |
| 120 |
'label' => __( 'Position', 'Background Control', 'borderless' ), |
| 121 |
'type' => Controls_Manager::SELECT, |
| 122 |
'default' => 'center center', |
| 123 |
'options' => [ |
| 124 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 125 |
'center top' => __( 'Center Top', 'Background Control', 'borderless' ), |
| 126 |
'center center' => __( 'Center Center', 'Background Control', 'borderless' ), |
| 127 |
'center bottom' => __( 'Center Bottom', 'Background Control', 'borderless' ), |
| 128 |
'left top' => __( 'Left Top', 'Background Control', 'borderless' ), |
| 129 |
'left center' => __( 'Left Center', 'Background Control', 'borderless' ), |
| 130 |
'left bottom' => __( 'Left Bottom', 'Background Control', 'borderless' ), |
| 131 |
'right top' => __( 'Right Top', 'Background Control', 'borderless' ), |
| 132 |
'right center' => __( 'Right Center', 'Background Control', 'borderless' ), |
| 133 |
'right bottom' => __( 'Right Bottom', 'Background Control', 'borderless' ), |
| 134 |
], |
| 135 |
'selectors' => [ |
| 136 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-position: {{VALUE}}', |
| 137 |
], |
| 138 |
'conditions' => [ |
| 139 |
'terms' => [ |
| 140 |
[ |
| 141 |
'name' => 'borderless_elementor_slider_slide_background_image[url]', |
| 142 |
'operator' => '!=', |
| 143 |
'value' => '', |
| 144 |
], |
| 145 |
], |
| 146 |
], |
| 147 |
] |
| 148 |
); |
| 149 |
|
| 150 |
$repeater->add_responsive_control( |
| 151 |
'borderless_elementor_slider_slide_background_image_attachment', |
| 152 |
[ |
| 153 |
'label' => __( 'Attachment', 'Background Control', 'borderless' ), |
| 154 |
'type' => Controls_Manager::SELECT, |
| 155 |
'default' => 'no-repeat', |
| 156 |
'options' => [ |
| 157 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 158 |
'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ), |
| 159 |
'repeat' => __( 'Default', 'Background Control', 'borderless' ), |
| 160 |
'scroll' => __( 'Scroll', 'Background Control', 'borderless' ), |
| 161 |
'fixed' => __( 'Fixed', 'Background Control', 'borderless' ), |
| 162 |
], |
| 163 |
'selectors' => [ |
| 164 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-attachment: {{VALUE}}', |
| 165 |
], |
| 166 |
'conditions' => [ |
| 167 |
'terms' => [ |
| 168 |
[ |
| 169 |
'name' => 'borderless_elementor_slider_slide_background_image[url]', |
| 170 |
'operator' => '!=', |
| 171 |
'value' => '', |
| 172 |
], |
| 173 |
], |
| 174 |
], |
| 175 |
] |
| 176 |
); |
| 177 |
|
| 178 |
$repeater->add_responsive_control( |
| 179 |
'borderless_elementor_slider_slide_background_image_repeat', |
| 180 |
[ |
| 181 |
'label' => __( 'Repeat', 'Background Control', 'borderless' ), |
| 182 |
'type' => Controls_Manager::SELECT, |
| 183 |
'default' => 'no-repeat', |
| 184 |
'options' => [ |
| 185 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 186 |
'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ), |
| 187 |
'repeat' => __( 'Repeat', 'Background Control', 'borderless' ), |
| 188 |
'repeat-x' => __( 'Repeat-x', 'Background Control', 'borderless' ), |
| 189 |
'repeat-y' => __( 'Repeat-y', 'Background Control', 'borderless' ), |
| 190 |
], |
| 191 |
'selectors' => [ |
| 192 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-repeat: {{VALUE}}', |
| 193 |
], |
| 194 |
'conditions' => [ |
| 195 |
'terms' => [ |
| 196 |
[ |
| 197 |
'name' => 'borderless_elementor_slider_slide_background_image[url]', |
| 198 |
'operator' => '!=', |
| 199 |
'value' => '', |
| 200 |
], |
| 201 |
], |
| 202 |
], |
| 203 |
] |
| 204 |
); |
| 205 |
|
| 206 |
$repeater->add_responsive_control( |
| 207 |
'borderless_elementor_slider_slide_background_image_size', |
| 208 |
[ |
| 209 |
'label' => __( 'Size', 'Background Control', 'borderless' ), |
| 210 |
'type' => Controls_Manager::SELECT, |
| 211 |
'default' => 'cover', |
| 212 |
'options' => [ |
| 213 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 214 |
'cover' => __( 'Cover', 'Background Control', 'borderless' ), |
| 215 |
'contain' => __( 'Contain', 'Background Control', 'borderless' ), |
| 216 |
'auto' => __( 'Auto', 'Background Control', 'borderless' ), |
| 217 |
], |
| 218 |
'selectors' => [ |
| 219 |
'{{WRAPPER}} {{CURRENT_ITEM}}' => 'background-size: {{VALUE}}', |
| 220 |
], |
| 221 |
'conditions' => [ |
| 222 |
'terms' => [ |
| 223 |
[ |
| 224 |
'name' => 'borderless_elementor_slider_slide_background_image[url]', |
| 225 |
'operator' => '!=', |
| 226 |
'value' => '', |
| 227 |
], |
| 228 |
], |
| 229 |
], |
| 230 |
] |
| 231 |
); |
| 232 |
|
| 233 |
$repeater->add_group_control( |
| 234 |
Group_Control_Css_Filter::get_type(), |
| 235 |
[ |
| 236 |
'name' => 'borderless_elementor_slider_slide_background_image_css_filters', |
| 237 |
'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}', |
| 238 |
'conditions' => [ |
| 239 |
'terms' => [ |
| 240 |
[ |
| 241 |
'name' => 'borderless_elementor_slider_slide_background_image[url]', |
| 242 |
'operator' => '!=', |
| 243 |
'value' => '', |
| 244 |
], |
| 245 |
], |
| 246 |
], |
| 247 |
] |
| 248 |
); |
| 249 |
|
| 250 |
$repeater->add_control( |
| 251 |
'borderless_elementor_slider_slide_background_image_ken_burns', |
| 252 |
[ |
| 253 |
'label' => __( 'Ken Burns Effect', 'borderless' ), |
| 254 |
'type' => Controls_Manager::SWITCHER, |
| 255 |
'default' => '', |
| 256 |
'conditions' => [ |
| 257 |
'terms' => [ |
| 258 |
[ |
| 259 |
'name' => 'borderless_elementor_slider_slide_background_image[url]', |
| 260 |
'operator' => '!=', |
| 261 |
'value' => '', |
| 262 |
], |
| 263 |
], |
| 264 |
], |
| 265 |
] |
| 266 |
); |
| 267 |
|
| 268 |
$repeater->add_control( |
| 269 |
'borderless_elementor_slider_slide_background_image_zoom_direction', |
| 270 |
[ |
| 271 |
'label' => __( 'Zoom Direction', 'borderless' ), |
| 272 |
'type' => Controls_Manager::SELECT, |
| 273 |
'default' => 'in', |
| 274 |
'options' => [ |
| 275 |
'in' => __( 'In', 'borderless' ), |
| 276 |
'out' => __( 'Out', 'borderless' ), |
| 277 |
], |
| 278 |
'conditions' => [ |
| 279 |
'terms' => [ |
| 280 |
[ |
| 281 |
'name' => 'borderless_elementor_slider_slide_background_image_ken_burns', |
| 282 |
'operator' => '!=', |
| 283 |
'value' => '', |
| 284 |
], |
| 285 |
], |
| 286 |
], |
| 287 |
] |
| 288 |
); |
| 289 |
|
| 290 |
$repeater->add_control( |
| 291 |
'borderless_elementor_slider_slide_background_overlay', |
| 292 |
[ |
| 293 |
'label' => __( 'Background Overlay', 'borderless' ), |
| 294 |
'type' => Controls_Manager::SWITCHER, |
| 295 |
'default' => '', |
| 296 |
'separator' => 'before', |
| 297 |
] |
| 298 |
); |
| 299 |
|
| 300 |
$repeater->add_responsive_control( |
| 301 |
'borderless_elementor_slider_slide_background_color_overlay', |
| 302 |
[ |
| 303 |
'label' => __( 'Color', 'borderless' ), |
| 304 |
'type' => Controls_Manager::COLOR, |
| 305 |
'default' => '#00000030', |
| 306 |
'selectors' => [ |
| 307 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-color: {{VALUE}}', |
| 308 |
], |
| 309 |
'conditions' => [ |
| 310 |
'terms' => [ |
| 311 |
[ |
| 312 |
'name' => 'borderless_elementor_slider_slide_background_overlay', |
| 313 |
'value' => 'yes', |
| 314 |
], |
| 315 |
], |
| 316 |
], |
| 317 |
] |
| 318 |
); |
| 319 |
|
| 320 |
$repeater->add_responsive_control( |
| 321 |
'borderless_elementor_slider_slide_background_image_overlay', |
| 322 |
[ |
| 323 |
'label' => __( 'Image', 'Background Control', 'borderless' ), |
| 324 |
'type' => Controls_Manager::MEDIA, |
| 325 |
'selectors' => [ |
| 326 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-image: url({{URL}})', |
| 327 |
], |
| 328 |
'conditions' => [ |
| 329 |
'terms' => [ |
| 330 |
[ |
| 331 |
'name' => 'borderless_elementor_slider_slide_background_overlay', |
| 332 |
'value' => 'yes', |
| 333 |
], |
| 334 |
], |
| 335 |
], |
| 336 |
] |
| 337 |
); |
| 338 |
|
| 339 |
$repeater->add_responsive_control( |
| 340 |
'borderless_elementor_slider_slide_background_image_overlay_opacity', |
| 341 |
[ |
| 342 |
'label' => esc_html__( 'Opacity', 'borderless' ), |
| 343 |
'type' => Controls_Manager::SLIDER, |
| 344 |
'default' => [ |
| 345 |
'size' => .5, |
| 346 |
], |
| 347 |
'range' => [ |
| 348 |
'px' => [ |
| 349 |
'max' => 1, |
| 350 |
'step' => 0.01, |
| 351 |
], |
| 352 |
], |
| 353 |
'selectors' => [ |
| 354 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'opacity: {{SIZE}};', |
| 355 |
], |
| 356 |
'conditions' => [ |
| 357 |
'terms' => [ |
| 358 |
[ |
| 359 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 360 |
'operator' => '!=', |
| 361 |
'value' => '', |
| 362 |
], |
| 363 |
], |
| 364 |
], |
| 365 |
] |
| 366 |
); |
| 367 |
|
| 368 |
$repeater->add_responsive_control( |
| 369 |
'borderless_elementor_slider_slide_background_image_position_overlay', |
| 370 |
[ |
| 371 |
'label' => __( 'Position', 'Background Control', 'borderless' ), |
| 372 |
'type' => Controls_Manager::SELECT, |
| 373 |
'default' => 'center center', |
| 374 |
'options' => [ |
| 375 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 376 |
'center top' => __( 'Center Top', 'Background Control', 'borderless' ), |
| 377 |
'center center' => __( 'Center Center', 'Background Control', 'borderless' ), |
| 378 |
'center bottom' => __( 'Center Bottom', 'Background Control', 'borderless' ), |
| 379 |
'left top' => __( 'Left Top', 'Background Control', 'borderless' ), |
| 380 |
'left center' => __( 'Left Center', 'Background Control', 'borderless' ), |
| 381 |
'left bottom' => __( 'Left Bottom', 'Background Control', 'borderless' ), |
| 382 |
'right top' => __( 'Right Top', 'Background Control', 'borderless' ), |
| 383 |
'right center' => __( 'Right Center', 'Background Control', 'borderless' ), |
| 384 |
'right bottom' => __( 'Right Bottom', 'Background Control', 'borderless' ), |
| 385 |
], |
| 386 |
'selectors' => [ |
| 387 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-position: {{VALUE}}', |
| 388 |
], |
| 389 |
'conditions' => [ |
| 390 |
'terms' => [ |
| 391 |
[ |
| 392 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 393 |
'operator' => '!=', |
| 394 |
'value' => '', |
| 395 |
], |
| 396 |
], |
| 397 |
], |
| 398 |
] |
| 399 |
); |
| 400 |
|
| 401 |
$repeater->add_responsive_control( |
| 402 |
'borderless_elementor_slider_slide_background_image_attachment_overlay', |
| 403 |
[ |
| 404 |
'label' => __( 'Attachment', 'Background Control', 'borderless' ), |
| 405 |
'type' => Controls_Manager::SELECT, |
| 406 |
'default' => 'no-repeat', |
| 407 |
'options' => [ |
| 408 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 409 |
'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ), |
| 410 |
'repeat' => __( 'Default', 'Background Control', 'borderless' ), |
| 411 |
'scroll' => __( 'Scroll', 'Background Control', 'borderless' ), |
| 412 |
'fixed' => __( 'Fixed', 'Background Control', 'borderless' ), |
| 413 |
], |
| 414 |
'selectors' => [ |
| 415 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-attachment: {{VALUE}}', |
| 416 |
], |
| 417 |
'conditions' => [ |
| 418 |
'terms' => [ |
| 419 |
[ |
| 420 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 421 |
'operator' => '!=', |
| 422 |
'value' => '', |
| 423 |
], |
| 424 |
], |
| 425 |
], |
| 426 |
] |
| 427 |
); |
| 428 |
|
| 429 |
$repeater->add_responsive_control( |
| 430 |
'borderless_elementor_slider_slide_background_image_repeat_overlay', |
| 431 |
[ |
| 432 |
'label' => __( 'Repeat', 'Background Control', 'borderless' ), |
| 433 |
'type' => Controls_Manager::SELECT, |
| 434 |
'default' => 'no-repeat', |
| 435 |
'options' => [ |
| 436 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 437 |
'no-repeat' => __( 'No Repeat', 'Background Control', 'borderless' ), |
| 438 |
'repeat' => __( 'Repeat', 'Background Control', 'borderless' ), |
| 439 |
'repeat-x' => __( 'Repeat-x', 'Background Control', 'borderless' ), |
| 440 |
'repeat-y' => __( 'Repeat-y', 'Background Control', 'borderless' ), |
| 441 |
], |
| 442 |
'selectors' => [ |
| 443 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-repeat: {{VALUE}}', |
| 444 |
], |
| 445 |
'conditions' => [ |
| 446 |
'terms' => [ |
| 447 |
[ |
| 448 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 449 |
'operator' => '!=', |
| 450 |
'value' => '', |
| 451 |
], |
| 452 |
], |
| 453 |
], |
| 454 |
] |
| 455 |
); |
| 456 |
|
| 457 |
$repeater->add_responsive_control( |
| 458 |
'borderless_elementor_slider_slide_background_image_size_overlay', |
| 459 |
[ |
| 460 |
'label' => __( 'Size', 'Background Control', 'borderless' ), |
| 461 |
'type' => Controls_Manager::SELECT, |
| 462 |
'default' => 'cover', |
| 463 |
'options' => [ |
| 464 |
'' => __( 'Default', 'Background Control', 'borderless' ), |
| 465 |
'cover' => __( 'Cover', 'Background Control', 'borderless' ), |
| 466 |
'contain' => __( 'Contain', 'Background Control', 'borderless' ), |
| 467 |
'auto' => __( 'Auto', 'Background Control', 'borderless' ), |
| 468 |
], |
| 469 |
'selectors' => [ |
| 470 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'background-size: {{VALUE}}', |
| 471 |
], |
| 472 |
'conditions' => [ |
| 473 |
'terms' => [ |
| 474 |
[ |
| 475 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 476 |
'operator' => '!=', |
| 477 |
'value' => '', |
| 478 |
], |
| 479 |
], |
| 480 |
], |
| 481 |
] |
| 482 |
); |
| 483 |
|
| 484 |
$repeater->add_group_control( |
| 485 |
Group_Control_Css_Filter::get_type(), |
| 486 |
[ |
| 487 |
'name' => 'borderless_elementor_slider_slide_background_image_css_filters_overlay', |
| 488 |
'selector' => '{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay', |
| 489 |
'conditions' => [ |
| 490 |
'terms' => [ |
| 491 |
[ |
| 492 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 493 |
'operator' => '!=', |
| 494 |
'value' => '', |
| 495 |
], |
| 496 |
], |
| 497 |
], |
| 498 |
] |
| 499 |
); |
| 500 |
|
| 501 |
$repeater->add_control( |
| 502 |
'borderless_elementor_slider_slide_background_image_overlay_blend_mode', |
| 503 |
[ |
| 504 |
'label' => __( 'Blend Mode', 'borderless' ), |
| 505 |
'type' => Controls_Manager::SELECT, |
| 506 |
'options' => [ |
| 507 |
'' => __( 'Normal', 'borderless' ), |
| 508 |
'multiply' => 'Multiply', |
| 509 |
'screen' => 'Screen', |
| 510 |
'overlay' => 'Overlay', |
| 511 |
'darken' => 'Darken', |
| 512 |
'lighten' => 'Lighten', |
| 513 |
'color-dodge' => 'Color Dodge', |
| 514 |
'color-burn' => 'Color Burn', |
| 515 |
'hue' => 'Hue', |
| 516 |
'saturation' => 'Saturation', |
| 517 |
'color' => 'Color', |
| 518 |
'exclusion' => 'Exclusion', |
| 519 |
'luminosity' => 'Luminosity', |
| 520 |
], |
| 521 |
'conditions' => [ |
| 522 |
'terms' => [ |
| 523 |
[ |
| 524 |
'name' => 'borderless_elementor_slider_slide_background_image_overlay[url]', |
| 525 |
'operator' => '!=', |
| 526 |
'value' => '', |
| 527 |
], |
| 528 |
], |
| 529 |
], |
| 530 |
'selectors' => [ |
| 531 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-background-overlay' => 'mix-blend-mode: {{VALUE}}', |
| 532 |
], |
| 533 |
] |
| 534 |
); |
| 535 |
|
| 536 |
$repeater->end_controls_tab(); |
| 537 |
|
| 538 |
$repeater->start_controls_tab( 'borderless_elementor_slider_content_tab', [ 'label' => __( 'Content', 'borderless' ) ] ); |
| 539 |
|
| 540 |
$repeater->add_control( |
| 541 |
'borderless_elementor_slider_slide_title', |
| 542 |
[ |
| 543 |
'label' => __( 'Title', 'borderless' ), |
| 544 |
'type' => Controls_Manager::TEXT, |
| 545 |
'default' => __( 'Slide', 'borderless' ), |
| 546 |
] |
| 547 |
); |
| 548 |
|
| 549 |
$repeater->add_control( |
| 550 |
'borderless_elementor_slider_slide_description', |
| 551 |
[ |
| 552 |
'label' => __( 'Description', 'borderless' ), |
| 553 |
'type' => Controls_Manager::TEXTAREA, |
| 554 |
'default' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'borderless' ), |
| 555 |
] |
| 556 |
); |
| 557 |
|
| 558 |
$repeater->add_control( |
| 559 |
'borderless_elementor_slider_slide_button_text', |
| 560 |
[ |
| 561 |
'label' => esc_html__( 'Button Text', 'borderless'), |
| 562 |
'type' => Controls_Manager::TEXT, |
| 563 |
'default' => esc_html__( 'View More', 'borderless' ), |
| 564 |
'dynamic' => [ 'active' => true ], |
| 565 |
'separator' => 'before', |
| 566 |
] |
| 567 |
); |
| 568 |
|
| 569 |
$repeater->add_control( |
| 570 |
'borderless_elementor_slider_slide_button_link', |
| 571 |
array( |
| 572 |
'label' => esc_html__( 'Button Link', 'borderless' ), |
| 573 |
'type' => Controls_Manager::URL, |
| 574 |
'placeholder' => 'https://your-link.com', |
| 575 |
'default' => array( |
| 576 |
'url' => '', |
| 577 |
), |
| 578 |
'dynamic' => array( 'active' => true ), |
| 579 |
) |
| 580 |
); |
| 581 |
|
| 582 |
$repeater->add_control( |
| 583 |
'borderless_elementor_slider_slide_id', |
| 584 |
[ |
| 585 |
'label' => __( 'CSS ID', 'borderless' ), |
| 586 |
'type' => Controls_Manager::TEXT, |
| 587 |
'dynamic' => [ 'active' => true ], |
| 588 |
'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'borderless' ), |
| 589 |
'style_transfer' => false, |
| 590 |
'separator' => 'before', |
| 591 |
] |
| 592 |
); |
| 593 |
|
| 594 |
$repeater->add_control( |
| 595 |
'borderless_elementor_slider_slide_classes', |
| 596 |
[ |
| 597 |
'label' => __( 'CSS Classes', 'borderless' ), |
| 598 |
'type' => Controls_Manager::TEXT, |
| 599 |
'dynamic' => [ 'active' => true ], |
| 600 |
'title' => esc_html__( 'Add your custom class WITHOUT the dot. e.g: my-class', 'borderless' ), |
| 601 |
] |
| 602 |
); |
| 603 |
|
| 604 |
$repeater->end_controls_tab(); |
| 605 |
|
| 606 |
$repeater->start_controls_tab( 'borderless_elementor_slider_style_tab', [ 'label' => __( 'Style', 'borderless' ) ] ); |
| 607 |
|
| 608 |
$repeater->add_control( |
| 609 |
'borderless_elementor_slider_slide_custom_style', |
| 610 |
[ |
| 611 |
'label' => __( 'Custom', 'borderless' ), |
| 612 |
'type' => Controls_Manager::SWITCHER, |
| 613 |
'description' => __( 'Set custom style that will only affect this specific slide.', 'borderless' ), |
| 614 |
] |
| 615 |
); |
| 616 |
|
| 617 |
$repeater->add_control( |
| 618 |
'borderless_elementor_slider_slides_horizontal_position_custom', |
| 619 |
[ |
| 620 |
'label' => __( 'Horizontal Position', 'borderless' ), |
| 621 |
'type' => Controls_Manager::CHOOSE, |
| 622 |
'default' => 'center', |
| 623 |
'options' => [ |
| 624 |
'flex-start' => [ |
| 625 |
'title' => __( 'Left', 'borderless' ), |
| 626 |
'icon' => 'eicon-h-align-left', |
| 627 |
], |
| 628 |
'center' => [ |
| 629 |
'title' => __( 'Center', 'borderless' ), |
| 630 |
'icon' => 'eicon-h-align-center', |
| 631 |
], |
| 632 |
'flex-end' => [ |
| 633 |
'title' => __( 'Right', 'borderless' ), |
| 634 |
'icon' => 'eicon-h-align-right', |
| 635 |
], |
| 636 |
], |
| 637 |
'default' => 'center', |
| 638 |
'selectors' => [ |
| 639 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-content' => 'align-items: {{VALUE}}', |
| 640 |
], |
| 641 |
'conditions' => [ |
| 642 |
'terms' => [ |
| 643 |
[ |
| 644 |
'name' => 'borderless_elementor_slider_slide_custom_style', |
| 645 |
'value' => 'yes', |
| 646 |
], |
| 647 |
], |
| 648 |
], |
| 649 |
] |
| 650 |
); |
| 651 |
|
| 652 |
$repeater->add_control( |
| 653 |
'borderless_elementor_slider_slides_vertical_position_custom', |
| 654 |
[ |
| 655 |
'label' => __( 'Vertical Position', 'borderless' ), |
| 656 |
'type' => Controls_Manager::CHOOSE, |
| 657 |
'default' => 'middle', |
| 658 |
'options' => [ |
| 659 |
'flex-start' => [ |
| 660 |
'title' => __( 'Top', 'borderless' ), |
| 661 |
'icon' => 'eicon-v-align-top', |
| 662 |
], |
| 663 |
'center' => [ |
| 664 |
'title' => __( 'Middle', 'borderless' ), |
| 665 |
'icon' => 'eicon-v-align-middle', |
| 666 |
], |
| 667 |
'flex-end' => [ |
| 668 |
'title' => __( 'Bottom', 'borderless' ), |
| 669 |
'icon' => 'eicon-v-align-bottom', |
| 670 |
], |
| 671 |
], |
| 672 |
'default' => 'center', |
| 673 |
'selectors' => [ |
| 674 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-content' => 'justify-content: {{VALUE}}', |
| 675 |
], |
| 676 |
'conditions' => [ |
| 677 |
'terms' => [ |
| 678 |
[ |
| 679 |
'name' => 'borderless_elementor_slider_slide_custom_style', |
| 680 |
'value' => 'yes', |
| 681 |
], |
| 682 |
], |
| 683 |
], |
| 684 |
] |
| 685 |
); |
| 686 |
|
| 687 |
$repeater->add_control( |
| 688 |
'borderless_elementor_slider_slides_text_align_custom', |
| 689 |
[ |
| 690 |
'label' => __( 'Text Align', 'borderless' ), |
| 691 |
'type' => Controls_Manager::CHOOSE, |
| 692 |
'options' => [ |
| 693 |
'left' => [ |
| 694 |
'title' => __( 'Left', 'borderless' ), |
| 695 |
'icon' => 'eicon-text-align-left', |
| 696 |
], |
| 697 |
'center' => [ |
| 698 |
'title' => __( 'Center', 'borderless' ), |
| 699 |
'icon' => 'eicon-text-align-center', |
| 700 |
], |
| 701 |
'right' => [ |
| 702 |
'title' => __( 'Right', 'borderless' ), |
| 703 |
'icon' => 'eicon-text-align-right', |
| 704 |
], |
| 705 |
], |
| 706 |
'default' => 'center', |
| 707 |
'selectors' => [ |
| 708 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-slide-content' => 'text-align: {{VALUE}}', |
| 709 |
], |
| 710 |
'conditions' => [ |
| 711 |
'terms' => [ |
| 712 |
[ |
| 713 |
'name' => 'borderless_elementor_slider_slide_custom_style', |
| 714 |
'value' => 'yes', |
| 715 |
], |
| 716 |
], |
| 717 |
], |
| 718 |
] |
| 719 |
); |
| 720 |
|
| 721 |
$repeater->end_controls_tab(); |
| 722 |
|
| 723 |
$repeater->end_controls_tabs(); |
| 724 |
|
| 725 |
$this->add_control( |
| 726 |
'borderless_elementor_slider_slide_strings', |
| 727 |
[ |
| 728 |
'label' => __( 'Slides', 'borderless' ), |
| 729 |
'type' => Controls_Manager::REPEATER, |
| 730 |
'show_label' => true, |
| 731 |
'fields' => $repeater->get_controls(), |
| 732 |
'default' => [ |
| 733 |
[ |
| 734 |
'borderless_elementor_slider_slide_title' => __( 'Slide #1', 'borderless' ), |
| 735 |
'description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'borderless' ), |
| 736 |
'button_text' => __( 'Click Here', 'borderless' ), |
| 737 |
'background_color' => '#833ca3', |
| 738 |
], |
| 739 |
[ |
| 740 |
'borderless_elementor_slider_slide_title' => __( 'Slide #2', 'borderless' ), |
| 741 |
'description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'borderless' ), |
| 742 |
'button_text' => __( 'Click Here', 'borderless' ), |
| 743 |
'background_color' => '#4054b2', |
| 744 |
], |
| 745 |
[ |
| 746 |
'borderless_elementor_slider_slide_title' => __( 'Slide #3', 'borderless' ), |
| 747 |
'description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'borderless' ), |
| 748 |
'button_text' => __( 'Click Here', 'borderless' ), |
| 749 |
'background_color' => '#1abc9c', |
| 750 |
], |
| 751 |
], |
| 752 |
'title_field' => '{{{ borderless_elementor_slider_slide_title }}}', |
| 753 |
] |
| 754 |
); |
| 755 |
|
| 756 |
$this->end_controls_section(); |
| 757 |
|
| 758 |
|
| 759 |
/*-----------------------------------------------------------------------------------*/ |
| 760 |
/* *. Slider/Slider Layout - Content |
| 761 |
/*-----------------------------------------------------------------------------------*/ |
| 762 |
|
| 763 |
$this->start_controls_section( |
| 764 |
'borderless_elementor_section_slider_layout', |
| 765 |
[ |
| 766 |
'label' => esc_html__( 'Slider Layout', 'borderless' ), |
| 767 |
'tab' => Controls_Manager::TAB_CONTENT, |
| 768 |
] |
| 769 |
); |
| 770 |
|
| 771 |
$this->add_responsive_control( |
| 772 |
'borderless_elementor_slider_height', |
| 773 |
[ |
| 774 |
'label' => __( 'Height', 'borderless' ), |
| 775 |
'type' => Controls_Manager::SLIDER, |
| 776 |
'size_units' => [ 'px', 'vh', 'em' ], |
| 777 |
'range' => [ |
| 778 |
'px' => [ |
| 779 |
'min' => 300, |
| 780 |
'max' => 9999, |
| 781 |
'step' => 1, |
| 782 |
], |
| 783 |
'vh' => [ |
| 784 |
'min' => 10, |
| 785 |
'max' => 100, |
| 786 |
], |
| 787 |
'em' => [ |
| 788 |
'min' => 10, |
| 789 |
'max' => 999, |
| 790 |
], |
| 791 |
], |
| 792 |
'default' => [ |
| 793 |
'unit' => 'px', |
| 794 |
'size' => 600, |
| 795 |
], |
| 796 |
'selectors' => [ |
| 797 |
'{{WRAPPER}} .borderless-elementor-slide-background-overlay' => 'height: {{SIZE}}{{UNIT}};', |
| 798 |
], |
| 799 |
] |
| 800 |
); |
| 801 |
|
| 802 |
$this->add_control( |
| 803 |
'borderless_elementor_slider_options_show_title', |
| 804 |
[ |
| 805 |
'label' => __( 'Show Title', 'borderless' ), |
| 806 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 807 |
'default' => 'yes', |
| 808 |
] |
| 809 |
); |
| 810 |
|
| 811 |
$this->add_control( |
| 812 |
'borderless_elementor_slider_options_show_description', |
| 813 |
[ |
| 814 |
'label' => __( 'Show Description', 'borderless' ), |
| 815 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 816 |
'default' => 'yes', |
| 817 |
] |
| 818 |
); |
| 819 |
|
| 820 |
$this->add_control( |
| 821 |
'borderless_elementor_slider_options_show_button', |
| 822 |
[ |
| 823 |
'label' => __( 'Show Button', 'borderless' ), |
| 824 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 825 |
'default' => 'yes', |
| 826 |
] |
| 827 |
); |
| 828 |
|
| 829 |
$this->add_control( |
| 830 |
'borderless_elementor_slider_options_title_html_tag', |
| 831 |
[ |
| 832 |
'label' => esc_html__( 'Title HTML Tag', 'borderless' ), |
| 833 |
'type' => Controls_Manager::SELECT, |
| 834 |
'options' => [ |
| 835 |
'h1' => 'H1', |
| 836 |
'h2' => 'H2', |
| 837 |
'h3' => 'H3', |
| 838 |
'h4' => 'H4', |
| 839 |
'h5' => 'H5', |
| 840 |
'h6' => 'H6', |
| 841 |
'div' => 'div', |
| 842 |
'span' => 'span', |
| 843 |
'p' => 'p', |
| 844 |
], |
| 845 |
'default' => 'h2', |
| 846 |
'conditions' => [ |
| 847 |
'terms' => [ |
| 848 |
[ |
| 849 |
'name' => 'borderless_elementor_slider_options_show_title', |
| 850 |
'operator' => '!=', |
| 851 |
'value' => '', |
| 852 |
], |
| 853 |
], |
| 854 |
], |
| 855 |
] |
| 856 |
); |
| 857 |
|
| 858 |
$this->add_control( |
| 859 |
'borderless_elementor_slider_options_description_html_tag', |
| 860 |
[ |
| 861 |
'label' => esc_html__( 'Description HTML Tag', 'borderless' ), |
| 862 |
'type' => Controls_Manager::SELECT, |
| 863 |
'options' => [ |
| 864 |
'h1' => 'H1', |
| 865 |
'h2' => 'H2', |
| 866 |
'h3' => 'H3', |
| 867 |
'h4' => 'H4', |
| 868 |
'h5' => 'H5', |
| 869 |
'h6' => 'H6', |
| 870 |
'div' => 'div', |
| 871 |
'span' => 'span', |
| 872 |
'p' => 'p', |
| 873 |
], |
| 874 |
'default' => 'span', |
| 875 |
'conditions' => [ |
| 876 |
'terms' => [ |
| 877 |
[ |
| 878 |
'name' => 'borderless_elementor_slider_options_show_description', |
| 879 |
'operator' => '!=', |
| 880 |
'value' => '', |
| 881 |
], |
| 882 |
], |
| 883 |
], |
| 884 |
] |
| 885 |
); |
| 886 |
|
| 887 |
$this->end_controls_section(); |
| 888 |
|
| 889 |
|
| 890 |
/*-----------------------------------------------------------------------------------*/ |
| 891 |
/* *. Slider/Slider Options - Content |
| 892 |
/*-----------------------------------------------------------------------------------*/ |
| 893 |
|
| 894 |
$this->start_controls_section( |
| 895 |
'borderless_elementor_section_slider_options', |
| 896 |
[ |
| 897 |
'label' => esc_html__( 'Slider Options', 'borderless' ), |
| 898 |
'tab' => Controls_Manager::TAB_CONTENT, |
| 899 |
] |
| 900 |
); |
| 901 |
|
| 902 |
$this->add_control( |
| 903 |
'borderless_elementor_slider_options_autoplay', |
| 904 |
[ |
| 905 |
'label' => __( 'Autoplay', 'borderless' ), |
| 906 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 907 |
'default' => 'yes', |
| 908 |
] |
| 909 |
); |
| 910 |
|
| 911 |
$this->add_control( |
| 912 |
'borderless_elementor_slider_options_autoplay_pause_on_hover', |
| 913 |
[ |
| 914 |
'label' => __( 'Pause On Hover', 'borderless' ), |
| 915 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 916 |
'condition' => [ |
| 917 |
'borderless_elementor_slider_options_autoplay' => 'yes', |
| 918 |
], |
| 919 |
'default' => 'yes', |
| 920 |
] |
| 921 |
); |
| 922 |
|
| 923 |
$this->add_control( |
| 924 |
'borderless_elementor_slider_options_autoplay_speed', |
| 925 |
[ |
| 926 |
'label' => __( 'Autoplay Speed', 'borderless' ), |
| 927 |
'type' => Controls_Manager::NUMBER, |
| 928 |
'default' => 3000, |
| 929 |
'condition' => [ |
| 930 |
'borderless_elementor_slider_options_autoplay' => 'yes', |
| 931 |
], |
| 932 |
'render_type' => 'none', |
| 933 |
'frontend_available' => true, |
| 934 |
] |
| 935 |
); |
| 936 |
|
| 937 |
$this->add_control( |
| 938 |
'borderless_elementor_slider_options_draggable', |
| 939 |
[ |
| 940 |
'label' => __( 'Draggable', 'borderless' ), |
| 941 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 942 |
'default' => 'yes', |
| 943 |
] |
| 944 |
); |
| 945 |
|
| 946 |
$this->add_control( |
| 947 |
'borderless_elementor_slider_options_infinite_scroll', |
| 948 |
[ |
| 949 |
'label' => __( 'Infinite Scroll', 'borderless' ), |
| 950 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 951 |
'default' => 'yes', |
| 952 |
] |
| 953 |
); |
| 954 |
|
| 955 |
$this->add_control( |
| 956 |
'borderless_elementor_slider_options_adaptive_height', |
| 957 |
[ |
| 958 |
'label' => __( 'Adaptive Height', 'borderless' ), |
| 959 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 960 |
] |
| 961 |
); |
| 962 |
|
| 963 |
$this->add_control( |
| 964 |
'borderless_elementor_slider_options_fullscreen', |
| 965 |
[ |
| 966 |
'label' => __( 'Fullscreen', 'borderless' ), |
| 967 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 968 |
] |
| 969 |
); |
| 970 |
|
| 971 |
$this->add_control( |
| 972 |
'borderless_elementor_slider_options_fade', |
| 973 |
[ |
| 974 |
'label' => __( 'Fade', 'borderless' ), |
| 975 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 976 |
] |
| 977 |
); |
| 978 |
|
| 979 |
$this->add_control( |
| 980 |
'borderless_elementor_slider_options_thumbs_navigation', |
| 981 |
[ |
| 982 |
'label' => __( 'Thumbs Navigation', 'borderless' ), |
| 983 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 984 |
] |
| 985 |
); |
| 986 |
|
| 987 |
$this->end_controls_section(); |
| 988 |
|
| 989 |
/*-----------------------------------------------------------------------------------*/ |
| 990 |
/* *. Slider/Slides - Style |
| 991 |
/*-----------------------------------------------------------------------------------*/ |
| 992 |
|
| 993 |
$this->start_controls_section( |
| 994 |
'borderless_elementor_section_slider_slides_style', |
| 995 |
[ |
| 996 |
'label' => esc_html__( 'Slides', 'borderless'), |
| 997 |
'tab' => Controls_Manager::TAB_STYLE |
| 998 |
] |
| 999 |
); |
| 1000 |
|
| 1001 |
$this->add_responsive_control( |
| 1002 |
'borderless_elementor_slider_slides_max_width', |
| 1003 |
[ |
| 1004 |
'label' => __( 'Content Width', 'borderless' ), |
| 1005 |
'type' => Controls_Manager::SLIDER, |
| 1006 |
'range' => [ |
| 1007 |
'px' => [ |
| 1008 |
'min' => 0, |
| 1009 |
'max' => 1000, |
| 1010 |
], |
| 1011 |
'%' => [ |
| 1012 |
'min' => 0, |
| 1013 |
'max' => 100, |
| 1014 |
], |
| 1015 |
], |
| 1016 |
'size_units' => [ '%', 'px' ], |
| 1017 |
'default' => [ |
| 1018 |
'size' => '66', |
| 1019 |
'unit' => '%', |
| 1020 |
], |
| 1021 |
'tablet_default' => [ |
| 1022 |
'unit' => '%', |
| 1023 |
], |
| 1024 |
'mobile_default' => [ |
| 1025 |
'unit' => '%', |
| 1026 |
], |
| 1027 |
'selectors' => [ |
| 1028 |
'{{WRAPPER}} .borderless-elementor-slide-content-inner' => 'max-width: {{SIZE}}{{UNIT}};', |
| 1029 |
], |
| 1030 |
] |
| 1031 |
); |
| 1032 |
|
| 1033 |
$this->add_responsive_control( |
| 1034 |
'borderless_elementor_slider_slides_padding', |
| 1035 |
[ |
| 1036 |
'label' => __( 'Padding', 'borderless' ), |
| 1037 |
'type' => Controls_Manager::DIMENSIONS, |
| 1038 |
'size_units' => [ 'px', '%', 'em' ], |
| 1039 |
'selectors' => [ |
| 1040 |
'{{WRAPPER}} .borderless-elementor-slide-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1041 |
], |
| 1042 |
] |
| 1043 |
); |
| 1044 |
|
| 1045 |
$this->add_control( |
| 1046 |
'borderless_elementor_slider_slides_horizontal_position', |
| 1047 |
[ |
| 1048 |
'label' => __( 'Horizontal Position', 'borderless' ), |
| 1049 |
'type' => Controls_Manager::CHOOSE, |
| 1050 |
'default' => 'center', |
| 1051 |
'options' => [ |
| 1052 |
'flex-start' => [ |
| 1053 |
'title' => __( 'Left', 'borderless' ), |
| 1054 |
'icon' => 'eicon-h-align-left', |
| 1055 |
], |
| 1056 |
'center' => [ |
| 1057 |
'title' => __( 'Center', 'borderless' ), |
| 1058 |
'icon' => 'eicon-h-align-center', |
| 1059 |
], |
| 1060 |
'flex-end' => [ |
| 1061 |
'title' => __( 'Right', 'borderless' ), |
| 1062 |
'icon' => 'eicon-h-align-right', |
| 1063 |
], |
| 1064 |
], |
| 1065 |
'default' => 'center', |
| 1066 |
'selectors' => [ |
| 1067 |
'{{WRAPPER}} .borderless-elementor-slide-content' => 'align-items: {{VALUE}}', |
| 1068 |
], |
| 1069 |
] |
| 1070 |
); |
| 1071 |
|
| 1072 |
$this->add_control( |
| 1073 |
'borderless_elementor_slider_slides_vertical_position', |
| 1074 |
[ |
| 1075 |
'label' => __( 'Vertical Position', 'borderless' ), |
| 1076 |
'type' => Controls_Manager::CHOOSE, |
| 1077 |
'default' => 'middle', |
| 1078 |
'options' => [ |
| 1079 |
'flex-start' => [ |
| 1080 |
'title' => __( 'Top', 'borderless' ), |
| 1081 |
'icon' => 'eicon-v-align-top', |
| 1082 |
], |
| 1083 |
'center' => [ |
| 1084 |
'title' => __( 'Middle', 'borderless' ), |
| 1085 |
'icon' => 'eicon-v-align-middle', |
| 1086 |
], |
| 1087 |
'flex-end' => [ |
| 1088 |
'title' => __( 'Bottom', 'borderless' ), |
| 1089 |
'icon' => 'eicon-v-align-bottom', |
| 1090 |
], |
| 1091 |
], |
| 1092 |
'default' => 'center', |
| 1093 |
'selectors' => [ |
| 1094 |
'{{WRAPPER}} .borderless-elementor-slide-content' => 'justify-content: {{VALUE}}', |
| 1095 |
], |
| 1096 |
] |
| 1097 |
); |
| 1098 |
|
| 1099 |
$this->add_control( |
| 1100 |
'borderless_elementor_slider_slides_text_align', |
| 1101 |
[ |
| 1102 |
'label' => __( 'Text Align', 'borderless' ), |
| 1103 |
'type' => Controls_Manager::CHOOSE, |
| 1104 |
'options' => [ |
| 1105 |
'left' => [ |
| 1106 |
'title' => __( 'Left', 'borderless' ), |
| 1107 |
'icon' => 'eicon-text-align-left', |
| 1108 |
], |
| 1109 |
'center' => [ |
| 1110 |
'title' => __( 'Center', 'borderless' ), |
| 1111 |
'icon' => 'eicon-text-align-center', |
| 1112 |
], |
| 1113 |
'right' => [ |
| 1114 |
'title' => __( 'Right', 'borderless' ), |
| 1115 |
'icon' => 'eicon-text-align-right', |
| 1116 |
], |
| 1117 |
], |
| 1118 |
'default' => 'center', |
| 1119 |
'selectors' => [ |
| 1120 |
'{{WRAPPER}} .borderless-elementor-slide-content' => 'text-align: {{VALUE}}', |
| 1121 |
], |
| 1122 |
] |
| 1123 |
); |
| 1124 |
|
| 1125 |
$this->end_controls_section(); |
| 1126 |
|
| 1127 |
|
| 1128 |
/*-----------------------------------------------------------------------------------*/ |
| 1129 |
/* *. Slider/Title - Style |
| 1130 |
/*-----------------------------------------------------------------------------------*/ |
| 1131 |
|
| 1132 |
$this->start_controls_section( |
| 1133 |
'borderless_elementor_section_slider_title_style', |
| 1134 |
[ |
| 1135 |
'label' => esc_html__( 'Title', 'borderless'), |
| 1136 |
'tab' => Controls_Manager::TAB_STYLE |
| 1137 |
] |
| 1138 |
); |
| 1139 |
|
| 1140 |
$this->add_control( |
| 1141 |
'borderless_elementor_section_slider_title_color', |
| 1142 |
[ |
| 1143 |
'label' => __( 'Text Color', 'borderless' ), |
| 1144 |
'type' => Controls_Manager::COLOR, |
| 1145 |
'selectors' => [ |
| 1146 |
'{{WRAPPER}} .borderless-elementor-slide-title' => 'color: {{VALUE}}', |
| 1147 |
|
| 1148 |
], |
| 1149 |
] |
| 1150 |
); |
| 1151 |
|
| 1152 |
$this->add_group_control( |
| 1153 |
Group_Control_Typography::get_type(), |
| 1154 |
[ |
| 1155 |
'name' => 'borderless_elementor_section_slider_title_typography', |
| 1156 |
'global' => [ |
| 1157 |
'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 1158 |
], |
| 1159 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-title', |
| 1160 |
] |
| 1161 |
); |
| 1162 |
|
| 1163 |
$this->add_responsive_control( |
| 1164 |
'borderless_elementor_section_slider_title_padding', |
| 1165 |
[ |
| 1166 |
'label' => __( 'Padding', 'borderless' ), |
| 1167 |
'type' => Controls_Manager::DIMENSIONS, |
| 1168 |
'size_units' => [ 'px', '%', 'em' ], |
| 1169 |
'selectors' => [ |
| 1170 |
'{{WRAPPER}} .borderless-elementor-slide-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1171 |
], |
| 1172 |
] |
| 1173 |
); |
| 1174 |
|
| 1175 |
$this->add_responsive_control( |
| 1176 |
'borderless_elementor_section_slider_title_margin', |
| 1177 |
[ |
| 1178 |
'label' => __( 'Margin', 'borderless' ), |
| 1179 |
'type' => Controls_Manager::DIMENSIONS, |
| 1180 |
'size_units' => [ 'px', '%', 'em' ], |
| 1181 |
'selectors' => [ |
| 1182 |
'{{WRAPPER}} .borderless-elementor-slide-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1183 |
], |
| 1184 |
] |
| 1185 |
); |
| 1186 |
|
| 1187 |
$this->end_controls_section(); |
| 1188 |
|
| 1189 |
|
| 1190 |
/*-----------------------------------------------------------------------------------*/ |
| 1191 |
/* *. Slider/Description - Style |
| 1192 |
/*-----------------------------------------------------------------------------------*/ |
| 1193 |
|
| 1194 |
$this->start_controls_section( |
| 1195 |
'borderless_elementor_section_slider_description_style', |
| 1196 |
[ |
| 1197 |
'label' => esc_html__( 'Description', 'borderless'), |
| 1198 |
'tab' => Controls_Manager::TAB_STYLE |
| 1199 |
] |
| 1200 |
); |
| 1201 |
|
| 1202 |
$this->add_control( |
| 1203 |
'borderless_elementor_section_slider_description_color', |
| 1204 |
[ |
| 1205 |
'label' => __( 'Text Color', 'borderless' ), |
| 1206 |
'type' => Controls_Manager::COLOR, |
| 1207 |
'selectors' => [ |
| 1208 |
'{{WRAPPER}} .borderless-elementor-slide-description' => 'color: {{VALUE}}', |
| 1209 |
|
| 1210 |
], |
| 1211 |
] |
| 1212 |
); |
| 1213 |
|
| 1214 |
$this->add_group_control( |
| 1215 |
Group_Control_Typography::get_type(), |
| 1216 |
[ |
| 1217 |
'name' => 'borderless_elementor_section_slider_description_typography', |
| 1218 |
'global' => [ |
| 1219 |
'default' => Global_Typography::TYPOGRAPHY_PRIMARY, |
| 1220 |
], |
| 1221 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-description', |
| 1222 |
] |
| 1223 |
); |
| 1224 |
|
| 1225 |
$this->add_responsive_control( |
| 1226 |
'borderless_elementor_section_slider_description_padding', |
| 1227 |
[ |
| 1228 |
'label' => __( 'Padding', 'borderless' ), |
| 1229 |
'type' => Controls_Manager::DIMENSIONS, |
| 1230 |
'size_units' => [ 'px', '%', 'em' ], |
| 1231 |
'selectors' => [ |
| 1232 |
'{{WRAPPER}} .borderless-elementor-slide-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1233 |
], |
| 1234 |
] |
| 1235 |
); |
| 1236 |
|
| 1237 |
$this->add_responsive_control( |
| 1238 |
'borderless_elementor_section_slider_description_margin', |
| 1239 |
[ |
| 1240 |
'label' => __( 'Margin', 'borderless' ), |
| 1241 |
'type' => Controls_Manager::DIMENSIONS, |
| 1242 |
'size_units' => [ 'px', '%', 'em' ], |
| 1243 |
'selectors' => [ |
| 1244 |
'{{WRAPPER}} .borderless-elementor-slide-description' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1245 |
], |
| 1246 |
] |
| 1247 |
); |
| 1248 |
|
| 1249 |
$this->end_controls_section(); |
| 1250 |
|
| 1251 |
|
| 1252 |
/*-----------------------------------------------------------------------------------*/ |
| 1253 |
/* *. Slider/Button - Style |
| 1254 |
/*-----------------------------------------------------------------------------------*/ |
| 1255 |
|
| 1256 |
$this->start_controls_section( |
| 1257 |
'borderless_elementor_section_slider_button_style', |
| 1258 |
[ |
| 1259 |
'label' => esc_html__( 'Button', 'borderless'), |
| 1260 |
'tab' => Controls_Manager::TAB_STYLE |
| 1261 |
] |
| 1262 |
); |
| 1263 |
|
| 1264 |
$this->add_group_control( |
| 1265 |
Group_Control_Typography::get_type(), |
| 1266 |
[ |
| 1267 |
'name' => 'borderless_elementor_slider_button_typography', |
| 1268 |
'global' => [ |
| 1269 |
'default' => Global_Typography::TYPOGRAPHY_ACCENT, |
| 1270 |
], |
| 1271 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-button', |
| 1272 |
] |
| 1273 |
); |
| 1274 |
|
| 1275 |
$this->start_controls_tabs( 'borderless_elementor_slider_button_tabs' ); |
| 1276 |
|
| 1277 |
$this->start_controls_tab( 'borderless_elementor_slider_button_tab_normal', [ 'label' => __( 'Normal', 'borderless' ) ] ); |
| 1278 |
|
| 1279 |
$this->add_control( |
| 1280 |
'borderless_elementor_slider_button_text_color', |
| 1281 |
[ |
| 1282 |
'label' => __( 'Text Color', 'borderless' ), |
| 1283 |
'type' => Controls_Manager::COLOR, |
| 1284 |
'default' => '', |
| 1285 |
'selectors' => [ |
| 1286 |
'{{WRAPPER}} .borderless-elementor-slide-button' => 'fill: {{VALUE}}; color: {{VALUE}};', |
| 1287 |
], |
| 1288 |
] |
| 1289 |
); |
| 1290 |
|
| 1291 |
$this->add_group_control( |
| 1292 |
Group_Control_Background::get_type(), |
| 1293 |
[ |
| 1294 |
'name' => 'borderless_elementor_slider_button_background', |
| 1295 |
'label' => esc_html__( 'Background', 'borderless' ), |
| 1296 |
'types' => [ 'classic', 'gradient' ], |
| 1297 |
'exclude' => [ 'image' ], |
| 1298 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-button', |
| 1299 |
'fields_options' => [ |
| 1300 |
'background' => [ |
| 1301 |
'default' => 'classic', |
| 1302 |
], |
| 1303 |
], |
| 1304 |
] |
| 1305 |
); |
| 1306 |
|
| 1307 |
$this->end_controls_tab(); |
| 1308 |
|
| 1309 |
$this->start_controls_tab( 'borderless_elementor_slider_button_tab_hover', [ 'label' => __( 'Hover', 'borderless' ) ] ); |
| 1310 |
|
| 1311 |
$this->add_control( |
| 1312 |
'borderless_elementor_slider_button_text_color_hover', |
| 1313 |
[ |
| 1314 |
'label' => __( 'Text Color', 'borderless' ), |
| 1315 |
'type' => Controls_Manager::COLOR, |
| 1316 |
'default' => '', |
| 1317 |
'selectors' => [ |
| 1318 |
'{{WRAPPER}} .borderless-elementor-slide-button:hover' => 'fill: {{VALUE}}; color: {{VALUE}};', |
| 1319 |
], |
| 1320 |
] |
| 1321 |
); |
| 1322 |
|
| 1323 |
$this->add_group_control( |
| 1324 |
Group_Control_Background::get_type(), |
| 1325 |
[ |
| 1326 |
'name' => 'borderless_elementor_slider_button_background_hover', |
| 1327 |
'label' => esc_html__( 'Background', 'borderless' ), |
| 1328 |
'types' => [ 'classic', 'gradient' ], |
| 1329 |
'exclude' => [ 'image' ], |
| 1330 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-button:hover', |
| 1331 |
'fields_options' => [ |
| 1332 |
'background' => [ |
| 1333 |
'default' => 'classic', |
| 1334 |
], |
| 1335 |
], |
| 1336 |
] |
| 1337 |
); |
| 1338 |
|
| 1339 |
$this->end_controls_tab(); |
| 1340 |
|
| 1341 |
$this->end_controls_tabs(); |
| 1342 |
|
| 1343 |
$this->add_group_control( |
| 1344 |
Group_Control_Border::get_type(), |
| 1345 |
[ |
| 1346 |
'name' => 'borderless_elementor_slider_button_border', |
| 1347 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-button', |
| 1348 |
'separator' => 'before', |
| 1349 |
] |
| 1350 |
); |
| 1351 |
|
| 1352 |
$this->add_responsive_control( |
| 1353 |
'borderless_elementor_slider_button_border_radius', |
| 1354 |
[ |
| 1355 |
'label' => __( 'Border Radius', 'borderless' ), |
| 1356 |
'type' => Controls_Manager::DIMENSIONS, |
| 1357 |
'size_units' => [ 'px', '%' ], |
| 1358 |
'selectors' => [ |
| 1359 |
'{{WRAPPER}} .borderless-elementor-slide-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1360 |
], |
| 1361 |
] |
| 1362 |
); |
| 1363 |
|
| 1364 |
$this->add_group_control( |
| 1365 |
Group_Control_Box_Shadow::get_type(), |
| 1366 |
[ |
| 1367 |
'name' => 'borderless_elementor_slider_button_box_shadow', |
| 1368 |
'exclude' => [ |
| 1369 |
'box_shadow_position', |
| 1370 |
], |
| 1371 |
'selector' => '{{WRAPPER}} .borderless-elementor-slide-button', |
| 1372 |
] |
| 1373 |
); |
| 1374 |
|
| 1375 |
$this->add_responsive_control( |
| 1376 |
'borderless_elementor_slider_button_padding', |
| 1377 |
[ |
| 1378 |
'label' => __( 'Padding', 'borderless' ), |
| 1379 |
'type' => Controls_Manager::DIMENSIONS, |
| 1380 |
'size_units' => [ 'px', '%', 'em' ], |
| 1381 |
'separator' => 'before', |
| 1382 |
'selectors' => [ |
| 1383 |
'{{WRAPPER}} .borderless-elementor-slide-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1384 |
], |
| 1385 |
] |
| 1386 |
); |
| 1387 |
|
| 1388 |
$this->end_controls_section(); |
| 1389 |
|
| 1390 |
/*-----------------------------------------------------------------------------------*/ |
| 1391 |
/* *. Slider/Arrows - Style |
| 1392 |
/*-----------------------------------------------------------------------------------*/ |
| 1393 |
|
| 1394 |
$this->start_controls_section( |
| 1395 |
'borderless_elementor_section_slider_arrows_style', |
| 1396 |
[ |
| 1397 |
'label' => esc_html__( 'Arrows', 'borderless'), |
| 1398 |
'tab' => Controls_Manager::TAB_STYLE |
| 1399 |
] |
| 1400 |
); |
| 1401 |
|
| 1402 |
$this->add_control( |
| 1403 |
'borderless_elementor_slider_navigation_arrows_position', |
| 1404 |
[ |
| 1405 |
'label' => __( 'Arrows Position', 'borderless' ), |
| 1406 |
'type' => Controls_Manager::SELECT, |
| 1407 |
'default' => 'borderless-elementor-arrows-position-inside', |
| 1408 |
'options' => [ |
| 1409 |
'borderless-elementor-arrows-position-inside' => __( 'Inside', 'borderless' ), |
| 1410 |
'borderless-elementor-arrows-position-outside' => __( 'Outside', 'borderless' ), |
| 1411 |
], |
| 1412 |
] |
| 1413 |
); |
| 1414 |
|
| 1415 |
$this->add_responsive_control( |
| 1416 |
'borderless_elementor_slider_navigation_arrows_size', |
| 1417 |
[ |
| 1418 |
'label' => __( 'Arrows Size', 'borderless' ), |
| 1419 |
'type' => Controls_Manager::SLIDER, |
| 1420 |
'range' => [ |
| 1421 |
'px' => [ |
| 1422 |
'min' => 20, |
| 1423 |
'max' => 100, |
| 1424 |
], |
| 1425 |
], |
| 1426 |
'selectors' => [ |
| 1427 |
'{{WRAPPER}} .flickity-prev-next-button' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}', |
| 1428 |
'{{WRAPPER}} .flickity-prev-next-button .flickity-button-icon' => 'height: calc( {{SIZE}}{{UNIT}} - 20px ); width: calc( {{SIZE}}{{UNIT}} - 20px )', |
| 1429 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-arrows-position-outside:not(.is-fullscreen)' => 'width: calc( 100% - 20px - ( {{SIZE}}{{UNIT}} * 2 ) )', |
| 1430 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-arrows-position-outside:not(.is-fullscreen) .flickity-prev-next-button.previous' => 'left: calc( -1 * ({{SIZE}}{{UNIT}} + 10px) )', |
| 1431 |
'{{WRAPPER}} {{CURRENT_ITEM}} .borderless-elementor-arrows-position-outside:not(.is-fullscreen) .flickity-prev-next-button.next' => 'right: calc( -1 * ({{SIZE}}{{UNIT}} + 10px) )', |
| 1432 |
|
| 1433 |
|
| 1434 |
], |
| 1435 |
] |
| 1436 |
); |
| 1437 |
|
| 1438 |
$this->start_controls_tabs( 'borderless_elementor_slider_navigation_arrows_tabs' ); |
| 1439 |
|
| 1440 |
$this->start_controls_tab( 'borderless_elementor_slider_navigation_arrows_tab_normal', [ 'label' => __( 'Normal', 'borderless' ) ] ); |
| 1441 |
|
| 1442 |
$this->add_control( |
| 1443 |
'borderless_elementor_slider_navigation_arrows_color', |
| 1444 |
[ |
| 1445 |
'label' => __( 'Arrows Color', 'borderless' ), |
| 1446 |
'type' => Controls_Manager::COLOR, |
| 1447 |
'selectors' => [ |
| 1448 |
'{{WRAPPER}} {{CURRENT_ITEM}} .flickity-prev-next-button .flickity-button-icon' => 'fill: {{VALUE}}', |
| 1449 |
], |
| 1450 |
] |
| 1451 |
); |
| 1452 |
|
| 1453 |
$this->add_group_control( |
| 1454 |
Group_Control_Background::get_type(), |
| 1455 |
[ |
| 1456 |
'name' => 'borderless_elementor_slider_navigation_arrows_background_color', |
| 1457 |
'label' => esc_html__( 'Arrows Background Color', 'borderless' ), |
| 1458 |
'types' => [ 'classic', 'gradient' ], |
| 1459 |
'exclude' => [ 'image' ], |
| 1460 |
'selector' => '{{WRAPPER}} .flickity-prev-next-button', |
| 1461 |
'fields_options' => [ |
| 1462 |
'background' => [ |
| 1463 |
'default' => 'classic', |
| 1464 |
], |
| 1465 |
'color' => [ |
| 1466 |
'default' => '#02010130', |
| 1467 |
], |
| 1468 |
], |
| 1469 |
] |
| 1470 |
); |
| 1471 |
|
| 1472 |
$this->end_controls_tab(); |
| 1473 |
|
| 1474 |
$this->start_controls_tab( 'borderless_elementor_slider_navigation_arrows_tab_hover', [ 'label' => __( 'Hover', 'borderless' ) ] ); |
| 1475 |
|
| 1476 |
$this->add_control( |
| 1477 |
'borderless_elementor_slider_navigation_arrows_color_hover', |
| 1478 |
[ |
| 1479 |
'label' => __( 'Arrows Color', 'borderless' ), |
| 1480 |
'type' => Controls_Manager::COLOR, |
| 1481 |
'selectors' => [ |
| 1482 |
'{{WRAPPER}} {{CURRENT_ITEM}} .flickity-prev-next-button .flickity-button-icon:hover' => 'fill: {{VALUE}}', |
| 1483 |
], |
| 1484 |
] |
| 1485 |
); |
| 1486 |
|
| 1487 |
$this->add_group_control( |
| 1488 |
Group_Control_Background::get_type(), |
| 1489 |
[ |
| 1490 |
'name' => 'borderless_elementor_slider_navigation_arrows_background_color_hover', |
| 1491 |
'label' => esc_html__( 'Arrows Background Color', 'borderless' ), |
| 1492 |
'types' => [ 'classic', 'gradient' ], |
| 1493 |
'exclude' => [ 'image' ], |
| 1494 |
'selector' => '{{WRAPPER}} .flickity-prev-next-button:hover', |
| 1495 |
'fields_options' => [ |
| 1496 |
'background' => [ |
| 1497 |
'default' => 'classic', |
| 1498 |
], |
| 1499 |
'color' => [ |
| 1500 |
'default' => '#000000', |
| 1501 |
], |
| 1502 |
], |
| 1503 |
] |
| 1504 |
); |
| 1505 |
|
| 1506 |
$this->end_controls_tab(); |
| 1507 |
|
| 1508 |
$this->end_controls_tabs(); |
| 1509 |
|
| 1510 |
$this->add_group_control( |
| 1511 |
Group_Control_Border::get_type(), |
| 1512 |
[ |
| 1513 |
'name' => 'borderless_elementor_slider_navigation_arrows_border', |
| 1514 |
'selector' => '{{WRAPPER}} .flickity-prev-next-button', |
| 1515 |
'separator' => 'before', |
| 1516 |
] |
| 1517 |
); |
| 1518 |
|
| 1519 |
$this->add_responsive_control( |
| 1520 |
'borderless_elementor_slider_navigation_arrows_border_radius', |
| 1521 |
[ |
| 1522 |
'label' => __( 'Border Radius', 'borderless' ), |
| 1523 |
'type' => Controls_Manager::DIMENSIONS, |
| 1524 |
'size_units' => [ 'px', '%' ], |
| 1525 |
'selectors' => [ |
| 1526 |
'{{WRAPPER}} .flickity-prev-next-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1527 |
], |
| 1528 |
] |
| 1529 |
); |
| 1530 |
|
| 1531 |
$this->add_group_control( |
| 1532 |
Group_Control_Box_Shadow::get_type(), |
| 1533 |
[ |
| 1534 |
'name' => 'borderless_elementor_slider_navigation_arrows_box_shadow', |
| 1535 |
'exclude' => [ |
| 1536 |
'box_shadow_position', |
| 1537 |
], |
| 1538 |
'selector' => '{{WRAPPER}} .flickity-prev-next-button', |
| 1539 |
] |
| 1540 |
); |
| 1541 |
|
| 1542 |
$this->add_responsive_control( |
| 1543 |
'borderless_elementor_slider_navigation_arrows_padding', |
| 1544 |
[ |
| 1545 |
'label' => __( 'Padding', 'borderless' ), |
| 1546 |
'type' => Controls_Manager::DIMENSIONS, |
| 1547 |
'size_units' => [ 'px', '%', 'em' ], |
| 1548 |
'separator' => 'before', |
| 1549 |
'selectors' => [ |
| 1550 |
'{{WRAPPER}} .flickity-prev-next-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1551 |
], |
| 1552 |
] |
| 1553 |
); |
| 1554 |
|
| 1555 |
$this->end_controls_section(); |
| 1556 |
|
| 1557 |
/*-----------------------------------------------------------------------------------*/ |
| 1558 |
/* *. Slider/Dots - Style |
| 1559 |
/*-----------------------------------------------------------------------------------*/ |
| 1560 |
|
| 1561 |
$this->start_controls_section( |
| 1562 |
'borderless_elementor_section_slider_dots_style', |
| 1563 |
[ |
| 1564 |
'label' => esc_html__( 'Dots', 'borderless'), |
| 1565 |
'tab' => Controls_Manager::TAB_STYLE |
| 1566 |
] |
| 1567 |
); |
| 1568 |
|
| 1569 |
$this->add_control( |
| 1570 |
'borderless_elementor_slider_navigation_dots_position', |
| 1571 |
[ |
| 1572 |
'label' => __( 'Dots Position', 'borderless' ), |
| 1573 |
'type' => Controls_Manager::SELECT, |
| 1574 |
'default' => 'borderless-elementor-dots-position-inside', |
| 1575 |
'options' => [ |
| 1576 |
'borderless-elementor-dots-position-inside' => __( 'Inside', 'borderless' ), |
| 1577 |
'borderless-elementor-dots-position-outside' => __( 'Outside', 'borderless' ), |
| 1578 |
], |
| 1579 |
] |
| 1580 |
); |
| 1581 |
|
| 1582 |
$this->add_responsive_control( |
| 1583 |
'borderless_elementor_slider_navigation_dots_size', |
| 1584 |
[ |
| 1585 |
'label' => __( 'Dots Size', 'borderless' ), |
| 1586 |
'type' => Controls_Manager::SLIDER, |
| 1587 |
'range' => [ |
| 1588 |
'px' => [ |
| 1589 |
'min' => 20, |
| 1590 |
'max' => 100, |
| 1591 |
], |
| 1592 |
], |
| 1593 |
'selectors' => [ |
| 1594 |
'{{WRAPPER}} .flickity-page-dots .dot' => 'height: {{SIZE}}{{UNIT}}; width: {{SIZE}}{{UNIT}}', |
| 1595 |
|
| 1596 |
|
| 1597 |
], |
| 1598 |
] |
| 1599 |
); |
| 1600 |
|
| 1601 |
$this->start_controls_tabs( 'borderless_elementor_slider_dots_tabs' ); |
| 1602 |
|
| 1603 |
$this->start_controls_tab( 'borderless_elementor_slider_navigation_dots_tab_normal', [ 'label' => __( 'Normal', 'borderless' ) ] ); |
| 1604 |
|
| 1605 |
$this->add_group_control( |
| 1606 |
Group_Control_Background::get_type(), |
| 1607 |
[ |
| 1608 |
'name' => 'borderless_elementor_slider_navigation_dots_background_color_normal', |
| 1609 |
'label' => esc_html__( 'Dots Color', 'borderless' ), |
| 1610 |
'types' => [ 'classic', 'gradient' ], |
| 1611 |
'exclude' => [ 'image' ], |
| 1612 |
'selector' => '{{WRAPPER}} .borderless-elementor-slider .flickity-page-dots .dot', |
| 1613 |
] |
| 1614 |
); |
| 1615 |
|
| 1616 |
$this->end_controls_tab(); |
| 1617 |
|
| 1618 |
$this->start_controls_tab( 'borderless_elementor_slider_navigation_dots_tab_hover', [ 'label' => __( 'Hover', 'borderless' ) ] ); |
| 1619 |
|
| 1620 |
$this->add_group_control( |
| 1621 |
Group_Control_Background::get_type(), |
| 1622 |
[ |
| 1623 |
'name' => 'borderless_elementor_slider_navigation_dots_background_color_hover', |
| 1624 |
'label' => esc_html__( 'Dots Color', 'borderless' ), |
| 1625 |
'types' => [ 'classic', 'gradient' ], |
| 1626 |
'exclude' => [ 'image' ], |
| 1627 |
'selector' => '{{WRAPPER}} .borderless-elementor-slider .flickity-page-dots .dot:hover', |
| 1628 |
] |
| 1629 |
); |
| 1630 |
|
| 1631 |
$this->end_controls_tab(); |
| 1632 |
|
| 1633 |
$this->start_controls_tab( 'borderless_elementor_slider_navigation_dots_tab_active', [ 'label' => __( 'Active', 'borderless' ) ] ); |
| 1634 |
|
| 1635 |
$this->add_group_control( |
| 1636 |
Group_Control_Background::get_type(), |
| 1637 |
[ |
| 1638 |
'name' => 'borderless_elementor_slider_navigation_dots_background_color_active', |
| 1639 |
'label' => esc_html__( 'Dots Color', 'borderless' ), |
| 1640 |
'types' => [ 'classic', 'gradient' ], |
| 1641 |
'exclude' => [ 'image' ], |
| 1642 |
'selector' => '{{WRAPPER}} .borderless-elementor-slider .flickity-page-dots .dot.is-selected', |
| 1643 |
] |
| 1644 |
); |
| 1645 |
|
| 1646 |
$this->end_controls_tab(); |
| 1647 |
|
| 1648 |
$this->end_controls_tabs(); |
| 1649 |
|
| 1650 |
$this->end_controls_section(); |
| 1651 |
|
| 1652 |
} |
| 1653 |
|
| 1654 |
/*-----------------------------------------------------------------------------------*/ |
| 1655 |
/* *. Render |
| 1656 |
/*-----------------------------------------------------------------------------------*/ |
| 1657 |
|
| 1658 |
protected function render() { |
| 1659 |
|
| 1660 |
$settings = $this->get_settings_for_display(); |
| 1661 |
|
| 1662 |
$target = $settings['borderless_elementor_slider_slide_button_link']['is_external'] ? ' target="_blank"' : ''; |
| 1663 |
$nofollow = $settings['borderless_elementor_slider_slide_button_link']['nofollow'] ? ' rel="nofollow"' : ''; |
| 1664 |
|
| 1665 |
$this->add_render_attribute( 'slider', 'data-slider-autoplay', $settings['borderless_elementor_slider_options_autoplay'] ); |
| 1666 |
$this->add_render_attribute( 'slider', 'data-slider-autoplay-pause-on-hover', $settings['borderless_elementor_slider_options_autoplay_pause_on_hover'] ); |
| 1667 |
$this->add_render_attribute( 'slider', 'data-slider-autoplay-speed', $settings['borderless_elementor_slider_options_autoplay_speed'] ); |
| 1668 |
$this->add_render_attribute( 'slider', 'data-slider-draggable', $settings['borderless_elementor_slider_options_draggable'] ); |
| 1669 |
$this->add_render_attribute( 'slider', 'data-slider-infinite-scroll', $settings['borderless_elementor_slider_options_infinite_scroll'] ); |
| 1670 |
$this->add_render_attribute( 'slider', 'data-slider-adaptative-height', $settings['borderless_elementor_slider_options_adaptive_height'] ); |
| 1671 |
$this->add_render_attribute( 'slider', 'data-slider-fullscreen', $settings['borderless_elementor_slider_options_fullscreen'] ); |
| 1672 |
$this->add_render_attribute( 'slider', 'data-slider-fade', $settings['borderless_elementor_slider_options_fade'] ); |
| 1673 |
$this->add_render_attribute( 'slider', 'data-slider-as-nav-for', $settings['borderless_elementor_slider_options_thumbs_navigation'] ); |
| 1674 |
|
| 1675 |
?> |
| 1676 |
|
| 1677 |
<div class="borderless-elementor-slider-widget" <?php echo $this->get_render_attribute_string( 'slider' ) ?>> |
| 1678 |
|
| 1679 |
<div class="borderless-elementor-slider <?php echo wp_kses( ( $settings['borderless_elementor_slider_navigation_arrows_position'] ), true ) .' '. wp_kses( ( $settings['borderless_elementor_slider_navigation_dots_position'] ), true ); ?>"> |
| 1680 |
|
| 1681 |
<?php if ( $settings['borderless_elementor_slider_slide_strings'] ) { |
| 1682 |
foreach ( $settings['borderless_elementor_slider_slide_strings'] as $slider_string ) { |
| 1683 |
|
| 1684 |
$ken_burns = ''; |
| 1685 |
|
| 1686 |
if ( $slider_string['borderless_elementor_slider_slide_background_image_ken_burns'] ) { |
| 1687 |
$ken_burns = ' elementor-ken-burns elementor-ken-burns--' . $slider_string['borderless_elementor_slider_slide_background_image_zoom_direction']; |
| 1688 |
} |
| 1689 |
|
| 1690 |
?> |
| 1691 |
|
| 1692 |
<div class="borderless-elementor-slide <?php echo $ken_burns; ?> elementor-repeater-item-<?php echo $slider_string['_id']; ?> "> |
| 1693 |
|
| 1694 |
<div class="borderless-elementor-slide-background-overlay"> |
| 1695 |
|
| 1696 |
<div class="borderless-elementor-slide-content"> |
| 1697 |
|
| 1698 |
<div class="borderless-elementor-slide-content-inner"> |
| 1699 |
|
| 1700 |
<?php if ( $settings['borderless_elementor_slider_options_show_title'] ) { ?> |
| 1701 |
<<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_title_html_tag'] ), true ); ?> class="borderless-elementor-slide-title"><?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_title'] ), true ); ?></<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_title_html_tag'] ), true ); ?>> |
| 1702 |
<?php } ?> |
| 1703 |
|
| 1704 |
<?php if ( $settings['borderless_elementor_slider_options_show_description'] ) { ?> |
| 1705 |
<<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_description_html_tag'] ), true ); ?> class="borderless-elementor-slide-description"><?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_description'] ), true ); ?></<?php echo wp_kses( ( $settings['borderless_elementor_slider_options_description_html_tag'] ), true ); ?>> |
| 1706 |
<?php } ?> |
| 1707 |
|
| 1708 |
<?php if ( $settings['borderless_elementor_slider_options_show_button'] ) { ?> |
| 1709 |
<div class="borderless-elementor-slide-button-container"> |
| 1710 |
<a class="borderless-elementor-slide-button borderless-btn borderless-btn--primary" href="<?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_button_link']['url'] ), true ); ?>" <?php echo $target . $nofollow; ?>><?php echo wp_kses( ( $slider_string['borderless_elementor_slider_slide_button_text'] ), true ); ?></a> |
| 1711 |
</div> |
| 1712 |
<?php } ?> |
| 1713 |
|
| 1714 |
</div> |
| 1715 |
|
| 1716 |
</div> |
| 1717 |
|
| 1718 |
</div> |
| 1719 |
|
| 1720 |
</div> |
| 1721 |
|
| 1722 |
<?php } ?> |
| 1723 |
|
| 1724 |
<?php } ?> |
| 1725 |
|
| 1726 |
</div> |
| 1727 |
|
| 1728 |
<?php if( $settings['borderless_elementor_slider_options_thumbs_navigation'] ) { ?> |
| 1729 |
|
| 1730 |
<div class="borderless-elementor-slider-nav"> |
| 1731 |
|
| 1732 |
<?php if ( $settings['borderless_elementor_slider_slide_strings'] ) { |
| 1733 |
foreach ( $settings['borderless_elementor_slider_slide_strings'] as $slider_string ) { |
| 1734 |
|
| 1735 |
?> |
| 1736 |
|
| 1737 |
<div class="borderless-elementor-slide elementor-repeater-item-<?php echo $slider_string['_id']; ?> "> |
| 1738 |
|
| 1739 |
<div class="borderless-elementor-slide-background-overlay"> |
| 1740 |
</div> |
| 1741 |
|
| 1742 |
</div> |
| 1743 |
|
| 1744 |
<?php } ?> |
| 1745 |
|
| 1746 |
<?php } ?> |
| 1747 |
|
| 1748 |
</div> |
| 1749 |
|
| 1750 |
<?php } ?> |
| 1751 |
|
| 1752 |
</div> |
| 1753 |
|
| 1754 |
<?php |
| 1755 |
|
| 1756 |
} |
| 1757 |
|
| 1758 |
} |