| 1 |
<?php |
| 2 |
|
| 3 |
namespace MasterAddons\Inc\Traits; |
| 4 |
|
| 5 |
use Elementor\Controls_Manager; |
| 6 |
use Elementor\Icons_Manager; |
| 7 |
use Elementor\Group_Control_Border; |
| 8 |
use Elementor\Group_Control_Typography; |
| 9 |
use Elementor\Group_Control_Box_Shadow; |
| 10 |
use MasterAddons\Inc\Classes\Helper; |
| 11 |
|
| 12 |
/** |
| 13 |
* Author Name: Liton Arefin |
| 14 |
* Author URL: https://jeweltheme.com |
| 15 |
* Date: 7/14/21 |
| 16 |
*/ |
| 17 |
if (!defined('ABSPATH')) exit; // If this file is called directly, abort. |
| 18 |
|
| 19 |
|
| 20 |
trait JLTMA_Swiper_Controls |
| 21 |
{ |
| 22 |
|
| 23 |
protected function jltma_tooltip_tab($name){ |
| 24 |
|
| 25 |
$name->add_control( |
| 26 |
'jltma_logo_slider_tooltip_enable', |
| 27 |
[ |
| 28 |
'label' => __('Tooltip', 'master-addons' ), |
| 29 |
'type' => Controls_Manager::SWITCHER, |
| 30 |
'label_on' => __('Yes', 'master-addons' ), |
| 31 |
'label_off' => __('No', 'master-addons' ), |
| 32 |
'return_value' => 'yes', |
| 33 |
] |
| 34 |
); |
| 35 |
|
| 36 |
$name->start_controls_tabs('tooltip_element_settings'); |
| 37 |
|
| 38 |
$name->start_controls_tab('tooltip_element_settings_tab', [ |
| 39 |
'label' => __('Settings', 'master-addons' ), |
| 40 |
'condition' => [ |
| 41 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 42 |
], |
| 43 |
]); |
| 44 |
|
| 45 |
$name->add_control( |
| 46 |
'jltma_logo_slider_tooltip_text', |
| 47 |
[ |
| 48 |
'label' => esc_html__('Content', 'master-addons' ), |
| 49 |
'type' => Controls_Manager::TEXTAREA, |
| 50 |
'default' => __('This is Element Tooltip', 'master-addons' ), |
| 51 |
'dynamic' => ['active' => true], |
| 52 |
'condition' => [ |
| 53 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 54 |
], |
| 55 |
'render_type' => 'template', |
| 56 |
] |
| 57 |
); |
| 58 |
|
| 59 |
$name->add_control( |
| 60 |
'jltma_logo_slider_tooltip_placement', |
| 61 |
[ |
| 62 |
'label' => esc_html__('Placement', 'master-addons' ), |
| 63 |
'type' => Controls_Manager::SELECT, |
| 64 |
'default' => 'top', |
| 65 |
'options' => [ |
| 66 |
'top' => esc_html__('Top (Default)', 'master-addons' ), |
| 67 |
'top-start' => esc_html__('Top Start', 'master-addons' ), |
| 68 |
'top-end' => esc_html__('Top End', 'master-addons' ), |
| 69 |
|
| 70 |
'right' => esc_html__('Right', 'master-addons' ), |
| 71 |
'right-start' => esc_html__('Right Start', 'master-addons' ), |
| 72 |
'right-end' => esc_html__('Right End', 'master-addons' ), |
| 73 |
|
| 74 |
'bottom' => esc_html__('Bottom', 'master-addons' ), |
| 75 |
'bottom-start' => esc_html__('Bottom Start', 'master-addons' ), |
| 76 |
'bottom-end' => esc_html__('Bottom End', 'master-addons' ), |
| 77 |
|
| 78 |
'left' => esc_html__('Left', 'master-addons' ), |
| 79 |
'left-start' => esc_html__('Left Start', 'master-addons' ), |
| 80 |
'left-end' => esc_html__('Left End', 'master-addons' ), |
| 81 |
], |
| 82 |
'render_type' => 'template', |
| 83 |
'condition' => [ |
| 84 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 85 |
'jltma_logo_slider_tooltip_follow_cursor' => '' |
| 86 |
], |
| 87 |
] |
| 88 |
); |
| 89 |
|
| 90 |
$name->add_control( |
| 91 |
'jltma_logo_slider_tooltip_follow_cursor', |
| 92 |
[ |
| 93 |
'label' => esc_html__('Follow Cursor', 'master-addons' ) . JLTMA_NF, |
| 94 |
'type' => Controls_Manager::SWITCHER, |
| 95 |
'render_type' => 'template', |
| 96 |
'condition' => [ |
| 97 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 98 |
], |
| 99 |
] |
| 100 |
); |
| 101 |
|
| 102 |
|
| 103 |
$name->add_control( |
| 104 |
'jltma_logo_slider_tooltip_animation', |
| 105 |
[ |
| 106 |
'label' => esc_html__('Animation', 'master-addons' ), |
| 107 |
'type' => Controls_Manager::SELECT, |
| 108 |
'default' => 'scale', |
| 109 |
'options' => [ |
| 110 |
'none' => esc_html__('None', 'master-addons' ), |
| 111 |
'' => esc_html__('Fade', 'master-addons' ), |
| 112 |
'shift-away' => esc_html__('Shift-Away', 'master-addons' ), |
| 113 |
'shift-toward' => esc_html__('Shift-Toward', 'master-addons' ), |
| 114 |
'scale' => esc_html__('Scale', 'master-addons' ), |
| 115 |
'perspective' => esc_html__('Perspective', 'master-addons' ), |
| 116 |
'fill' => esc_html__('Fill Effect', 'master-addons' ), |
| 117 |
], |
| 118 |
'render_type' => 'template', |
| 119 |
'condition' => [ |
| 120 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 121 |
], |
| 122 |
] |
| 123 |
); |
| 124 |
|
| 125 |
|
| 126 |
$name->add_control( |
| 127 |
'jltma_logo_slider_tooltip_trigger', |
| 128 |
[ |
| 129 |
'label' => esc_html__('Trigger', 'master-addons' ) . JLTMA_NF, |
| 130 |
'type' => Controls_Manager::SELECT, |
| 131 |
'default' => 'mouseenter', |
| 132 |
'options' => [ |
| 133 |
'mouseenter' => esc_html__('Hover', 'master-addons' ), |
| 134 |
'click' => esc_html__('Click', 'master-addons' ), |
| 135 |
// 'manual' => esc_html__('Custom Trigger', 'master-addons' ), |
| 136 |
|
| 137 |
], |
| 138 |
'render_type' => 'template', |
| 139 |
'condition' => [ |
| 140 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 141 |
], |
| 142 |
] |
| 143 |
); |
| 144 |
|
| 145 |
$name->add_control( |
| 146 |
'jltma_logo_slider_tooltip_duration', |
| 147 |
[ |
| 148 |
'label' => __('Duration', 'master-addons' ), |
| 149 |
'type' => Controls_Manager::NUMBER, |
| 150 |
'min' => 100, |
| 151 |
'max' => 5000, |
| 152 |
'step' => 10, |
| 153 |
'default' => 300, |
| 154 |
'condition' => [ |
| 155 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 156 |
], |
| 157 |
] |
| 158 |
); |
| 159 |
|
| 160 |
$name->add_control( |
| 161 |
'jltma_logo_slider_tooltip_delay', |
| 162 |
[ |
| 163 |
'label' => __('Delay out (s)', 'master-addons' ), |
| 164 |
'type' => Controls_Manager::NUMBER, |
| 165 |
'min' => 100, |
| 166 |
'max' => 5000, |
| 167 |
'step' => 5, |
| 168 |
'default' => 400, |
| 169 |
'condition' => [ |
| 170 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 171 |
], |
| 172 |
] |
| 173 |
); |
| 174 |
|
| 175 |
|
| 176 |
$name->add_control( |
| 177 |
'jltma_logo_slider_tooltip_x_offset', |
| 178 |
[ |
| 179 |
'label' => esc_html__('X Offset', 'master-addons' ), |
| 180 |
'type' => Controls_Manager::SLIDER, |
| 181 |
'size_units' => ['px'], |
| 182 |
'range' => [ |
| 183 |
'px' => [ |
| 184 |
'min' => -1000, |
| 185 |
'max' => 1000, |
| 186 |
'step' => 1, |
| 187 |
], |
| 188 |
], |
| 189 |
'render_type' => 'template', |
| 190 |
'condition' => [ |
| 191 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 192 |
], |
| 193 |
] |
| 194 |
); |
| 195 |
|
| 196 |
$name->add_control( |
| 197 |
'jltma_logo_slider_tooltip_y_offset', |
| 198 |
[ |
| 199 |
'label' => esc_html__('Y Offset', 'master-addons' ), |
| 200 |
'type' => Controls_Manager::SLIDER, |
| 201 |
'size_units' => ['px'], |
| 202 |
'range' => [ |
| 203 |
'px' => [ |
| 204 |
'min' => -1000, |
| 205 |
'max' => 1000, |
| 206 |
'step' => 1, |
| 207 |
], |
| 208 |
], |
| 209 |
'render_type' => 'template', |
| 210 |
'condition' => [ |
| 211 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 212 |
], |
| 213 |
] |
| 214 |
); |
| 215 |
|
| 216 |
|
| 217 |
$name->add_control( |
| 218 |
'jltma_logo_slider_tooltip_arrow', |
| 219 |
[ |
| 220 |
'label' => esc_html__('Arrow', 'master-addons' ), |
| 221 |
'type' => Controls_Manager::SWITCHER, |
| 222 |
'default' => true, |
| 223 |
'render_type' => 'template', |
| 224 |
'condition' => [ |
| 225 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 226 |
'jltma_logo_slider_tooltip_animation!' => 'fill' |
| 227 |
], |
| 228 |
] |
| 229 |
); |
| 230 |
|
| 231 |
$name->add_control( |
| 232 |
'jltma_logo_slider_tooltip_arrow_type', |
| 233 |
[ |
| 234 |
'label' => __('Arrow Type', 'master-addons' ), |
| 235 |
'type' => Controls_Manager::SELECT, |
| 236 |
'default' => 'sharp', |
| 237 |
'options' => [ |
| 238 |
'sharp' => __('Sharp', 'master-addons' ), |
| 239 |
'round' => __('Round', 'master-addons' ), |
| 240 |
], |
| 241 |
'render_type' => 'template', |
| 242 |
'condition' => [ |
| 243 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 244 |
'jltma_logo_slider_tooltip_arrow!' => '', |
| 245 |
], |
| 246 |
] |
| 247 |
); |
| 248 |
|
| 249 |
|
| 250 |
$name->end_controls_tab(); |
| 251 |
|
| 252 |
|
| 253 |
$name->start_controls_tab('tooltip_element_style_tab', [ |
| 254 |
'label' => __('Style', 'master-addons' ), |
| 255 |
'condition' => [ |
| 256 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 257 |
], |
| 258 |
]); |
| 259 |
|
| 260 |
$name->add_responsive_control( |
| 261 |
'jltma_logo_slider_tooltip_width', |
| 262 |
[ |
| 263 |
'label' => esc_html__('Max Width', 'master-addons' ), |
| 264 |
'type' => Controls_Manager::SLIDER, |
| 265 |
'default' => [ |
| 266 |
'size' => '350', |
| 267 |
], |
| 268 |
'size_units' => [ |
| 269 |
'px', |
| 270 |
'em', |
| 271 |
], |
| 272 |
'range' => [ |
| 273 |
'px' => [ |
| 274 |
'min' => 50, |
| 275 |
'max' => 1000, |
| 276 |
], |
| 277 |
], |
| 278 |
'selectors' => [ |
| 279 |
'{{CURRENT_ITEM}} .tippy-box' => 'max-width: {{SIZE}}{{UNIT}};', |
| 280 |
], |
| 281 |
'condition' => [ |
| 282 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 283 |
], |
| 284 |
] |
| 285 |
); |
| 286 |
|
| 287 |
|
| 288 |
$name->add_group_control( |
| 289 |
Group_Control_Typography::get_type(), |
| 290 |
[ |
| 291 |
'name' => 'jltma_logo_slider_tooltip_typography', |
| 292 |
'selector' => '{{CURRENT_ITEM}} .tippy-box', |
| 293 |
'condition' => [ |
| 294 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 295 |
], |
| 296 |
] |
| 297 |
); |
| 298 |
|
| 299 |
$name->add_control( |
| 300 |
'jltma_logo_slider_tooltip_color', |
| 301 |
[ |
| 302 |
'label' => esc_html__('Text Color', 'master-addons' ), |
| 303 |
'type' => Controls_Manager::COLOR, |
| 304 |
'selectors' => [ |
| 305 |
'{{CURRENT_ITEM}} .tippy-box .tippy-content' => 'color: {{VALUE}} !important', |
| 306 |
], |
| 307 |
'condition' => [ |
| 308 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 309 |
], |
| 310 |
] |
| 311 |
); |
| 312 |
|
| 313 |
$name->add_control( |
| 314 |
'jltma_logo_slider_tooltip_background', |
| 315 |
[ |
| 316 |
'label' => __('Background Color', 'master-addons' ), |
| 317 |
'type' => Controls_Manager::COLOR, |
| 318 |
'default' => '#000000', |
| 319 |
'selectors' => [ |
| 320 |
'{{CURRENT_ITEM}} .tippy-box' => 'background-color: {{VALUE}};', |
| 321 |
'{{CURRENT_ITEM}} .tippy-box[data-placement^=top] .tippy-arrow, {{CURRENT_ITEM}} .tippy-box[data-placement^=bottom] .tippy-arrow, {{CURRENT_ITEM}} .tippy-box[data-placement^=left] .tippy-arrow, {{CURRENT_ITEM}} .tippy-box[data-placement^=right] .tippy-arrow' => 'color: {{VALUE}};', |
| 322 |
'{{CURRENT_ITEM}} .tippy-box .tippy-svg-arrow' => 'fill: {{VALUE}};', |
| 323 |
], |
| 324 |
'condition' => [ |
| 325 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 326 |
], |
| 327 |
] |
| 328 |
); |
| 329 |
|
| 330 |
$name->add_control( |
| 331 |
'jltma_logo_slider_tooltip_arrow_color', |
| 332 |
[ |
| 333 |
'label' => esc_html__('Arrow Color', 'master-addons' ), |
| 334 |
'type' => Controls_Manager::COLOR, |
| 335 |
'selectors' => [ |
| 336 |
'{{CURRENT_ITEM}} .tippy-box[data-placement^=top]>.tippy-arrow:before' => 'border-top-color: {{VALUE}};', |
| 337 |
'{{CURRENT_ITEM}} .tippy-box[data-placement^=bottom]>.tippy-arrow:before' => 'border-bottom-color: {{VALUE}};', |
| 338 |
'{{CURRENT_ITEM}} .tippy-box[data-placement^=left]>.tippy-arrow:before' => 'border-left-color: {{VALUE}};', |
| 339 |
'{{CURRENT_ITEM}} .tippy-box[data-placement^=righ]>.tippy-arrow:before' => 'border-righ-color: {{VALUE}};', |
| 340 |
], |
| 341 |
'condition' => [ |
| 342 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 343 |
], |
| 344 |
'separator' => 'after', |
| 345 |
] |
| 346 |
); |
| 347 |
|
| 348 |
$name->add_responsive_control( |
| 349 |
'jltma_logo_slider_tooltip_padding', |
| 350 |
[ |
| 351 |
'label' => __('Padding', 'master-addons' ), |
| 352 |
'type' => Controls_Manager::DIMENSIONS, |
| 353 |
'size_units' => ['px', '%'], |
| 354 |
'selectors' => [ |
| 355 |
'{{CURRENT_ITEM}} .tippy-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 356 |
], |
| 357 |
'condition' => [ |
| 358 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 359 |
], |
| 360 |
] |
| 361 |
); |
| 362 |
|
| 363 |
$name->add_group_control( |
| 364 |
Group_Control_Border::get_type(), |
| 365 |
[ |
| 366 |
'name' => 'jltma_logo_slider_tooltip_border', |
| 367 |
'label' => esc_html__('Border', 'master-addons' ), |
| 368 |
'placeholder' => '1px', |
| 369 |
'default' => '1px', |
| 370 |
'selector' => '{{CURRENT_ITEM}} .tippy-box', |
| 371 |
'condition' => [ |
| 372 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 373 |
], |
| 374 |
] |
| 375 |
); |
| 376 |
|
| 377 |
$name->add_responsive_control( |
| 378 |
'jltma_logo_slider_tooltip_border_radius', |
| 379 |
[ |
| 380 |
'label' => __('Border Radius', 'master-addons' ), |
| 381 |
'type' => Controls_Manager::DIMENSIONS, |
| 382 |
'size_units' => ['px', '%'], |
| 383 |
'selectors' => [ |
| 384 |
'{{CURRENT_ITEM}} .tippy-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 385 |
], |
| 386 |
'condition' => [ |
| 387 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 388 |
], |
| 389 |
] |
| 390 |
); |
| 391 |
|
| 392 |
|
| 393 |
$name->add_control( |
| 394 |
'jltma_logo_slider_tooltip_text_align', |
| 395 |
[ |
| 396 |
'label' => esc_html__('Text Alignment', 'master-addons' ), |
| 397 |
'type' => Controls_Manager::CHOOSE, |
| 398 |
'default' => 'center', |
| 399 |
'options' => [ |
| 400 |
'left' => [ |
| 401 |
'title' => esc_html__('Left', 'master-addons' ), |
| 402 |
'icon' => 'eicon-text-align-left', |
| 403 |
], |
| 404 |
'center' => [ |
| 405 |
'title' => esc_html__('Center', 'master-addons' ), |
| 406 |
'icon' => 'eicon-text-align-center', |
| 407 |
], |
| 408 |
'right' => [ |
| 409 |
'title' => esc_html__('Right', 'master-addons' ), |
| 410 |
'icon' => 'eicon-text-align-right', |
| 411 |
], |
| 412 |
], |
| 413 |
'selectors' => [ |
| 414 |
'{{CURRENT_ITEM}} .tippy-box .tippy-content' => 'text-align: {{VALUE}};', |
| 415 |
], |
| 416 |
'condition' => [ |
| 417 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 418 |
], |
| 419 |
'separator' => 'before', |
| 420 |
] |
| 421 |
); |
| 422 |
|
| 423 |
$name->add_group_control( |
| 424 |
Group_Control_Box_Shadow::get_type(), |
| 425 |
[ |
| 426 |
'name' => 'jltma_logo_slider_tooltip_box_shadow', |
| 427 |
'selector' => '{{CURRENT_ITEM}} .tippy-box', |
| 428 |
'condition' => [ |
| 429 |
'jltma_logo_slider_tooltip_enable' => 'yes', |
| 430 |
], |
| 431 |
] |
| 432 |
); |
| 433 |
|
| 434 |
$name->end_controls_tab(); |
| 435 |
|
| 436 |
$name->end_controls_tabs(); |
| 437 |
} |
| 438 |
|
| 439 |
|
| 440 |
// Controls for Navigation |
| 441 |
protected function jltma_swiper_navigation_controls() |
| 442 |
{ |
| 443 |
$this->add_control( |
| 444 |
'navigation', |
| 445 |
[ |
| 446 |
'label' => __('Navigation', 'master-addons' ), |
| 447 |
'type' => Controls_Manager::SELECT, |
| 448 |
'default' => 'arrows', |
| 449 |
'options' => [ |
| 450 |
'both' => esc_html__('Arrows and Dots', 'master-addons' ), |
| 451 |
'arrows-fraction' => esc_html__('Arrows and Fraction', 'master-addons' ), |
| 452 |
'arrows' => esc_html__('Arrows', 'master-addons' ), |
| 453 |
'dots' => esc_html__('Dots', 'master-addons' ), |
| 454 |
'progressbar' => esc_html__('Progress', 'master-addons' ), |
| 455 |
'none' => esc_html__('None', 'master-addons' ), |
| 456 |
], |
| 457 |
'prefix_class' => 'jltma-navigation-type-', |
| 458 |
'render_type' => 'template', |
| 459 |
] |
| 460 |
); |
| 461 |
|
| 462 |
|
| 463 |
$this->add_control( |
| 464 |
'dynamic_bullets', |
| 465 |
[ |
| 466 |
'label' => __('Dynamic Bullets?', 'master-addons' ), |
| 467 |
'type' => Controls_Manager::SWITCHER, |
| 468 |
'condition' => [ |
| 469 |
'navigation' => ['dots', 'both'], |
| 470 |
], |
| 471 |
] |
| 472 |
); |
| 473 |
|
| 474 |
$this->add_control( |
| 475 |
'show_scrollbar', |
| 476 |
[ |
| 477 |
'label' => __('Show Scrollbar?', 'master-addons' ), |
| 478 |
'type' => Controls_Manager::SWITCHER, |
| 479 |
'frontend_available' => true |
| 480 |
] |
| 481 |
); |
| 482 |
|
| 483 |
|
| 484 |
$this->add_control( |
| 485 |
'both_position', |
| 486 |
[ |
| 487 |
'label' => __('Arrows and Dots Position', 'master-addons' ), |
| 488 |
'type' => Controls_Manager::SELECT, |
| 489 |
'default' => 'center', |
| 490 |
'options' => Helper::jltma_carousel_navigation_position(), |
| 491 |
'condition' => [ |
| 492 |
'navigation' => 'both', |
| 493 |
], |
| 494 |
|
| 495 |
] |
| 496 |
); |
| 497 |
|
| 498 |
$this->add_control( |
| 499 |
'arrows_fraction_position', |
| 500 |
[ |
| 501 |
'label' => __('Arrows and Fraction Position', 'master-addons' ), |
| 502 |
'type' => Controls_Manager::SELECT, |
| 503 |
'default' => 'center', |
| 504 |
'options' => Helper::jltma_carousel_navigation_position(), |
| 505 |
'condition' => [ |
| 506 |
'navigation' => 'arrows-fraction', |
| 507 |
], |
| 508 |
|
| 509 |
] |
| 510 |
); |
| 511 |
|
| 512 |
$this->add_control( |
| 513 |
'arrows_position', |
| 514 |
[ |
| 515 |
'label' => __('Arrows Position', 'master-addons' ), |
| 516 |
'type' => Controls_Manager::SELECT, |
| 517 |
'default' => 'center', |
| 518 |
'options' => Helper::jltma_carousel_navigation_position(), |
| 519 |
'condition' => [ |
| 520 |
'navigation' => 'arrows', |
| 521 |
], |
| 522 |
|
| 523 |
] |
| 524 |
); |
| 525 |
|
| 526 |
$this->add_control( |
| 527 |
'arrows_placement', |
| 528 |
[ |
| 529 |
'type' => Controls_Manager::SELECT, |
| 530 |
'label' => __('Placement', 'master-addons' ), |
| 531 |
'default' => 'inside', |
| 532 |
'options' => [ |
| 533 |
'inside' => __('Inside', 'master-addons' ), |
| 534 |
'outside' => __('Outside', 'master-addons' ), |
| 535 |
], |
| 536 |
'condition' => [ |
| 537 |
'navigation' => 'arrows', |
| 538 |
] |
| 539 |
] |
| 540 |
); |
| 541 |
|
| 542 |
$this->add_control( |
| 543 |
'dots_position', |
| 544 |
[ |
| 545 |
'label' => __('Dots Position', 'master-addons' ), |
| 546 |
'type' => Controls_Manager::SELECT, |
| 547 |
'default' => 'bottom-center', |
| 548 |
'options' => Helper::jltma_carousel_pagination_position(), |
| 549 |
'condition' => [ |
| 550 |
'navigation' => 'dots', |
| 551 |
], |
| 552 |
|
| 553 |
] |
| 554 |
); |
| 555 |
|
| 556 |
$this->add_control( |
| 557 |
'progress_position', |
| 558 |
[ |
| 559 |
'label' => __('Progress Position', 'master-addons' ), |
| 560 |
'type' => Controls_Manager::SELECT, |
| 561 |
'default' => 'bottom', |
| 562 |
'options' => [ |
| 563 |
'bottom' => esc_html__('Bottom', 'master-addons' ), |
| 564 |
'top' => esc_html__('Top', 'master-addons' ), |
| 565 |
], |
| 566 |
'condition' => [ |
| 567 |
'navigation' => 'progressbar', |
| 568 |
], |
| 569 |
|
| 570 |
] |
| 571 |
); |
| 572 |
|
| 573 |
$this->add_control( |
| 574 |
'hide_arrow_on_mobile', |
| 575 |
[ |
| 576 |
'label' => __('Hide Arrow on Mobile ?', 'master-addons' ), |
| 577 |
'type' => Controls_Manager::SWITCHER, |
| 578 |
'default' => 'yes', |
| 579 |
'condition' => [ |
| 580 |
'navigation' => ['arrows-fraction', 'arrows', 'both'], |
| 581 |
], |
| 582 |
] |
| 583 |
); |
| 584 |
|
| 585 |
// Arrow Icons |
| 586 |
$this->start_controls_tabs('carousel_arrow_controls_tabs'); |
| 587 |
|
| 588 |
// Next Icon Tab |
| 589 |
$this->start_controls_tab( |
| 590 |
'carousel_arrow_next_tab', |
| 591 |
[ |
| 592 |
'label' => __('Next', 'master-addons' ), |
| 593 |
'condition' => [ |
| 594 |
'navigation' => ['arrows-fraction', 'both', 'arrows'], |
| 595 |
] |
| 596 |
|
| 597 |
] |
| 598 |
); |
| 599 |
|
| 600 |
$this->add_control( |
| 601 |
'nav_arrows_next_icon', |
| 602 |
[ |
| 603 |
'label' => esc_html__('Next Icon', 'master-addons' ), |
| 604 |
'description' => esc_html__('Please choose an icon from the list.', 'master-addons' ), |
| 605 |
'type' => Controls_Manager::ICONS, |
| 606 |
'fa4compatibility' => 'icon', |
| 607 |
'default' => [ |
| 608 |
'value' => 'eicon-chevron-right', |
| 609 |
'library' => 'solid', |
| 610 |
], |
| 611 |
'render_type' => 'template', |
| 612 |
'condition' => [ |
| 613 |
'navigation' => ['arrows-fraction', 'both', 'arrows'], |
| 614 |
], |
| 615 |
] |
| 616 |
); |
| 617 |
|
| 618 |
$this->end_controls_tab(); |
| 619 |
|
| 620 |
|
| 621 |
// Previous Icon Tab |
| 622 |
$this->start_controls_tab( |
| 623 |
'carousel_arrow_prev_tab', |
| 624 |
[ |
| 625 |
'label' => __('Previous', 'master-addons' ), |
| 626 |
'condition' => [ |
| 627 |
'navigation' => ['arrows-fraction', 'both', 'arrows'], |
| 628 |
] |
| 629 |
|
| 630 |
] |
| 631 |
); |
| 632 |
|
| 633 |
$this->add_control( |
| 634 |
'nav_arrows_prev_icon', |
| 635 |
[ |
| 636 |
'label' => esc_html__('Previous Icon', 'master-addons' ), |
| 637 |
'description' => esc_html__('Please choose an icon from the list.', 'master-addons' ), |
| 638 |
'type' => Controls_Manager::ICONS, |
| 639 |
'fa4compatibility' => 'icon', |
| 640 |
'default' => [ |
| 641 |
'value' => 'eicon-chevron-left', |
| 642 |
'library' => 'solid', |
| 643 |
], |
| 644 |
'render_type' => 'template', |
| 645 |
'condition' => [ |
| 646 |
'navigation' => ['arrows-fraction', 'both', 'arrows'], |
| 647 |
], |
| 648 |
] |
| 649 |
); |
| 650 |
|
| 651 |
$this->end_controls_tab(); |
| 652 |
$this->end_controls_tabs(); |
| 653 |
} |
| 654 |
|
| 655 |
|
| 656 |
// Controls Settings for Carousel |
| 657 |
protected function jltma_swiper_settings_controls() |
| 658 |
{ |
| 659 |
|
| 660 |
$this->add_control( |
| 661 |
'skin', |
| 662 |
[ |
| 663 |
'label' => esc_html__('Layout', 'master-addons' ), |
| 664 |
'type' => Controls_Manager::SELECT, |
| 665 |
'default' => 'carousel', |
| 666 |
'options' => [ |
| 667 |
'carousel' => esc_html__('Carousel', 'master-addons' ), |
| 668 |
'coverflow' => esc_html__('Coverflow', 'master-addons' ), |
| 669 |
], |
| 670 |
'prefix_class' => 'jltma-carousel-style-', |
| 671 |
'render_type' => 'template', |
| 672 |
] |
| 673 |
); |
| 674 |
|
| 675 |
|
| 676 |
$this->add_control( |
| 677 |
'autoheight', |
| 678 |
[ |
| 679 |
'type' => Controls_Manager::SWITCHER, |
| 680 |
'label' => __('Auto Height', 'master-addons' ), |
| 681 |
'default' => 'yes', |
| 682 |
'frontend_available' => true |
| 683 |
] |
| 684 |
); |
| 685 |
|
| 686 |
$this->add_control( |
| 687 |
'carousel_height', |
| 688 |
[ |
| 689 |
'label' => __('Custom Height', 'master-addons' ), |
| 690 |
'description' => __('The carousel needs to have a fixed defined height to work in vertical mode.', 'master-addons' ), |
| 691 |
'type' => Controls_Manager::SLIDER, |
| 692 |
'size_units' => [ |
| 693 |
'px', '%', 'vh' |
| 694 |
], |
| 695 |
'default' => [ |
| 696 |
'size' => 500, |
| 697 |
'unit' => 'px', |
| 698 |
], |
| 699 |
'range' => [ |
| 700 |
'px' => [ |
| 701 |
'min' => 200, |
| 702 |
'max' => 2000, |
| 703 |
], |
| 704 |
'%' => [ |
| 705 |
'min' => 0, |
| 706 |
'max' => 100, |
| 707 |
], |
| 708 |
'vh' => [ |
| 709 |
'min' => 0, |
| 710 |
'max' => 100, |
| 711 |
], |
| 712 |
], |
| 713 |
'selectors' => [ |
| 714 |
'{{WRAPPER}} .jltma-swiper__container' => 'height: {{SIZE}}{{UNIT}};', |
| 715 |
], |
| 716 |
'condition' => [ |
| 717 |
'autoheight!' => 'yes' |
| 718 |
], |
| 719 |
] |
| 720 |
); |
| 721 |
|
| 722 |
|
| 723 |
$this->add_control( |
| 724 |
'coverflow_toggle', |
| 725 |
[ |
| 726 |
'label' => __('Coverflow Effect', 'master-addons' ), |
| 727 |
'type' => Controls_Manager::POPOVER_TOGGLE, |
| 728 |
'return_value' => 'yes', |
| 729 |
'condition' => [ |
| 730 |
'skin' => 'coverflow' |
| 731 |
] |
| 732 |
] |
| 733 |
); |
| 734 |
|
| 735 |
$this->start_popover(); |
| 736 |
|
| 737 |
$this->add_control( |
| 738 |
'coverflow_rotate', |
| 739 |
[ |
| 740 |
'label' => esc_html__('Rotate', 'master-addons' ), |
| 741 |
'type' => Controls_Manager::SLIDER, |
| 742 |
'default' => [ |
| 743 |
'size' => 50, |
| 744 |
], |
| 745 |
'range' => [ |
| 746 |
'px' => [ |
| 747 |
'min' => -360, |
| 748 |
'max' => 360, |
| 749 |
'step' => 5, |
| 750 |
], |
| 751 |
], |
| 752 |
'condition' => [ |
| 753 |
'coverflow_toggle' => 'yes' |
| 754 |
], |
| 755 |
'render_type' => 'template', |
| 756 |
] |
| 757 |
); |
| 758 |
|
| 759 |
$this->add_control( |
| 760 |
'coverflow_stretch', |
| 761 |
[ |
| 762 |
'label' => __('Stretch', 'master-addons' ), |
| 763 |
'type' => Controls_Manager::SLIDER, |
| 764 |
'default' => [ |
| 765 |
'size' => 0, |
| 766 |
], |
| 767 |
'range' => [ |
| 768 |
'px' => [ |
| 769 |
'min' => 0, |
| 770 |
'step' => 10, |
| 771 |
'max' => 100, |
| 772 |
], |
| 773 |
], |
| 774 |
'condition' => [ |
| 775 |
'coverflow_toggle' => 'yes' |
| 776 |
], |
| 777 |
'render_type' => 'template', |
| 778 |
] |
| 779 |
); |
| 780 |
|
| 781 |
$this->add_control( |
| 782 |
'coverflow_modifier', |
| 783 |
[ |
| 784 |
'label' => __('Modifier', 'master-addons' ), |
| 785 |
'type' => Controls_Manager::SLIDER, |
| 786 |
'default' => [ |
| 787 |
'size' => 1, |
| 788 |
], |
| 789 |
'range' => [ |
| 790 |
'px' => [ |
| 791 |
'min' => 1, |
| 792 |
'step' => 1, |
| 793 |
'max' => 10, |
| 794 |
], |
| 795 |
], |
| 796 |
'condition' => [ |
| 797 |
'coverflow_toggle' => 'yes' |
| 798 |
], |
| 799 |
'render_type' => 'template', |
| 800 |
] |
| 801 |
); |
| 802 |
|
| 803 |
$this->add_control( |
| 804 |
'coverflow_depth', |
| 805 |
[ |
| 806 |
'label' => __('Depth', 'master-addons' ), |
| 807 |
'type' => Controls_Manager::SLIDER, |
| 808 |
'default' => [ |
| 809 |
'size' => 100, |
| 810 |
], |
| 811 |
'range' => [ |
| 812 |
'px' => [ |
| 813 |
'min' => 0, |
| 814 |
'step' => 10, |
| 815 |
'max' => 1000, |
| 816 |
], |
| 817 |
], |
| 818 |
'condition' => [ |
| 819 |
'coverflow_toggle' => 'yes' |
| 820 |
], |
| 821 |
'render_type' => 'template', |
| 822 |
] |
| 823 |
); |
| 824 |
|
| 825 |
$this->end_popover(); |
| 826 |
|
| 827 |
$this->add_control( |
| 828 |
'hr_005', |
| 829 |
[ |
| 830 |
'type' => Controls_Manager::DIVIDER, |
| 831 |
'condition' => [ |
| 832 |
'skin' => 'coverflow' |
| 833 |
] |
| 834 |
] |
| 835 |
); |
| 836 |
|
| 837 |
$this->add_control( |
| 838 |
'autoplay', |
| 839 |
[ |
| 840 |
'label' => __('Autoplay', 'master-addons' ), |
| 841 |
'type' => Controls_Manager::SWITCHER, |
| 842 |
'default' => 'yes', |
| 843 |
|
| 844 |
] |
| 845 |
); |
| 846 |
|
| 847 |
$this->add_control( |
| 848 |
'autoplay_speed', |
| 849 |
[ |
| 850 |
'label' => esc_html__('Autoplay Speed', 'master-addons' ), |
| 851 |
'type' => Controls_Manager::NUMBER, |
| 852 |
'default' => 5000, |
| 853 |
'condition' => [ |
| 854 |
'autoplay' => 'yes', |
| 855 |
], |
| 856 |
] |
| 857 |
); |
| 858 |
|
| 859 |
$this->add_control( |
| 860 |
'pauseonhover', |
| 861 |
[ |
| 862 |
'label' => esc_html__('Pause on Hover', 'master-addons' ), |
| 863 |
'type' => Controls_Manager::SWITCHER, |
| 864 |
] |
| 865 |
); |
| 866 |
|
| 867 |
$this->add_responsive_control( |
| 868 |
'slides_to_scroll', |
| 869 |
[ |
| 870 |
'type' => Controls_Manager::SELECT, |
| 871 |
'label' => esc_html__('Slides to Scroll', 'master-addons' ), |
| 872 |
'default' => 1, |
| 873 |
'tablet_default' => 1, |
| 874 |
'mobile_default' => 1, |
| 875 |
'options' => [ |
| 876 |
1 => '1', |
| 877 |
2 => '2', |
| 878 |
3 => '3', |
| 879 |
4 => '4', |
| 880 |
5 => '5', |
| 881 |
6 => '6', |
| 882 |
], |
| 883 |
] |
| 884 |
); |
| 885 |
|
| 886 |
$this->add_control( |
| 887 |
'centered_slides', |
| 888 |
[ |
| 889 |
'label' => __('Center Slide', 'master-addons' ), |
| 890 |
'description' => __('Use even items from Layout > Columns settings for better preview.', 'master-addons' ), |
| 891 |
'type' => Controls_Manager::SWITCHER, |
| 892 |
] |
| 893 |
); |
| 894 |
|
| 895 |
$this->add_control( |
| 896 |
'grab_cursor', |
| 897 |
[ |
| 898 |
'label' => __('Grab Cursor', 'master-addons' ), |
| 899 |
'type' => Controls_Manager::SWITCHER, |
| 900 |
] |
| 901 |
); |
| 902 |
|
| 903 |
$this->add_control( |
| 904 |
'free_mode', |
| 905 |
[ |
| 906 |
'label' => __('Drag Free Mode', 'master-addons' ) . JLTMA_NEW_FEATURE, |
| 907 |
'type' => Controls_Manager::SWITCHER, |
| 908 |
] |
| 909 |
); |
| 910 |
|
| 911 |
$this->add_control( |
| 912 |
'loop', |
| 913 |
[ |
| 914 |
'label' => __('Loop', 'master-addons' ), |
| 915 |
'type' => Controls_Manager::SWITCHER, |
| 916 |
'default' => 'yes', |
| 917 |
|
| 918 |
] |
| 919 |
); |
| 920 |
|
| 921 |
|
| 922 |
$this->add_control( |
| 923 |
'speed', |
| 924 |
[ |
| 925 |
'label' => __('Animation Speed (ms)', 'master-addons' ), |
| 926 |
'type' => Controls_Manager::SLIDER, |
| 927 |
'default' => [ |
| 928 |
'size' => 500, |
| 929 |
], |
| 930 |
'range' => [ |
| 931 |
'px' => [ |
| 932 |
'min' => 100, |
| 933 |
'max' => 5000, |
| 934 |
'step' => 50, |
| 935 |
], |
| 936 |
], |
| 937 |
] |
| 938 |
); |
| 939 |
|
| 940 |
$this->add_control( |
| 941 |
'observer', |
| 942 |
[ |
| 943 |
'label' => __('Observer', 'master-addons' ), |
| 944 |
'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'master-addons' ), |
| 945 |
'type' => Controls_Manager::SWITCHER, |
| 946 |
] |
| 947 |
); |
| 948 |
} |
| 949 |
|
| 950 |
|
| 951 |
// Item Style Tab |
| 952 |
protected function jltma_swiper_item_style_controls($name) |
| 953 |
{ |
| 954 |
|
| 955 |
//Style |
| 956 |
$this->start_controls_section( |
| 957 |
'section_style_item', |
| 958 |
[ |
| 959 |
'label' => esc_html__('Carousel Items', 'master-addons' ), |
| 960 |
'tab' => Controls_Manager::TAB_STYLE, |
| 961 |
] |
| 962 |
); |
| 963 |
|
| 964 |
$this->start_controls_tabs('tabs_item_style'); |
| 965 |
|
| 966 |
$this->start_controls_tab( |
| 967 |
'tab_item_normal', |
| 968 |
[ |
| 969 |
'label' => esc_html__('Normal', 'master-addons' ), |
| 970 |
] |
| 971 |
); |
| 972 |
|
| 973 |
$this->add_control( |
| 974 |
'item_background', |
| 975 |
[ |
| 976 |
'label' => esc_html__('Background', 'master-addons' ), |
| 977 |
'type' => Controls_Manager::COLOR, |
| 978 |
'selectors' => [ |
| 979 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide' => 'background-color: {{VALUE}};', |
| 980 |
], |
| 981 |
] |
| 982 |
); |
| 983 |
|
| 984 |
$this->add_group_control( |
| 985 |
Group_Control_Border::get_type(), |
| 986 |
[ |
| 987 |
'name' => 'item_border', |
| 988 |
'label' => esc_html__('Border Color', 'master-addons' ), |
| 989 |
'placeholder' => '1px', |
| 990 |
'default' => '1px', |
| 991 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide', |
| 992 |
'separator' => 'before', |
| 993 |
] |
| 994 |
); |
| 995 |
|
| 996 |
$this->add_responsive_control( |
| 997 |
'item_border_radius', |
| 998 |
[ |
| 999 |
'label' => esc_html__('Border Radius', 'master-addons' ), |
| 1000 |
'type' => Controls_Manager::DIMENSIONS, |
| 1001 |
'size_units' => ['px', '%'], |
| 1002 |
'selectors' => [ |
| 1003 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;', |
| 1004 |
], |
| 1005 |
] |
| 1006 |
); |
| 1007 |
|
| 1008 |
$this->add_group_control( |
| 1009 |
Group_Control_Box_Shadow::get_type(), |
| 1010 |
[ |
| 1011 |
'name' => 'item_shadow', |
| 1012 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide', |
| 1013 |
] |
| 1014 |
); |
| 1015 |
|
| 1016 |
$this->add_responsive_control( |
| 1017 |
'item_padding', |
| 1018 |
[ |
| 1019 |
'label' => esc_html__('Padding', 'master-addons' ), |
| 1020 |
'type' => Controls_Manager::DIMENSIONS, |
| 1021 |
'size_units' => ['px', 'em', '%'], |
| 1022 |
'selectors' => [ |
| 1023 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1024 |
|
| 1025 |
], |
| 1026 |
] |
| 1027 |
); |
| 1028 |
|
| 1029 |
$this->add_responsive_control( |
| 1030 |
'item_gap', |
| 1031 |
[ |
| 1032 |
'label' => esc_html__('Item Gap', 'master-addons' ), |
| 1033 |
'type' => Controls_Manager::SLIDER, |
| 1034 |
'default' => [ |
| 1035 |
'size' => 35, |
| 1036 |
'unit' => 'px', |
| 1037 |
], |
| 1038 |
'tablet_default' => [ |
| 1039 |
'size' => 35, |
| 1040 |
'unit' => 'px', |
| 1041 |
], |
| 1042 |
'mobile_default' => [ |
| 1043 |
'size' => 20, |
| 1044 |
'unit' => 'px', |
| 1045 |
], |
| 1046 |
'range' => [ |
| 1047 |
'px' => [ |
| 1048 |
'min' => 0, |
| 1049 |
'max' => 100, |
| 1050 |
], |
| 1051 |
], |
| 1052 |
'frontend_available' => true, |
| 1053 |
] |
| 1054 |
); |
| 1055 |
|
| 1056 |
$this->add_control( |
| 1057 |
'shadow_mode', |
| 1058 |
[ |
| 1059 |
'label' => esc_html__('Shadow Mode', 'master-addons' ), |
| 1060 |
'type' => Controls_Manager::SWITCHER, |
| 1061 |
'prefix_class' => 'jltma-shadow-mode-', |
| 1062 |
] |
| 1063 |
); |
| 1064 |
|
| 1065 |
$this->add_control( |
| 1066 |
'shadow_color', |
| 1067 |
[ |
| 1068 |
'label' => esc_html__('Shadow Color', 'master-addons' ), |
| 1069 |
'type' => Controls_Manager::COLOR, |
| 1070 |
'condition' => [ |
| 1071 |
'shadow_mode' => 'yes', |
| 1072 |
], |
| 1073 |
'selectors' => [ |
| 1074 |
'{{WRAPPER}} .jltma-team-carousel-slider:before' => is_rtl() ? 'background: linear-gradient(to left, {{VALUE}} 5%,rgba(255,255,255,0) 100%);' : 'background: linear-gradient(to right, {{VALUE}} 5%,rgba(255,255,255,0) 100%);', |
| 1075 |
'{{WRAPPER}} .jltma-team-carousel-slider:after' => is_rtl() ? 'background: linear-gradient(to left, rgba(255,255,255,0) 0%, {{VALUE}} 95%);' : 'background: linear-gradient(to right, rgba(255,255,255,0) 0%, {{VALUE}} 95%);', |
| 1076 |
], |
| 1077 |
] |
| 1078 |
); |
| 1079 |
|
| 1080 |
$this->add_control( |
| 1081 |
'item_opacity', |
| 1082 |
[ |
| 1083 |
'label' => esc_html__('Opacity', 'master-addons' ) . JLTMA_NEW_FEATURE, |
| 1084 |
'type' => Controls_Manager::SLIDER, |
| 1085 |
'range' => [ |
| 1086 |
'px' => [ |
| 1087 |
'min' => 0, |
| 1088 |
'step' => 0.1, |
| 1089 |
'max' => 1, |
| 1090 |
], |
| 1091 |
], |
| 1092 |
'selectors' => [ |
| 1093 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide' => 'opacity: {{SIZE}};', |
| 1094 |
], |
| 1095 |
] |
| 1096 |
); |
| 1097 |
|
| 1098 |
$this->end_controls_tab(); |
| 1099 |
|
| 1100 |
$this->start_controls_tab( |
| 1101 |
'tab_item_hover', |
| 1102 |
[ |
| 1103 |
'label' => esc_html__('Hover', 'master-addons' ), |
| 1104 |
] |
| 1105 |
); |
| 1106 |
|
| 1107 |
$this->add_control( |
| 1108 |
'item_hover_background', |
| 1109 |
[ |
| 1110 |
'label' => esc_html__('Background', 'master-addons' ), |
| 1111 |
'type' => Controls_Manager::COLOR, |
| 1112 |
'selectors' => [ |
| 1113 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide:hover' => 'background-color: {{VALUE}};', |
| 1114 |
], |
| 1115 |
] |
| 1116 |
); |
| 1117 |
|
| 1118 |
$this->add_control( |
| 1119 |
'item_hover_border_color', |
| 1120 |
[ |
| 1121 |
'label' => esc_html__('Border Color', 'master-addons' ), |
| 1122 |
'type' => Controls_Manager::COLOR, |
| 1123 |
'condition' => [ |
| 1124 |
'item_border_border!' => '', |
| 1125 |
], |
| 1126 |
'selectors' => [ |
| 1127 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide:hover' => 'border-color: {{VALUE}};', |
| 1128 |
], |
| 1129 |
] |
| 1130 |
); |
| 1131 |
|
| 1132 |
$this->add_group_control( |
| 1133 |
Group_Control_Box_Shadow::get_type(), |
| 1134 |
[ |
| 1135 |
'name' => 'item_hover_shadow', |
| 1136 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide:hover', |
| 1137 |
] |
| 1138 |
); |
| 1139 |
|
| 1140 |
$this->add_responsive_control( |
| 1141 |
'item_shadow_padding', |
| 1142 |
[ |
| 1143 |
'label' => __('Match Padding', 'master-addons' ), |
| 1144 |
'description' => __('You have to add padding for matching overlaping hover shadow', 'master-addons' ), |
| 1145 |
'type' => Controls_Manager::SLIDER, |
| 1146 |
'range' => [ |
| 1147 |
'px' => [ |
| 1148 |
'min' => 0, |
| 1149 |
'step' => 1, |
| 1150 |
'max' => 50, |
| 1151 |
] |
| 1152 |
], |
| 1153 |
'default' => [ |
| 1154 |
'size' => 10 |
| 1155 |
], |
| 1156 |
'selectors' => [ |
| 1157 |
'{{WRAPPER}} .swiper' => 'padding: {{SIZE}}{{UNIT}}; margin: 0 -{{SIZE}}{{UNIT}};' |
| 1158 |
] |
| 1159 |
] |
| 1160 |
); |
| 1161 |
|
| 1162 |
$this->add_control( |
| 1163 |
'item_hover_opacity', |
| 1164 |
[ |
| 1165 |
'label' => esc_html__('Opacity', 'master-addons' ) . JLTMA_NEW_FEATURE, |
| 1166 |
'type' => Controls_Manager::SLIDER, |
| 1167 |
'range' => [ |
| 1168 |
'px' => [ |
| 1169 |
'min' => 0, |
| 1170 |
'step' => 0.1, |
| 1171 |
'max' => 1, |
| 1172 |
], |
| 1173 |
], |
| 1174 |
'selectors' => [ |
| 1175 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide:hover' => 'opacity: {{SIZE}};', |
| 1176 |
], |
| 1177 |
] |
| 1178 |
); |
| 1179 |
|
| 1180 |
$this->end_controls_tab(); |
| 1181 |
|
| 1182 |
$this->start_controls_tab( |
| 1183 |
'tab_item_active', |
| 1184 |
[ |
| 1185 |
'label' => __('Active', 'master-addons' ) . JLTMA_NEW_FEATURE, |
| 1186 |
] |
| 1187 |
); |
| 1188 |
|
| 1189 |
$this->add_control( |
| 1190 |
'item_active_background', |
| 1191 |
[ |
| 1192 |
'label' => __('Background', 'master-addons' ), |
| 1193 |
'type' => Controls_Manager::COLOR, |
| 1194 |
'selectors' => [ |
| 1195 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-swiper__slide.swiper-slide-active' => 'background-color: {{VALUE}};', |
| 1196 |
], |
| 1197 |
] |
| 1198 |
); |
| 1199 |
|
| 1200 |
$this->add_control( |
| 1201 |
'item_active_border_color', |
| 1202 |
[ |
| 1203 |
'label' => __('Border Color', 'master-addons' ), |
| 1204 |
'type' => Controls_Manager::COLOR, |
| 1205 |
'condition' => [ |
| 1206 |
'item_border_border!' => '', |
| 1207 |
], |
| 1208 |
'selectors' => [ |
| 1209 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-swiper__slide.swiper-slide-active' => 'border-color: {{VALUE}};', |
| 1210 |
], |
| 1211 |
] |
| 1212 |
); |
| 1213 |
|
| 1214 |
$this->add_group_control( |
| 1215 |
Group_Control_Box_Shadow::get_type(), |
| 1216 |
[ |
| 1217 |
'name' => 'item_active_shadow', |
| 1218 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-slider .jltma-swiper__slide.swiper-slide-active', |
| 1219 |
] |
| 1220 |
); |
| 1221 |
|
| 1222 |
$this->add_control( |
| 1223 |
'item_active_opacity', |
| 1224 |
[ |
| 1225 |
'label' => esc_html__('Opacity', 'master-addons' ), |
| 1226 |
'type' => Controls_Manager::SLIDER, |
| 1227 |
'range' => [ |
| 1228 |
'px' => [ |
| 1229 |
'min' => 0, |
| 1230 |
'step' => 0.1, |
| 1231 |
'max' => 1, |
| 1232 |
], |
| 1233 |
], |
| 1234 |
'selectors' => [ |
| 1235 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-swiper__slide.swiper-slide-active' => 'opacity: {{SIZE}};', |
| 1236 |
], |
| 1237 |
] |
| 1238 |
); |
| 1239 |
|
| 1240 |
$this->end_controls_tab(); |
| 1241 |
|
| 1242 |
$this->end_controls_tabs(); |
| 1243 |
|
| 1244 |
$this->end_controls_section(); |
| 1245 |
} |
| 1246 |
|
| 1247 |
|
| 1248 |
// Controls for Navigation |
| 1249 |
protected function jltma_swiper_navigation_style_controls($name) |
| 1250 |
{ |
| 1251 |
|
| 1252 |
$this->add_control( |
| 1253 |
'arrows_heading', |
| 1254 |
[ |
| 1255 |
'label' => __('A R R O W S', 'master-addons' ), |
| 1256 |
'type' => Controls_Manager::HEADING, |
| 1257 |
'condition' => [ |
| 1258 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1259 |
], |
| 1260 |
] |
| 1261 |
); |
| 1262 |
|
| 1263 |
$this->start_controls_tabs('tabs_navigation_arrows_style'); |
| 1264 |
|
| 1265 |
$this->start_controls_tab( |
| 1266 |
'tabs_nav_arrows_normal', |
| 1267 |
[ |
| 1268 |
'label' => __('Normal', 'master-addons' ), |
| 1269 |
'condition' => [ |
| 1270 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1271 |
], |
| 1272 |
] |
| 1273 |
); |
| 1274 |
|
| 1275 |
$this->add_control( |
| 1276 |
'arrows_color', |
| 1277 |
[ |
| 1278 |
'label' => __('Color', 'master-addons' ), |
| 1279 |
'type' => Controls_Manager::COLOR, |
| 1280 |
'selectors' => [ |
| 1281 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--prev i, {{WRAPPER}} .jltma-arrows .jltma-arrow--next i,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev i, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next i' => 'color: {{VALUE}}', |
| 1282 |
], |
| 1283 |
'condition' => [ |
| 1284 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1285 |
], |
| 1286 |
] |
| 1287 |
); |
| 1288 |
|
| 1289 |
$this->add_control( |
| 1290 |
'arrows_background', |
| 1291 |
[ |
| 1292 |
'label' => __('Background', 'master-addons' ), |
| 1293 |
'type' => Controls_Manager::COLOR, |
| 1294 |
'selectors' => [ |
| 1295 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-arrows .jltma-arrow--next,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next' => 'background-color: {{VALUE}}', |
| 1296 |
], |
| 1297 |
'condition' => [ |
| 1298 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1299 |
], |
| 1300 |
] |
| 1301 |
); |
| 1302 |
|
| 1303 |
$this->add_group_control( |
| 1304 |
Group_Control_Border::get_type(), |
| 1305 |
[ |
| 1306 |
'name' => 'nav_arrows_border', |
| 1307 |
'selector' => '{{WRAPPER}} .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-arrows .jltma-arrow--next,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next', |
| 1308 |
'condition' => [ |
| 1309 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1310 |
], |
| 1311 |
] |
| 1312 |
); |
| 1313 |
|
| 1314 |
$this->add_responsive_control( |
| 1315 |
'border_radius', |
| 1316 |
[ |
| 1317 |
'label' => __('Border Radius', 'master-addons' ), |
| 1318 |
'type' => Controls_Manager::DIMENSIONS, |
| 1319 |
'size_units' => ['px', '%'], |
| 1320 |
'selectors' => [ |
| 1321 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-arrows .jltma-arrow--next,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1322 |
], |
| 1323 |
'condition' => [ |
| 1324 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1325 |
], |
| 1326 |
] |
| 1327 |
); |
| 1328 |
|
| 1329 |
$this->add_responsive_control( |
| 1330 |
'arrows_padding', |
| 1331 |
[ |
| 1332 |
'label' => esc_html__('Padding', 'master-addons' ), |
| 1333 |
'type' => Controls_Manager::DIMENSIONS, |
| 1334 |
'size_units' => ['px', 'em', '%'], |
| 1335 |
'selectors' => [ |
| 1336 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-arrows .jltma-arrow--next,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1337 |
], |
| 1338 |
'condition' => [ |
| 1339 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1340 |
], |
| 1341 |
] |
| 1342 |
); |
| 1343 |
|
| 1344 |
$this->add_responsive_control( |
| 1345 |
'arrows_size', |
| 1346 |
[ |
| 1347 |
'label' => __('Size', 'master-addons' ), |
| 1348 |
'type' => Controls_Manager::SLIDER, |
| 1349 |
'range' => [ |
| 1350 |
'px' => [ |
| 1351 |
'min' => 10, |
| 1352 |
'max' => 100, |
| 1353 |
], |
| 1354 |
], |
| 1355 |
'selectors' => [ |
| 1356 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--prev i, {{WRAPPER}} .jltma-arrows .jltma-arrow--next i,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev i, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next i' => 'font-size: {{SIZE || 24}}{{UNIT}};', |
| 1357 |
], |
| 1358 |
'condition' => [ |
| 1359 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1360 |
], |
| 1361 |
] |
| 1362 |
); |
| 1363 |
|
| 1364 |
$this->add_responsive_control( |
| 1365 |
'arrows_space', |
| 1366 |
[ |
| 1367 |
'label' => __('Space Between Arrows', 'master-addons' ), |
| 1368 |
'type' => Controls_Manager::SLIDER, |
| 1369 |
'range' => [ |
| 1370 |
'px' => [ |
| 1371 |
'min' => 0, |
| 1372 |
'max' => 100, |
| 1373 |
], |
| 1374 |
], |
| 1375 |
'selectors' => [ |
| 1376 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev' => 'margin-right: {{SIZE}}px;', |
| 1377 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--prev' => 'margin-right: {{SIZE}}px !important;', |
| 1378 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next' => 'margin-left: {{SIZE}}px;', |
| 1379 |
'{{WRAPPER}} .jltma-arrows .jltma-arrow--next' => 'margin-left: {{SIZE}}px !important;', |
| 1380 |
], |
| 1381 |
'condition' => [ |
| 1382 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1383 |
'arrows_position!' => 'center', |
| 1384 |
], |
| 1385 |
] |
| 1386 |
); |
| 1387 |
|
| 1388 |
$this->add_group_control( |
| 1389 |
Group_Control_Box_Shadow::get_type(), |
| 1390 |
[ |
| 1391 |
'name' => 'arrows_box_shadow', |
| 1392 |
'selector' => '{{WRAPPER}} .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-arrows .jltma-arrow--next,{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next', |
| 1393 |
'condition' => [ |
| 1394 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1395 |
], |
| 1396 |
] |
| 1397 |
); |
| 1398 |
|
| 1399 |
$this->end_controls_tab(); |
| 1400 |
|
| 1401 |
$this->start_controls_tab( |
| 1402 |
'tabs_nav_arrows_hover', |
| 1403 |
[ |
| 1404 |
'label' => __('Hover', 'master-addons' ), |
| 1405 |
'condition' => [ |
| 1406 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1407 |
], |
| 1408 |
] |
| 1409 |
); |
| 1410 |
|
| 1411 |
$this->add_control( |
| 1412 |
'arrows_hover_color', |
| 1413 |
[ |
| 1414 |
'label' => __('Color', 'master-addons' ), |
| 1415 |
'type' => Controls_Manager::COLOR, |
| 1416 |
'selectors' => [ |
| 1417 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev:hover i, {{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next:hover i' => 'color: {{VALUE}}', |
| 1418 |
], |
| 1419 |
'condition' => [ |
| 1420 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1421 |
], |
| 1422 |
] |
| 1423 |
); |
| 1424 |
|
| 1425 |
$this->add_control( |
| 1426 |
'arrows_hover_background', |
| 1427 |
[ |
| 1428 |
'label' => __('Background', 'master-addons' ), |
| 1429 |
'type' => Controls_Manager::COLOR, |
| 1430 |
'selectors' => [ |
| 1431 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev:hover, {{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next:hover' => 'background-color: {{VALUE}}', |
| 1432 |
], |
| 1433 |
'condition' => [ |
| 1434 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1435 |
], |
| 1436 |
] |
| 1437 |
); |
| 1438 |
|
| 1439 |
$this->add_control( |
| 1440 |
'nav_arrows_hover_border_color', |
| 1441 |
[ |
| 1442 |
'label' => __('Border Color', 'master-addons' ), |
| 1443 |
'type' => Controls_Manager::COLOR, |
| 1444 |
'selectors' => [ |
| 1445 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev:hover, {{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next:hover' => 'border-color: {{VALUE}};', |
| 1446 |
], |
| 1447 |
'condition' => [ |
| 1448 |
'nav_arrows_border_border!' => '', |
| 1449 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1450 |
], |
| 1451 |
] |
| 1452 |
); |
| 1453 |
|
| 1454 |
$this->add_group_control( |
| 1455 |
Group_Control_Box_Shadow::get_type(), |
| 1456 |
[ |
| 1457 |
'name' => 'arrows_hover_box_shadow', |
| 1458 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev:hover, {{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next:hover', |
| 1459 |
'condition' => [ |
| 1460 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1461 |
], |
| 1462 |
] |
| 1463 |
); |
| 1464 |
|
| 1465 |
$this->end_controls_tab(); |
| 1466 |
|
| 1467 |
$this->end_controls_tabs(); |
| 1468 |
|
| 1469 |
$this->add_control( |
| 1470 |
'hr_1', |
| 1471 |
[ |
| 1472 |
'type' => Controls_Manager::DIVIDER, |
| 1473 |
'condition' => [ |
| 1474 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1475 |
], |
| 1476 |
] |
| 1477 |
); |
| 1478 |
|
| 1479 |
$this->add_control( |
| 1480 |
'dots_heading', |
| 1481 |
[ |
| 1482 |
'label' => __('D O T S', 'master-addons' ), |
| 1483 |
'type' => Controls_Manager::HEADING, |
| 1484 |
'condition' => [ |
| 1485 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1486 |
], |
| 1487 |
] |
| 1488 |
); |
| 1489 |
|
| 1490 |
$this->start_controls_tabs('tabs_navigation_dots_style'); |
| 1491 |
|
| 1492 |
$this->start_controls_tab( |
| 1493 |
'tabs_nav_dots_normal', |
| 1494 |
[ |
| 1495 |
'label' => __('Normal', 'master-addons' ), |
| 1496 |
'condition' => [ |
| 1497 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1498 |
], |
| 1499 |
] |
| 1500 |
); |
| 1501 |
|
| 1502 |
$this->add_control( |
| 1503 |
'dots_color', |
| 1504 |
[ |
| 1505 |
'label' => __('Color', 'master-addons' ), |
| 1506 |
'type' => Controls_Manager::COLOR, |
| 1507 |
'selectors' => [ |
| 1508 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet' => 'background-color: {{VALUE}}', |
| 1509 |
], |
| 1510 |
'condition' => [ |
| 1511 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1512 |
], |
| 1513 |
] |
| 1514 |
); |
| 1515 |
|
| 1516 |
$this->add_responsive_control( |
| 1517 |
'dots_space_between', |
| 1518 |
[ |
| 1519 |
'label' => __('Space Between', 'master-addons' ) . JLTMA_NEW_FEATURE, |
| 1520 |
'type' => Controls_Manager::SLIDER, |
| 1521 |
'selectors' => [ |
| 1522 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet' => 'margin:0 {{SIZE}}{{UNIT}};', |
| 1523 |
], |
| 1524 |
'condition' => [ |
| 1525 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1526 |
], |
| 1527 |
] |
| 1528 |
); |
| 1529 |
|
| 1530 |
$this->add_responsive_control( |
| 1531 |
'dots_size', |
| 1532 |
[ |
| 1533 |
'label' => __('Size', 'master-addons' ), |
| 1534 |
'type' => Controls_Manager::SLIDER, |
| 1535 |
'range' => [ |
| 1536 |
'px' => [ |
| 1537 |
'min' => 5, |
| 1538 |
'max' => 20, |
| 1539 |
], |
| 1540 |
], |
| 1541 |
'selectors' => [ |
| 1542 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};width: {{SIZE}}{{UNIT}};', |
| 1543 |
], |
| 1544 |
'condition' => [ |
| 1545 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1546 |
'advanced_dots_size' => '' |
| 1547 |
], |
| 1548 |
] |
| 1549 |
); |
| 1550 |
|
| 1551 |
$this->add_control( |
| 1552 |
'advanced_dots_size', |
| 1553 |
[ |
| 1554 |
'label' => __('Advanced Size', 'master-addons' ) . JLTMA_NEW_FEATURE, |
| 1555 |
'type' => Controls_Manager::SWITCHER, |
| 1556 |
'condition' => [ |
| 1557 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1558 |
], |
| 1559 |
] |
| 1560 |
); |
| 1561 |
|
| 1562 |
$this->add_responsive_control( |
| 1563 |
'advanced_dots_width', |
| 1564 |
[ |
| 1565 |
'label' => __('Width(px)', 'master-addons' ), |
| 1566 |
'type' => Controls_Manager::SLIDER, |
| 1567 |
'range' => [ |
| 1568 |
'px' => [ |
| 1569 |
'min' => 1, |
| 1570 |
'max' => 50, |
| 1571 |
], |
| 1572 |
], |
| 1573 |
'selectors' => [ |
| 1574 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};', |
| 1575 |
], |
| 1576 |
'condition' => [ |
| 1577 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1578 |
'advanced_dots_size' => 'yes' |
| 1579 |
], |
| 1580 |
] |
| 1581 |
); |
| 1582 |
|
| 1583 |
$this->add_responsive_control( |
| 1584 |
'advanced_dots_height', |
| 1585 |
[ |
| 1586 |
'label' => __('Height(px)', 'master-addons' ), |
| 1587 |
'type' => Controls_Manager::SLIDER, |
| 1588 |
'range' => [ |
| 1589 |
'px' => [ |
| 1590 |
'min' => 1, |
| 1591 |
'max' => 50, |
| 1592 |
], |
| 1593 |
], |
| 1594 |
'selectors' => [ |
| 1595 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};', |
| 1596 |
], |
| 1597 |
'condition' => [ |
| 1598 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1599 |
'advanced_dots_size' => 'yes' |
| 1600 |
], |
| 1601 |
] |
| 1602 |
); |
| 1603 |
|
| 1604 |
$this->add_responsive_control( |
| 1605 |
'advanced_dots_radius', |
| 1606 |
[ |
| 1607 |
'label' => esc_html__('Border Radius', 'master-addons' ), |
| 1608 |
'type' => Controls_Manager::DIMENSIONS, |
| 1609 |
'size_units' => ['px', '%'], |
| 1610 |
'selectors' => [ |
| 1611 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1612 |
], |
| 1613 |
'condition' => [ |
| 1614 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1615 |
'advanced_dots_size' => 'yes' |
| 1616 |
], |
| 1617 |
] |
| 1618 |
); |
| 1619 |
|
| 1620 |
$this->add_group_control( |
| 1621 |
Group_Control_Box_Shadow::get_type(), |
| 1622 |
[ |
| 1623 |
'name' => 'dots_box_shadow', |
| 1624 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet', |
| 1625 |
'condition' => [ |
| 1626 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1627 |
], |
| 1628 |
] |
| 1629 |
); |
| 1630 |
|
| 1631 |
$this->end_controls_tab(); |
| 1632 |
|
| 1633 |
$this->start_controls_tab( |
| 1634 |
'tabs_nav_dots_active', |
| 1635 |
[ |
| 1636 |
'label' => __('Active', 'master-addons' ), |
| 1637 |
'condition' => [ |
| 1638 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1639 |
], |
| 1640 |
] |
| 1641 |
); |
| 1642 |
|
| 1643 |
$this->add_control( |
| 1644 |
'active_dot_color', |
| 1645 |
[ |
| 1646 |
'label' => __('Color', 'master-addons' ), |
| 1647 |
'type' => Controls_Manager::COLOR, |
| 1648 |
'selectors' => [ |
| 1649 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}', |
| 1650 |
], |
| 1651 |
'condition' => [ |
| 1652 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1653 |
], |
| 1654 |
] |
| 1655 |
); |
| 1656 |
|
| 1657 |
$this->add_responsive_control( |
| 1658 |
'active_dots_size', |
| 1659 |
[ |
| 1660 |
'label' => __('Size', 'master-addons' ), |
| 1661 |
'type' => Controls_Manager::SLIDER, |
| 1662 |
'range' => [ |
| 1663 |
'px' => [ |
| 1664 |
'min' => 5, |
| 1665 |
'max' => 20, |
| 1666 |
], |
| 1667 |
], |
| 1668 |
'selectors' => [ |
| 1669 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet-active' => 'height: {{SIZE}}{{UNIT}};width: {{SIZE}}{{UNIT}};', |
| 1670 |
'{{WRAPPER}}' => '--jltma-swiper-dots-active-height: {{SIZE}}{{UNIT}};', |
| 1671 |
], |
| 1672 |
'condition' => [ |
| 1673 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1674 |
'advanced_dots_size' => '' |
| 1675 |
], |
| 1676 |
] |
| 1677 |
); |
| 1678 |
|
| 1679 |
$this->add_responsive_control( |
| 1680 |
'active_advanced_dots_width', |
| 1681 |
[ |
| 1682 |
'label' => __('Width(px)', 'master-addons' ), |
| 1683 |
'type' => Controls_Manager::SLIDER, |
| 1684 |
'range' => [ |
| 1685 |
'px' => [ |
| 1686 |
'min' => 1, |
| 1687 |
'max' => 50, |
| 1688 |
], |
| 1689 |
], |
| 1690 |
'selectors' => [ |
| 1691 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet-active' => 'width: {{SIZE}}{{UNIT}};', |
| 1692 |
], |
| 1693 |
'condition' => [ |
| 1694 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1695 |
'advanced_dots_size' => 'yes' |
| 1696 |
], |
| 1697 |
] |
| 1698 |
); |
| 1699 |
|
| 1700 |
$this->add_responsive_control( |
| 1701 |
'active_advanced_dots_height', |
| 1702 |
[ |
| 1703 |
'label' => __('Height(px)', 'master-addons' ), |
| 1704 |
'type' => Controls_Manager::SLIDER, |
| 1705 |
'range' => [ |
| 1706 |
'px' => [ |
| 1707 |
'min' => 1, |
| 1708 |
'max' => 50, |
| 1709 |
], |
| 1710 |
], |
| 1711 |
'selectors' => [ |
| 1712 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet-active' => 'height: {{SIZE}}{{UNIT}};', |
| 1713 |
'{{WRAPPER}}' => '--jltma-swiper-dots-active-height: {{SIZE}}{{UNIT}};', |
| 1714 |
], |
| 1715 |
'condition' => [ |
| 1716 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1717 |
'advanced_dots_size' => 'yes' |
| 1718 |
], |
| 1719 |
] |
| 1720 |
); |
| 1721 |
|
| 1722 |
$this->add_responsive_control( |
| 1723 |
'active_advanced_dots_radius', |
| 1724 |
[ |
| 1725 |
'label' => esc_html__('Border Radius', 'master-addons' ), |
| 1726 |
'type' => Controls_Manager::DIMENSIONS, |
| 1727 |
'size_units' => ['px', '%'], |
| 1728 |
'selectors' => [ |
| 1729 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet-active' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1730 |
], |
| 1731 |
'condition' => [ |
| 1732 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1733 |
'advanced_dots_size' => 'yes' |
| 1734 |
], |
| 1735 |
] |
| 1736 |
); |
| 1737 |
|
| 1738 |
$this->add_responsive_control( |
| 1739 |
'active_advanced_dots_align', |
| 1740 |
[ |
| 1741 |
'label' => __('Alignment', 'master-addons' ), |
| 1742 |
'type' => Controls_Manager::CHOOSE, |
| 1743 |
'options' => [ |
| 1744 |
'flex-start' => [ |
| 1745 |
'title' => __('Top', 'master-addons' ), |
| 1746 |
'icon' => 'eicon-v-align-top', |
| 1747 |
], |
| 1748 |
'center' => [ |
| 1749 |
'title' => __('Center', 'master-addons' ), |
| 1750 |
'icon' => 'eicon-v-align-middle', |
| 1751 |
], |
| 1752 |
'flex-end' => [ |
| 1753 |
'title' => __('Bottom', 'master-addons' ), |
| 1754 |
'icon' => 'eicon-v-align-bottom', |
| 1755 |
], |
| 1756 |
], |
| 1757 |
'selectors' => [ |
| 1758 |
|
| 1759 |
'{{WRAPPER}}' => '--jltma-swiper-dots-align: {{VALUE}};', |
| 1760 |
], |
| 1761 |
'condition' => [ |
| 1762 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1763 |
'advanced_dots_size' => 'yes' |
| 1764 |
], |
| 1765 |
] |
| 1766 |
); |
| 1767 |
|
| 1768 |
$this->add_group_control( |
| 1769 |
Group_Control_Box_Shadow::get_type(), |
| 1770 |
[ |
| 1771 |
'name' => 'dots_active_box_shadow', |
| 1772 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullet-active', |
| 1773 |
'condition' => [ |
| 1774 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1775 |
], |
| 1776 |
] |
| 1777 |
); |
| 1778 |
|
| 1779 |
$this->end_controls_tab(); |
| 1780 |
|
| 1781 |
$this->end_controls_tabs(); |
| 1782 |
|
| 1783 |
$this->add_control( |
| 1784 |
'hr_2', |
| 1785 |
[ |
| 1786 |
'type' => Controls_Manager::DIVIDER, |
| 1787 |
'condition' => [ |
| 1788 |
'navigation' => 'arrows-fraction', |
| 1789 |
], |
| 1790 |
] |
| 1791 |
); |
| 1792 |
|
| 1793 |
$this->add_control( |
| 1794 |
'fraction_heading', |
| 1795 |
[ |
| 1796 |
'label' => __('F R A C T I O N', 'master-addons' ), |
| 1797 |
'type' => Controls_Manager::HEADING, |
| 1798 |
'condition' => [ |
| 1799 |
'navigation' => 'arrows-fraction', |
| 1800 |
], |
| 1801 |
] |
| 1802 |
); |
| 1803 |
|
| 1804 |
$this->add_control( |
| 1805 |
'hr_12', |
| 1806 |
[ |
| 1807 |
'type' => Controls_Manager::DIVIDER, |
| 1808 |
'condition' => [ |
| 1809 |
'navigation' => 'arrows-fraction', |
| 1810 |
], |
| 1811 |
] |
| 1812 |
); |
| 1813 |
|
| 1814 |
$this->add_control( |
| 1815 |
'fraction_color', |
| 1816 |
[ |
| 1817 |
'label' => __('Color', 'master-addons' ), |
| 1818 |
'type' => Controls_Manager::COLOR, |
| 1819 |
'selectors' => [ |
| 1820 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-fraction' => 'color: {{VALUE}}', |
| 1821 |
], |
| 1822 |
'condition' => [ |
| 1823 |
'navigation' => 'arrows-fraction', |
| 1824 |
], |
| 1825 |
] |
| 1826 |
); |
| 1827 |
|
| 1828 |
$this->add_control( |
| 1829 |
'active_fraction_color', |
| 1830 |
[ |
| 1831 |
'label' => __('Active Color', 'master-addons' ), |
| 1832 |
'type' => Controls_Manager::COLOR, |
| 1833 |
'selectors' => [ |
| 1834 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-current' => 'color: {{VALUE}}', |
| 1835 |
], |
| 1836 |
'condition' => [ |
| 1837 |
'navigation' => 'arrows-fraction', |
| 1838 |
], |
| 1839 |
] |
| 1840 |
); |
| 1841 |
|
| 1842 |
$this->add_group_control( |
| 1843 |
Group_Control_Typography::get_type(), |
| 1844 |
[ |
| 1845 |
'name' => 'fraction_typography', |
| 1846 |
'label' => esc_html__('Typography', 'master-addons' ), |
| 1847 |
'selector' => '{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-fraction', |
| 1848 |
'condition' => [ |
| 1849 |
'navigation' => 'arrows-fraction', |
| 1850 |
], |
| 1851 |
] |
| 1852 |
); |
| 1853 |
|
| 1854 |
$this->add_control( |
| 1855 |
'hr_3', |
| 1856 |
[ |
| 1857 |
'type' => Controls_Manager::DIVIDER, |
| 1858 |
'condition' => [ |
| 1859 |
'navigation' => 'progressbar', |
| 1860 |
], |
| 1861 |
] |
| 1862 |
); |
| 1863 |
|
| 1864 |
$this->add_control( |
| 1865 |
'progresbar_heading', |
| 1866 |
[ |
| 1867 |
'label' => __('P R O G R E S B A R', 'master-addons' ), |
| 1868 |
'type' => Controls_Manager::HEADING, |
| 1869 |
'condition' => [ |
| 1870 |
'navigation' => 'progressbar', |
| 1871 |
], |
| 1872 |
] |
| 1873 |
); |
| 1874 |
|
| 1875 |
$this->add_control( |
| 1876 |
'hr_13', |
| 1877 |
[ |
| 1878 |
'type' => Controls_Manager::DIVIDER, |
| 1879 |
'condition' => [ |
| 1880 |
'navigation' => 'progressbar', |
| 1881 |
], |
| 1882 |
] |
| 1883 |
); |
| 1884 |
|
| 1885 |
$this->add_control( |
| 1886 |
'progresbar_color', |
| 1887 |
[ |
| 1888 |
'label' => __('Bar Color', 'master-addons' ), |
| 1889 |
'type' => Controls_Manager::COLOR, |
| 1890 |
'selectors' => [ |
| 1891 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-progressbar' => 'background-color: {{VALUE}}', |
| 1892 |
], |
| 1893 |
'condition' => [ |
| 1894 |
'navigation' => 'progressbar', |
| 1895 |
], |
| 1896 |
] |
| 1897 |
); |
| 1898 |
|
| 1899 |
$this->add_control( |
| 1900 |
'progres_color', |
| 1901 |
[ |
| 1902 |
'label' => __('Progress Color', 'master-addons' ), |
| 1903 |
'type' => Controls_Manager::COLOR, |
| 1904 |
'separator' => 'after', |
| 1905 |
'selectors' => [ |
| 1906 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}', |
| 1907 |
], |
| 1908 |
'condition' => [ |
| 1909 |
'navigation' => 'progressbar', |
| 1910 |
], |
| 1911 |
] |
| 1912 |
); |
| 1913 |
|
| 1914 |
$this->add_control( |
| 1915 |
'hr_4', |
| 1916 |
[ |
| 1917 |
'type' => Controls_Manager::DIVIDER, |
| 1918 |
'condition' => [ |
| 1919 |
'show_scrollbar' => 'yes' |
| 1920 |
], |
| 1921 |
] |
| 1922 |
); |
| 1923 |
|
| 1924 |
$this->add_control( |
| 1925 |
'scrollbar_heading', |
| 1926 |
[ |
| 1927 |
'label' => __('S C R O L L B A R', 'master-addons' ), |
| 1928 |
'type' => Controls_Manager::HEADING, |
| 1929 |
'condition' => [ |
| 1930 |
'show_scrollbar' => 'yes' |
| 1931 |
], |
| 1932 |
] |
| 1933 |
); |
| 1934 |
|
| 1935 |
$this->add_control( |
| 1936 |
'hr_14', |
| 1937 |
[ |
| 1938 |
'type' => Controls_Manager::DIVIDER, |
| 1939 |
'condition' => [ |
| 1940 |
'show_scrollbar' => 'yes' |
| 1941 |
], |
| 1942 |
] |
| 1943 |
); |
| 1944 |
|
| 1945 |
$this->add_control( |
| 1946 |
'scrollbar_color', |
| 1947 |
[ |
| 1948 |
'label' => __('Bar Color', 'master-addons' ), |
| 1949 |
'type' => Controls_Manager::COLOR, |
| 1950 |
'selectors' => [ |
| 1951 |
'{{WRAPPER}} .swiper-scrollbar, {{WRAPPER}} .jltma-' . $name . '-wrapper .swiper-scrollbar' => 'background: {{VALUE}}', |
| 1952 |
], |
| 1953 |
'condition' => [ |
| 1954 |
'show_scrollbar' => 'yes' |
| 1955 |
], |
| 1956 |
] |
| 1957 |
); |
| 1958 |
|
| 1959 |
$this->add_control( |
| 1960 |
'scrollbar_drag_color', |
| 1961 |
[ |
| 1962 |
'label' => __('Drag Color', 'master-addons' ), |
| 1963 |
'type' => Controls_Manager::COLOR, |
| 1964 |
'selectors' => [ |
| 1965 |
'{{WRAPPER}} .swiper-scrollbar .swiper-scrollbar-drag, {{WRAPPER}} .jltma-' . $name . '-wrapper .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}', |
| 1966 |
], |
| 1967 |
'condition' => [ |
| 1968 |
'show_scrollbar' => 'yes' |
| 1969 |
], |
| 1970 |
] |
| 1971 |
); |
| 1972 |
|
| 1973 |
$this->add_control( |
| 1974 |
'scrollbar_height', |
| 1975 |
[ |
| 1976 |
'label' => __('Height', 'master-addons' ), |
| 1977 |
'type' => Controls_Manager::SLIDER, |
| 1978 |
'range' => [ |
| 1979 |
'px' => [ |
| 1980 |
'min' => 1, |
| 1981 |
'max' => 10, |
| 1982 |
], |
| 1983 |
], |
| 1984 |
'selectors' => [ |
| 1985 |
'{{WRAPPER}} .swiper-scrollbar, {{WRAPPER}} .jltma-' . $name . '-wrapper .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;', |
| 1986 |
], |
| 1987 |
'condition' => [ |
| 1988 |
'show_scrollbar' => 'yes' |
| 1989 |
], |
| 1990 |
] |
| 1991 |
); |
| 1992 |
|
| 1993 |
$this->add_control( |
| 1994 |
'hr_05', |
| 1995 |
[ |
| 1996 |
'type' => Controls_Manager::DIVIDER, |
| 1997 |
] |
| 1998 |
); |
| 1999 |
|
| 2000 |
$this->add_control( |
| 2001 |
'navi_offset_heading', |
| 2002 |
[ |
| 2003 |
'label' => __('O F F S E T', 'master-addons' ), |
| 2004 |
'type' => Controls_Manager::HEADING, |
| 2005 |
] |
| 2006 |
); |
| 2007 |
|
| 2008 |
$this->add_control( |
| 2009 |
'hr_6', |
| 2010 |
[ |
| 2011 |
'type' => Controls_Manager::DIVIDER, |
| 2012 |
] |
| 2013 |
); |
| 2014 |
|
| 2015 |
$this->add_responsive_control( |
| 2016 |
'arrows_ncx_position', |
| 2017 |
[ |
| 2018 |
'label' => __('Arrows Horizontal Offset', 'master-addons' ), |
| 2019 |
'type' => Controls_Manager::SLIDER, |
| 2020 |
'default' => [ |
| 2021 |
'size' => 0, |
| 2022 |
], |
| 2023 |
'tablet_default' => [ |
| 2024 |
'size' => 0, |
| 2025 |
], |
| 2026 |
'mobile_default' => [ |
| 2027 |
'size' => 0, |
| 2028 |
], |
| 2029 |
'range' => [ |
| 2030 |
'px' => [ |
| 2031 |
'min' => -200, |
| 2032 |
'max' => 200, |
| 2033 |
], |
| 2034 |
], |
| 2035 |
'conditions' => [ |
| 2036 |
'terms' => [ |
| 2037 |
[ |
| 2038 |
'name' => 'navigation', |
| 2039 |
'value' => 'arrows', |
| 2040 |
], |
| 2041 |
[ |
| 2042 |
'name' => 'arrows_position', |
| 2043 |
'operator' => '!=', |
| 2044 |
'value' => 'center', |
| 2045 |
], |
| 2046 |
], |
| 2047 |
], |
| 2048 |
'selectors' => [ |
| 2049 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next' => 'left: {{SIZE}}px;', |
| 2050 |
// '{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next' => 'right: {{SIZE}}px;', |
| 2051 |
], |
| 2052 |
] |
| 2053 |
); |
| 2054 |
|
| 2055 |
$this->add_responsive_control( |
| 2056 |
'arrows_ncy_position', |
| 2057 |
[ |
| 2058 |
'label' => __('Arrows Vertical Offset', 'master-addons' ), |
| 2059 |
'type' => Controls_Manager::SLIDER, |
| 2060 |
'default' => [ |
| 2061 |
'size' => 40, |
| 2062 |
], |
| 2063 |
'tablet_default' => [ |
| 2064 |
'size' => 40, |
| 2065 |
], |
| 2066 |
'mobile_default' => [ |
| 2067 |
'size' => 40, |
| 2068 |
], |
| 2069 |
'range' => [ |
| 2070 |
'px' => [ |
| 2071 |
'min' => -200, |
| 2072 |
'max' => 200, |
| 2073 |
], |
| 2074 |
], |
| 2075 |
'selectors' => [ |
| 2076 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next' => 'top: {{SIZE}}px;', |
| 2077 |
// '{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next' => 'bottom: {{SIZE}}px;', |
| 2078 |
], |
| 2079 |
'conditions' => [ |
| 2080 |
'terms' => [ |
| 2081 |
[ |
| 2082 |
'name' => 'navigation', |
| 2083 |
'value' => 'arrows', |
| 2084 |
], |
| 2085 |
[ |
| 2086 |
'name' => 'arrows_position', |
| 2087 |
'operator' => '!=', |
| 2088 |
'value' => 'center', |
| 2089 |
], |
| 2090 |
], |
| 2091 |
], |
| 2092 |
] |
| 2093 |
); |
| 2094 |
|
| 2095 |
$this->add_responsive_control( |
| 2096 |
'arrows_acx_position', |
| 2097 |
[ |
| 2098 |
'label' => __('Arrows Horizontal Offset', 'master-addons' ), |
| 2099 |
'type' => Controls_Manager::SLIDER, |
| 2100 |
'default' => [ |
| 2101 |
'size' => -60, |
| 2102 |
], |
| 2103 |
'range' => [ |
| 2104 |
'px' => [ |
| 2105 |
'min' => -200, |
| 2106 |
'max' => 200, |
| 2107 |
], |
| 2108 |
], |
| 2109 |
'selectors' => [ |
| 2110 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev' => 'left: {{SIZE}}px;', |
| 2111 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next' => 'right: {{SIZE}}px;', |
| 2112 |
], |
| 2113 |
'conditions' => [ |
| 2114 |
'terms' => [ |
| 2115 |
[ |
| 2116 |
'name' => 'navigation', |
| 2117 |
'value' => 'arrows', |
| 2118 |
], |
| 2119 |
[ |
| 2120 |
'name' => 'arrows_position', |
| 2121 |
'value' => 'center', |
| 2122 |
], |
| 2123 |
], |
| 2124 |
], |
| 2125 |
] |
| 2126 |
); |
| 2127 |
|
| 2128 |
$this->add_responsive_control( |
| 2129 |
'dots_nnx_position', |
| 2130 |
[ |
| 2131 |
'label' => __('Dots Horizontal Offset', 'master-addons' ), |
| 2132 |
'type' => Controls_Manager::SLIDER, |
| 2133 |
'default' => [ |
| 2134 |
'size' => 0, |
| 2135 |
], |
| 2136 |
'tablet_default' => [ |
| 2137 |
'size' => 0, |
| 2138 |
], |
| 2139 |
'mobile_default' => [ |
| 2140 |
'size' => 0, |
| 2141 |
], |
| 2142 |
'range' => [ |
| 2143 |
'px' => [ |
| 2144 |
'min' => -200, |
| 2145 |
'max' => 200, |
| 2146 |
], |
| 2147 |
], |
| 2148 |
'conditions' => [ |
| 2149 |
'terms' => [ |
| 2150 |
[ |
| 2151 |
'name' => 'navigation', |
| 2152 |
'value' => 'dots', |
| 2153 |
], |
| 2154 |
[ |
| 2155 |
'name' => 'dots_position', |
| 2156 |
'operator' => '!=', |
| 2157 |
'value' => '', |
| 2158 |
], |
| 2159 |
], |
| 2160 |
], |
| 2161 |
'selectors' => [ |
| 2162 |
// '{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-bullets' => 'left: {{SIZE}}px;', |
| 2163 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-bottom-right,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-top-right' => 'right: {{SIZE}}px;', |
| 2164 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-bottom-left,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-top-left' => 'left: {{SIZE}}px;', |
| 2165 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-bottom-center,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-top-center' => 'left: {{SIZE}}px;', |
| 2166 |
], |
| 2167 |
] |
| 2168 |
); |
| 2169 |
|
| 2170 |
$this->add_responsive_control( |
| 2171 |
'dots_nny_position', |
| 2172 |
[ |
| 2173 |
'label' => __('Dots Vertical Offset', 'master-addons' ), |
| 2174 |
'type' => Controls_Manager::SLIDER, |
| 2175 |
'default' => [ |
| 2176 |
'size' => 30, |
| 2177 |
], |
| 2178 |
'tablet_default' => [ |
| 2179 |
'size' => 30, |
| 2180 |
], |
| 2181 |
'mobile_default' => [ |
| 2182 |
'size' => 30, |
| 2183 |
], |
| 2184 |
'range' => [ |
| 2185 |
'px' => [ |
| 2186 |
'min' => -200, |
| 2187 |
'max' => 200, |
| 2188 |
], |
| 2189 |
], |
| 2190 |
'conditions' => [ |
| 2191 |
'terms' => [ |
| 2192 |
[ |
| 2193 |
'name' => 'navigation', |
| 2194 |
'value' => 'dots', |
| 2195 |
], |
| 2196 |
[ |
| 2197 |
'name' => 'dots_position', |
| 2198 |
'operator' => '!=', |
| 2199 |
'value' => '', |
| 2200 |
], |
| 2201 |
], |
| 2202 |
], |
| 2203 |
'selectors' => [ |
| 2204 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-top-left,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-top-center,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-top-right' => 'top:calc(0% - {{SIZE}}px );', |
| 2205 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-bottom-left,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-bottom-center,{{WRAPPER}} .jltma-' . $name . '-slider .jltma-position-bottom-right' => 'bottom:calc(0% - {{SIZE}}px );', |
| 2206 |
], |
| 2207 |
] |
| 2208 |
); |
| 2209 |
|
| 2210 |
$this->add_responsive_control( |
| 2211 |
'both_ncx_position', |
| 2212 |
[ |
| 2213 |
'label' => __('Arrows & Dots Horizontal Offset', 'master-addons' ), |
| 2214 |
'type' => Controls_Manager::SLIDER, |
| 2215 |
'size_units' => ['%', 'px'], |
| 2216 |
'default' => [ |
| 2217 |
'size' => '', |
| 2218 |
'unit' => '%', |
| 2219 |
], |
| 2220 |
'tablet_default' => [ |
| 2221 |
'size' => '', |
| 2222 |
'unit' => '%', |
| 2223 |
], |
| 2224 |
'mobile_default' => [ |
| 2225 |
'size' => '', |
| 2226 |
'unit' => '%', |
| 2227 |
], |
| 2228 |
'range' => [ |
| 2229 |
'%' => [ |
| 2230 |
'min' => -200, |
| 2231 |
'max' => 200, |
| 2232 |
], |
| 2233 |
'px' => [ |
| 2234 |
'min' => -1000, |
| 2235 |
'max' => 1000, |
| 2236 |
], |
| 2237 |
], |
| 2238 |
'conditions' => [ |
| 2239 |
'terms' => [ |
| 2240 |
[ |
| 2241 |
'name' => 'navigation', |
| 2242 |
'value' => 'both', |
| 2243 |
], |
| 2244 |
[ |
| 2245 |
'name' => 'both_position', |
| 2246 |
'operator' => '!=', |
| 2247 |
'value' => 'center', |
| 2248 |
], |
| 2249 |
], |
| 2250 |
], |
| 2251 |
'selectors' => [ |
| 2252 |
'{{WRAPPER}} .jltma-position-bottom-right, |
| 2253 |
{{WRAPPER}} .jltma-position-top-right' => 'right: {{SIZE}}{{UNIT}};', |
| 2254 |
'{{WRAPPER}} .jltma-position-bottom-left, |
| 2255 |
{{WRAPPER}} .jltma-position-top-left' => 'left: {{SIZE}}{{UNIT}};', |
| 2256 |
], |
| 2257 |
] |
| 2258 |
); |
| 2259 |
|
| 2260 |
$this->add_responsive_control( |
| 2261 |
'both_ncy_position', |
| 2262 |
[ |
| 2263 |
'label' => __('Arrows & Dots Vertical Offset', 'master-addons' ), |
| 2264 |
'type' => Controls_Manager::SLIDER, |
| 2265 |
'size_units' => ['%', 'px'], |
| 2266 |
'default' => [ |
| 2267 |
'size' => '', |
| 2268 |
'unit' => '%', |
| 2269 |
], |
| 2270 |
'tablet_default' => [ |
| 2271 |
'size' => '', |
| 2272 |
'unit' => '%', |
| 2273 |
], |
| 2274 |
'mobile_default' => [ |
| 2275 |
'size' => '', |
| 2276 |
'unit' => '%', |
| 2277 |
], |
| 2278 |
'range' => [ |
| 2279 |
'%' => [ |
| 2280 |
'min' => -200, |
| 2281 |
'max' => 200, |
| 2282 |
], |
| 2283 |
'px' => [ |
| 2284 |
'min' => -1000, |
| 2285 |
'max' => 1000, |
| 2286 |
], |
| 2287 |
], |
| 2288 |
'conditions' => [ |
| 2289 |
'terms' => [ |
| 2290 |
[ |
| 2291 |
'name' => 'navigation', |
| 2292 |
'value' => 'both', |
| 2293 |
], |
| 2294 |
[ |
| 2295 |
'name' => 'both_position', |
| 2296 |
'operator' => '!=', |
| 2297 |
'value' => 'center', |
| 2298 |
], |
| 2299 |
], |
| 2300 |
], |
| 2301 |
'selectors' => [ |
| 2302 |
'{{WRAPPER}} .jltma-position-bottom-right, |
| 2303 |
{{WRAPPER}} .jltma-position-bottom-left' => 'bottom: {{SIZE}}{{UNIT}};', |
| 2304 |
'{{WRAPPER}} .jltma-position-top-right, |
| 2305 |
{{WRAPPER}} .jltma-position-top-left' => 'top: {{SIZE}}{{UNIT}};', |
| 2306 |
], |
| 2307 |
] |
| 2308 |
); |
| 2309 |
|
| 2310 |
$this->add_responsive_control( |
| 2311 |
'both_cx_position', |
| 2312 |
[ |
| 2313 |
'label' => __('Arrows Offset', 'master-addons' ), |
| 2314 |
'type' => Controls_Manager::SLIDER, |
| 2315 |
'default' => [ |
| 2316 |
'size' => -60, |
| 2317 |
], |
| 2318 |
'range' => [ |
| 2319 |
'px' => [ |
| 2320 |
'min' => -200, |
| 2321 |
'max' => 200, |
| 2322 |
], |
| 2323 |
], |
| 2324 |
'selectors' => [ |
| 2325 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--prev, {{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev' => 'margin-left: {{SIZE}}px;', |
| 2326 |
'{{WRAPPER}} .jltma-' . $name . '-wrapper .jltma-arrows .jltma-arrow--next, {{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next' => 'margin-right: {{SIZE}}px;', |
| 2327 |
], |
| 2328 |
'conditions' => [ |
| 2329 |
'terms' => [ |
| 2330 |
[ |
| 2331 |
'name' => 'navigation', |
| 2332 |
'value' => 'both', |
| 2333 |
], |
| 2334 |
[ |
| 2335 |
'name' => 'both_position', |
| 2336 |
'value' => 'center', |
| 2337 |
], |
| 2338 |
], |
| 2339 |
], |
| 2340 |
] |
| 2341 |
); |
| 2342 |
|
| 2343 |
$this->add_responsive_control( |
| 2344 |
'both_cy_position', |
| 2345 |
[ |
| 2346 |
'label' => __('Dots Offset', 'master-addons' ), |
| 2347 |
'type' => Controls_Manager::SLIDER, |
| 2348 |
'default' => [ |
| 2349 |
'size' => 30, |
| 2350 |
], |
| 2351 |
'range' => [ |
| 2352 |
'px' => [ |
| 2353 |
'min' => -200, |
| 2354 |
'max' => 200, |
| 2355 |
], |
| 2356 |
], |
| 2357 |
'selectors' => [ |
| 2358 |
'{{WRAPPER}} .jltma-' . $name . ' .jltma-dots-container' => 'transform: translateY({{SIZE}}px);', |
| 2359 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .swiper-pagination-bullets' => 'top:calc(100% + {{SIZE}}px);', |
| 2360 |
], |
| 2361 |
'conditions' => [ |
| 2362 |
'terms' => [ |
| 2363 |
[ |
| 2364 |
'name' => 'navigation', |
| 2365 |
'value' => 'both', |
| 2366 |
], |
| 2367 |
[ |
| 2368 |
'name' => 'both_position', |
| 2369 |
'value' => 'center', |
| 2370 |
], |
| 2371 |
], |
| 2372 |
], |
| 2373 |
] |
| 2374 |
); |
| 2375 |
|
| 2376 |
$this->add_responsive_control( |
| 2377 |
'arrows_fraction_ncx_position', |
| 2378 |
[ |
| 2379 |
'label' => __('Arrows & Fraction Horizontal Offset', 'master-addons' ), |
| 2380 |
'type' => Controls_Manager::SLIDER, |
| 2381 |
'default' => [ |
| 2382 |
'size' => 0, |
| 2383 |
], |
| 2384 |
'tablet_default' => [ |
| 2385 |
'size' => 0, |
| 2386 |
], |
| 2387 |
'mobile_default' => [ |
| 2388 |
'size' => 0, |
| 2389 |
], |
| 2390 |
'range' => [ |
| 2391 |
'px' => [ |
| 2392 |
'min' => -200, |
| 2393 |
'max' => 200, |
| 2394 |
], |
| 2395 |
], |
| 2396 |
'conditions' => [ |
| 2397 |
'terms' => [ |
| 2398 |
[ |
| 2399 |
'name' => 'navigation', |
| 2400 |
'value' => 'arrows-fraction', |
| 2401 |
], |
| 2402 |
[ |
| 2403 |
'name' => 'arrows_fraction_position', |
| 2404 |
'operator' => '!=', |
| 2405 |
'value' => 'center', |
| 2406 |
], |
| 2407 |
], |
| 2408 |
], |
| 2409 |
'selectors' => [ |
| 2410 |
'{{WRAPPER}}' => '--jltma-' . $name . '-arrows-fraction-ncx: {{SIZE}}px;' |
| 2411 |
], |
| 2412 |
] |
| 2413 |
); |
| 2414 |
|
| 2415 |
$this->add_responsive_control( |
| 2416 |
'arrows_fraction_ncy_position', |
| 2417 |
[ |
| 2418 |
'label' => __('Arrows & Fraction Vertical Offset', 'master-addons' ), |
| 2419 |
'type' => Controls_Manager::SLIDER, |
| 2420 |
'default' => [ |
| 2421 |
'size' => 40, |
| 2422 |
], |
| 2423 |
'tablet_default' => [ |
| 2424 |
'size' => 40, |
| 2425 |
], |
| 2426 |
'mobile_default' => [ |
| 2427 |
'size' => 40, |
| 2428 |
], |
| 2429 |
'range' => [ |
| 2430 |
'px' => [ |
| 2431 |
'min' => -200, |
| 2432 |
'max' => 200, |
| 2433 |
], |
| 2434 |
], |
| 2435 |
'conditions' => [ |
| 2436 |
'terms' => [ |
| 2437 |
[ |
| 2438 |
'name' => 'navigation', |
| 2439 |
'value' => 'arrows-fraction', |
| 2440 |
], |
| 2441 |
[ |
| 2442 |
'name' => 'arrows_fraction_position', |
| 2443 |
'operator' => '!=', |
| 2444 |
'value' => 'center', |
| 2445 |
], |
| 2446 |
], |
| 2447 |
], |
| 2448 |
'selectors' => [ |
| 2449 |
'{{WRAPPER}}' => '--jltma-' . $name . '-arrows-fraction-ncy: {{SIZE}}px;' |
| 2450 |
], |
| 2451 |
] |
| 2452 |
); |
| 2453 |
|
| 2454 |
$this->add_responsive_control( |
| 2455 |
'arrows_fraction_cx_position', |
| 2456 |
[ |
| 2457 |
'label' => __('Arrows Offset', 'master-addons' ), |
| 2458 |
'type' => Controls_Manager::SLIDER, |
| 2459 |
'default' => [ |
| 2460 |
'size' => -60, |
| 2461 |
], |
| 2462 |
'range' => [ |
| 2463 |
'px' => [ |
| 2464 |
'min' => -200, |
| 2465 |
'max' => 200, |
| 2466 |
], |
| 2467 |
], |
| 2468 |
'selectors' => [ |
| 2469 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--prev' => 'margin-left: {{SIZE}}px;', |
| 2470 |
'{{WRAPPER}} .jltma-' . $name . '-slider .jltma-arrows .jltma-arrow--next' => 'margin-right: {{SIZE}}px;', |
| 2471 |
], |
| 2472 |
'conditions' => [ |
| 2473 |
'terms' => [ |
| 2474 |
[ |
| 2475 |
'name' => 'navigation', |
| 2476 |
'value' => 'arrows-fraction', |
| 2477 |
], |
| 2478 |
[ |
| 2479 |
'name' => 'arrows_fraction_position', |
| 2480 |
'value' => 'center', |
| 2481 |
], |
| 2482 |
], |
| 2483 |
], |
| 2484 |
] |
| 2485 |
); |
| 2486 |
|
| 2487 |
$this->add_responsive_control( |
| 2488 |
'arrows_fraction_cy_position', |
| 2489 |
[ |
| 2490 |
'label' => __('Fraction Offset', 'master-addons' ), |
| 2491 |
'type' => Controls_Manager::SLIDER, |
| 2492 |
'default' => [ |
| 2493 |
'size' => 30, |
| 2494 |
], |
| 2495 |
'range' => [ |
| 2496 |
'px' => [ |
| 2497 |
'min' => -200, |
| 2498 |
'max' => 200, |
| 2499 |
], |
| 2500 |
], |
| 2501 |
'selectors' => [ |
| 2502 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);', |
| 2503 |
], |
| 2504 |
'conditions' => [ |
| 2505 |
'terms' => [ |
| 2506 |
[ |
| 2507 |
'name' => 'navigation', |
| 2508 |
'value' => 'arrows-fraction', |
| 2509 |
], |
| 2510 |
[ |
| 2511 |
'name' => 'arrows_fraction_position', |
| 2512 |
'value' => 'center', |
| 2513 |
], |
| 2514 |
], |
| 2515 |
], |
| 2516 |
] |
| 2517 |
); |
| 2518 |
|
| 2519 |
$this->add_responsive_control( |
| 2520 |
'progress_y_position', |
| 2521 |
[ |
| 2522 |
'label' => __('Progress Offset', 'master-addons' ), |
| 2523 |
'type' => Controls_Manager::SLIDER, |
| 2524 |
'default' => [ |
| 2525 |
'size' => 15, |
| 2526 |
], |
| 2527 |
'range' => [ |
| 2528 |
'px' => [ |
| 2529 |
'min' => -200, |
| 2530 |
'max' => 200, |
| 2531 |
], |
| 2532 |
], |
| 2533 |
'selectors' => [ |
| 2534 |
'{{WRAPPER}} .jltma-' . $name . '-slider .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);', |
| 2535 |
], |
| 2536 |
'condition' => [ |
| 2537 |
'navigation' => 'progressbar', |
| 2538 |
], |
| 2539 |
] |
| 2540 |
); |
| 2541 |
|
| 2542 |
$this->add_responsive_control( |
| 2543 |
'scrollbar_vertical_offset', |
| 2544 |
[ |
| 2545 |
'label' => __('Scrollbar Offset', 'master-addons' ), |
| 2546 |
'type' => Controls_Manager::SLIDER, |
| 2547 |
'default' => [ |
| 2548 |
'size' => 0, |
| 2549 |
], |
| 2550 |
'range' => [ |
| 2551 |
'px' => [ |
| 2552 |
'min' => -100, |
| 2553 |
'max' => 100, |
| 2554 |
'step' => 1, |
| 2555 |
] |
| 2556 |
], |
| 2557 |
'selectors' => [ |
| 2558 |
'{{WRAPPER}} .swiper-scrollbar, {{WRAPPER}} .jltma-' . $name . ' .swiper-horizontal > .swiper-scrollbar' => 'top: {{SIZE}}px;', |
| 2559 |
], |
| 2560 |
'condition' => [ |
| 2561 |
'show_scrollbar' => 'yes' |
| 2562 |
], |
| 2563 |
] |
| 2564 |
); |
| 2565 |
} |
| 2566 |
|
| 2567 |
|
| 2568 |
// Swiper Header Attributes |
| 2569 |
public function jltma_render_swiper_header_attribute($name) |
| 2570 |
{ |
| 2571 |
$id = 'jltma-' . $name . '-' . $this->get_id(); |
| 2572 |
$settings = $this->get_settings_for_display(); |
| 2573 |
|
| 2574 |
$this->add_render_attribute('carousel', 'id', $id); |
| 2575 |
|
| 2576 |
$elementor_vp_lg = get_option('elementor_viewport_lg'); |
| 2577 |
$elementor_vp_md = get_option('elementor_viewport_md'); |
| 2578 |
$elementor_vp_sm = get_option('elementor_viewport_sm'); |
| 2579 |
// $elementor_vp_xs = get_option('elementor_viewport_xs'); |
| 2580 |
|
| 2581 |
$viewport_lg = !empty($elementor_vp_lg) ? $elementor_vp_lg - 1 : 1023; |
| 2582 |
$viewport_md = !empty($elementor_vp_md) ? $elementor_vp_md - 1 : 767; |
| 2583 |
$viewport_sm = !empty($elementor_vp_sm) ? $elementor_vp_sm - 1 : 600; |
| 2584 |
|
| 2585 |
|
| 2586 |
if ('arrows' == $settings['navigation']) { |
| 2587 |
$this->add_render_attribute('carousel', 'class', 'jltma-arrows-align-' . esc_attr($settings['arrows_position'])); |
| 2588 |
} elseif ('dots' == $settings['navigation']) { |
| 2589 |
$this->add_render_attribute('carousel', 'class', 'jltma-dots-align-' . esc_attr($settings['dots_position'])); |
| 2590 |
} elseif ('both' == $settings['navigation']) { |
| 2591 |
$this->add_render_attribute('carousel', 'class', 'jltma-arrows-dots-align-' . esc_attr($settings['both_position'])); |
| 2592 |
} elseif ('arrows-fraction' == $settings['navigation']) { |
| 2593 |
$this->add_render_attribute('carousel', 'class', 'jltma-arrows-dots-align-' . esc_attr($settings['arrows_fraction_position'])); |
| 2594 |
} |
| 2595 |
|
| 2596 |
if ('arrows-fraction' == $settings['navigation']) { |
| 2597 |
$pagination_type = 'fraction'; |
| 2598 |
} elseif ('both' == $settings['navigation'] or 'dots' == $settings['navigation']) { |
| 2599 |
$pagination_type = 'bullets'; |
| 2600 |
} elseif ('progressbar' == $settings['navigation']) { |
| 2601 |
$pagination_type = 'progressbar'; |
| 2602 |
} else { |
| 2603 |
$pagination_type = ''; |
| 2604 |
} |
| 2605 |
|
| 2606 |
$this->add_render_attribute( |
| 2607 |
[ |
| 2608 |
'carousel' => [ |
| 2609 |
'data-settings' => [ |
| 2610 |
wp_json_encode(array_filter([ |
| 2611 |
"autoplay" => ("yes" == $settings["autoplay"]) ? ["delay" => $settings["autoplay_speed"]] : false, |
| 2612 |
"loop" => ($settings["loop"] == "yes") ? true : false, |
| 2613 |
"speed" => $settings["speed"]["size"], |
| 2614 |
"pauseOnHover" => ("yes" == $settings["pauseonhover"]) ? true : false, |
| 2615 |
"slidesPerView" => !empty($settings["columns_mobile"]) ? (int)$settings["columns_mobile"] : 1, |
| 2616 |
"slidesPerGroup" => !empty($settings["slides_to_scroll_mobile"]) ? (int)$settings["slides_to_scroll_mobile"] : 1, |
| 2617 |
"spaceBetween" => !empty($settings["item_gap"]["size"]) ? (int)$settings["item_gap"]["size"] : 0, |
| 2618 |
"centeredSlides" => ($settings["centered_slides"] === "yes") ? true : false, |
| 2619 |
"grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false, |
| 2620 |
"freeMode" => ($settings["free_mode"] === "yes") ? true : false, |
| 2621 |
"effect" => ($settings["skin"] === "coverflow") ? "coverflow" : "slide", |
| 2622 |
"observer" => true, |
| 2623 |
"observeParents" => true, |
| 2624 |
"breakpoints" => [ |
| 2625 |
(int)$viewport_sm => [ |
| 2626 |
"slidesPerView" => !empty($settings["columns_tablet"]) ? (int)$settings["columns_tablet"] : 2, |
| 2627 |
"spaceBetween" => !empty($settings["item_gap_tablet"]["size"]) ? (int)$settings["item_gap_tablet"]["size"] : 0, |
| 2628 |
"slidesPerGroup" => !empty($settings["slides_to_scroll_tablet"]) ? (int)$settings["slides_to_scroll_tablet"] : 1, |
| 2629 |
], |
| 2630 |
(int)$viewport_md => [ |
| 2631 |
"slidesPerView" => !empty($settings["columns_tablet"]) ? (int)$settings["columns_tablet"] : 2, |
| 2632 |
"spaceBetween" => !empty($settings["item_gap_tablet"]["size"]) ? (int)$settings["item_gap_tablet"]["size"] : 0, |
| 2633 |
"slidesPerGroup" => !empty($settings["slides_to_scroll_tablet"]) ? (int)$settings["slides_to_scroll_tablet"] : 1, |
| 2634 |
], |
| 2635 |
1024 => [ |
| 2636 |
"slidesPerView" => !empty($settings["columns"]) ? (int)$settings["columns"] : 3, |
| 2637 |
"spaceBetween" => !empty($settings["item_gap"]["size"]) ? (int)$settings["item_gap"]["size"] : 0, |
| 2638 |
"slidesPerGroup" => !empty($settings["slides_to_scroll"]) ? (int)$settings["slides_to_scroll"] : 1, |
| 2639 |
], |
| 2640 |
(int)$viewport_lg => [ |
| 2641 |
"slidesPerView" => !empty($settings["columns"]) ? (int)$settings["columns"] : 3, |
| 2642 |
"spaceBetween" => !empty($settings["item_gap"]["size"]) ? (int)$settings["item_gap"]["size"] : 0, |
| 2643 |
"slidesPerGroup" => !empty($settings["slides_to_scroll"]) ? (int)$settings["slides_to_scroll"] : 1, |
| 2644 |
] |
| 2645 |
], |
| 2646 |
"navigation" => [ |
| 2647 |
"nextEl" => "#" . $id . " .jltma-arrow--next", |
| 2648 |
"prevEl" => "#" . $id . " .jltma-arrow--prev", |
| 2649 |
], |
| 2650 |
"pagination" => [ |
| 2651 |
"el" => "#" . $id . " .swiper-pagination", |
| 2652 |
"type" => $pagination_type, |
| 2653 |
"clickable" => "true", |
| 2654 |
'dynamicBullets' => ("yes" == $settings["dynamic_bullets"]) ? true : false, |
| 2655 |
], |
| 2656 |
"scrollbar" => [ |
| 2657 |
"el" => "#" . $id . " .swiper-scrollbar", |
| 2658 |
"hide" => "true", |
| 2659 |
], |
| 2660 |
'coverflowEffect' => [ |
| 2661 |
'rotate' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_rotate"]["size"] : 50, |
| 2662 |
'stretch' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_stretch"]["size"] : 0, |
| 2663 |
'depth' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_depth"]["size"] : 100, |
| 2664 |
'modifier' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_modifier"]["size"] : 1, |
| 2665 |
'slideShadows' => true, |
| 2666 |
], |
| 2667 |
|
| 2668 |
])) |
| 2669 |
] |
| 2670 |
] |
| 2671 |
] |
| 2672 |
); |
| 2673 |
|
| 2674 |
|
| 2675 |
} |
| 2676 |
|
| 2677 |
|
| 2678 |
// Render Navigation |
| 2679 |
public function render_swiper_navigation() |
| 2680 |
{ |
| 2681 |
|
| 2682 |
$settings = $this->get_settings_for_display(); |
| 2683 |
$hide_arrow_on_mobile = $settings['hide_arrow_on_mobile'] ? 'jltma-visible-mobile' : ''; |
| 2684 |
|
| 2685 |
$this->add_render_attribute([ |
| 2686 |
'navigation' => [ |
| 2687 |
'class' => [ |
| 2688 |
'jltma-arrows', |
| 2689 |
'jltma-swiper__navigation', |
| 2690 |
], |
| 2691 |
'id' => 'jltma-arrows-' . $this->get_id(), |
| 2692 |
], |
| 2693 |
]); |
| 2694 |
|
| 2695 |
|
| 2696 |
if (!empty($settings['arrows_position'])) { |
| 2697 |
$this->add_render_attribute( |
| 2698 |
[ |
| 2699 |
'navigation' => [ |
| 2700 |
'class' => [ |
| 2701 |
'jltma-swiper__navigation--' . esc_attr($settings['arrows_placement']), |
| 2702 |
'jltma-swiper__navigation--' . esc_attr($settings['arrows_position']) |
| 2703 |
] |
| 2704 |
] |
| 2705 |
] |
| 2706 |
); |
| 2707 |
} |
| 2708 |
|
| 2709 |
if ('both' !== $settings['navigation'] or 'arrows-fraction' !== $settings['navigation']) { |
| 2710 |
$this->add_render_attribute('navigation', 'class', [ |
| 2711 |
'jltma-swiper__pagination', |
| 2712 |
'jltma-swiper__pagination--' . esc_attr($settings['navigation']), |
| 2713 |
'jltma-position-z-index', |
| 2714 |
'jltma-swiper__pagination-' . $this->get_id(), |
| 2715 |
// 'swiper-pagination', |
| 2716 |
$hide_arrow_on_mobile |
| 2717 |
]); |
| 2718 |
} |
| 2719 |
|
| 2720 |
|
| 2721 |
// Dots |
| 2722 |
if ('dots' == $settings['navigation']) { |
| 2723 |
$this->add_render_attribute('navigation', 'class', [ |
| 2724 |
'jltma-position-' . esc_attr($settings['dots_position']), |
| 2725 |
'swiper-pagination' |
| 2726 |
]); |
| 2727 |
} |
| 2728 |
|
| 2729 |
// Fraction |
| 2730 |
if ('arrows-fraction' == $settings['navigation']) { |
| 2731 |
$this->add_render_attribute('navigation', 'class', [ |
| 2732 |
'jltma-position-' . esc_attr($settings['arrows_fraction_position']), |
| 2733 |
]); |
| 2734 |
} |
| 2735 |
|
| 2736 |
// Progressbar |
| 2737 |
if ('progressbar' == $settings['navigation']) { |
| 2738 |
$this->add_render_attribute('navigation', 'class', [ |
| 2739 |
'jltma-position-' . esc_attr($settings['progress_position']), |
| 2740 |
'swiper-pagination' |
| 2741 |
]); |
| 2742 |
} |
| 2743 |
|
| 2744 |
?> |
| 2745 |
<div <?php echo $this->get_render_attribute_string('navigation'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>> |
| 2746 |
<?php if ('arrows' == $settings['navigation']) { ?> |
| 2747 |
<?php $this->render_swiper_arrows(); ?> |
| 2748 |
<?php } elseif ('both' == $settings['navigation']) { |
| 2749 |
$this->jltma_render_both_navigation(); |
| 2750 |
} elseif ('arrows-fraction' == $settings['navigation']) { |
| 2751 |
$this->render_swiper_arrows(); |
| 2752 |
$this->jltma_render_arrows_fraction(); |
| 2753 |
} |
| 2754 |
?> |
| 2755 |
</div> |
| 2756 |
|
| 2757 |
<?php |
| 2758 |
} |
| 2759 |
|
| 2760 |
protected function render_swiper_arrows() |
| 2761 |
{ |
| 2762 |
$settings = $this->get_settings_for_display(); |
| 2763 |
$prev = is_rtl() ? 'right' : 'left'; |
| 2764 |
$next = is_rtl() ? 'left' : 'right'; |
| 2765 |
$prev_icon = !empty($settings['nav_arrows_prev_icon']['value']) ? ($settings['nav_arrows_prev_icon']['value']) : ('eicon-chevron-' . $prev); |
| 2766 |
$next_icon = !empty($settings['nav_arrows_next_icon']['value']) ? ($settings['nav_arrows_next_icon']['value']) : ('eicon-chevron-' . $next); |
| 2767 |
|
| 2768 |
$this->add_render_attribute([ |
| 2769 |
'button-prev' => [ |
| 2770 |
'class' => [ |
| 2771 |
'jltma-swiper__button', |
| 2772 |
'jltma-swiper__button--prev', |
| 2773 |
'jltma-arrow', |
| 2774 |
'jltma-arrow--prev', |
| 2775 |
'jltma-swiper__button--prev-' . $this->get_id(), |
| 2776 |
], |
| 2777 |
], |
| 2778 |
'button-prev-icon' => [ |
| 2779 |
'class' => $prev_icon, |
| 2780 |
], |
| 2781 |
'button-next' => [ |
| 2782 |
'class' => [ |
| 2783 |
'jltma-swiper__button', |
| 2784 |
'jltma-swiper__button--next', |
| 2785 |
'jltma-arrow', |
| 2786 |
'jltma-arrow--next', |
| 2787 |
'jltma-swiper__button--next-' . $this->get_id(), |
| 2788 |
], |
| 2789 |
], |
| 2790 |
'button-next-icon' => [ |
| 2791 |
'class' => $next_icon, |
| 2792 |
], |
| 2793 |
]); |
| 2794 |
?> |
| 2795 |
<div <?php echo $this->get_render_attribute_string('button-prev'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>> |
| 2796 |
<i <?php echo $this->get_render_attribute_string('button-prev-icon'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>></i> |
| 2797 |
</div> |
| 2798 |
<div <?php echo $this->get_render_attribute_string('button-next'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>> |
| 2799 |
<i <?php echo $this->get_render_attribute_string('button-next-icon'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>></i> |
| 2800 |
</div> |
| 2801 |
<?php |
| 2802 |
} |
| 2803 |
|
| 2804 |
|
| 2805 |
public function render_swiper_pagination() |
| 2806 |
{ |
| 2807 |
$settings = $this->get_settings_for_display(); |
| 2808 |
|
| 2809 |
if ('dots' == $settings['navigation'] or 'arrows-fraction' == $settings['navigation']) { |
| 2810 |
$this->add_render_attribute('pagination', 'class', [ |
| 2811 |
'jltma-position-' . esc_attr($settings['dots_position']) |
| 2812 |
]); |
| 2813 |
?> |
| 2814 |
<div <?php echo $this->get_render_attribute_string('pagination'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>></div> |
| 2815 |
|
| 2816 |
<?php } elseif ('progressbar' == $settings['navigation']) { |
| 2817 |
|
| 2818 |
$this->add_render_attribute('pagination', 'class', [ |
| 2819 |
'jltma-position-' . esc_attr($settings['progress_position']), |
| 2820 |
]); |
| 2821 |
?> |
| 2822 |
<div <?php echo $this->get_render_attribute_string('pagination'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>></div> |
| 2823 |
<?php |
| 2824 |
} |
| 2825 |
} |
| 2826 |
|
| 2827 |
|
| 2828 |
// Render both Arrow and Dots Navigation |
| 2829 |
public function jltma_render_both_navigation() |
| 2830 |
{ |
| 2831 |
$settings = $this->get_settings_for_display(); |
| 2832 |
$hide_arrow_on_mobile = $settings['hide_arrow_on_mobile'] ? 'jltma-visible-mobile' : ''; |
| 2833 |
|
| 2834 |
$this->add_render_attribute('both_nagivation', 'class', [ |
| 2835 |
'jltma-carousel-both-navigation', |
| 2836 |
'jltma-position-' . esc_attr($settings['both_position']), |
| 2837 |
$hide_arrow_on_mobile |
| 2838 |
]); |
| 2839 |
|
| 2840 |
?> |
| 2841 |
<div <?php echo $this->get_render_attribute_string('both_nagivation'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor render_attribute_string returns sanitized HTML attributes ?>> |
| 2842 |
<?php $this->render_swiper_arrows(); ?> |
| 2843 |
<div class="swiper-pagination"></div> |
| 2844 |
</div> |
| 2845 |
<?php |
| 2846 |
} |
| 2847 |
|
| 2848 |
|
| 2849 |
// Controls for Navigation |
| 2850 |
public function jltma_render_arrows_fraction() |
| 2851 |
{ ?> |
| 2852 |
<div class="swiper-pagination"></div> |
| 2853 |
<?php |
| 2854 |
} |
| 2855 |
} |
| 2856 |
|