| 1 |
<?php |
| 2 |
|
| 3 |
namespace UltimateStoreKit\Modules\ShowcaseSlider\Widgets; |
| 4 |
|
| 5 |
|
| 6 |
use Elementor\Controls_Manager; |
| 7 |
use UltimateStoreKit\Base\Module_Base; |
| 8 |
use Elementor\Group_Control_Border; |
| 9 |
use Elementor\Group_Control_Background; |
| 10 |
use Elementor\Group_Control_Box_Shadow; |
| 11 |
use Elementor\Group_Control_Image_Size; |
| 12 |
use Elementor\Group_Control_Typography; |
| 13 |
use Elementor\Plugin; |
| 14 |
|
| 15 |
use UltimateStoreKit\traits\Global_Widget_Controls; |
| 16 |
use UltimateStoreKit\traits\Global_Widget_Template; |
| 17 |
use UltimateStoreKit\Includes\Controls\GroupQuery\Group_Control_Query; |
| 18 |
use WP_Query; |
| 19 |
|
| 20 |
if (!defined('ABSPATH')) { |
| 21 |
exit; |
| 22 |
} |
| 23 |
|
| 24 |
// Exit if accessed directly |
| 25 |
|
| 26 |
class Showcase_Slider extends Module_Base { |
| 27 |
use Global_Widget_Controls; |
| 28 |
use Global_Widget_Template; |
| 29 |
use Group_Control_Query; |
| 30 |
|
| 31 |
/** |
| 32 |
* @var \WP_Query |
| 33 |
*/ |
| 34 |
private $_query = null; |
| 35 |
public function get_name() { |
| 36 |
return 'usk-showcase-slider'; |
| 37 |
} |
| 38 |
|
| 39 |
public function get_title() { |
| 40 |
return esc_html__('Showcase Slider', 'ultimate-store-kit'); |
| 41 |
} |
| 42 |
|
| 43 |
public function get_icon() { |
| 44 |
return 'usk-widget-icon usk-icon-showcase-slider'; |
| 45 |
} |
| 46 |
|
| 47 |
public function get_categories() { |
| 48 |
return ['ultimate-store-kit']; |
| 49 |
} |
| 50 |
|
| 51 |
public function get_keywords() { |
| 52 |
return ['product', 'product-grid', 'table', 'wc']; |
| 53 |
} |
| 54 |
|
| 55 |
public function get_script_depends() { |
| 56 |
return ['micromodal']; |
| 57 |
} |
| 58 |
|
| 59 |
public function get_style_depends() { |
| 60 |
if ($this->usk_is_edit_mode()) { |
| 61 |
return ['usk-all-styles']; |
| 62 |
} else { |
| 63 |
return ['ultimate-store-kit-font', 'usk-showcase-slider']; |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
// public function get_custom_help_url() { |
| 68 |
// return 'https://youtu.be/3VkvEpVaNAM'; |
| 69 |
// } |
| 70 |
public function get_query() { |
| 71 |
return $this->_query; |
| 72 |
} |
| 73 |
protected function register_controls() { |
| 74 |
$this->start_controls_section( |
| 75 |
'section_woocommerce_layout', |
| 76 |
[ |
| 77 |
'label' => esc_html__('Layout', 'ultimate-store-kit'), |
| 78 |
] |
| 79 |
); |
| 80 |
$this->add_responsive_control( |
| 81 |
'items_height', |
| 82 |
[ |
| 83 |
'label' => esc_html__('Item Height', 'ultimate-store-kit'), |
| 84 |
'type' => Controls_Manager::SLIDER, |
| 85 |
'default' => [ |
| 86 |
'size' => 500, |
| 87 |
], |
| 88 |
'range' => [ |
| 89 |
'px' => [ |
| 90 |
'min' => 200, |
| 91 |
'max' => 800, |
| 92 |
], |
| 93 |
], |
| 94 |
'tablet_default' => [ |
| 95 |
'size' => 280, |
| 96 |
], |
| 97 |
'mobile_default' => [ |
| 98 |
'size' => 200, |
| 99 |
], |
| 100 |
'selectors' => [ |
| 101 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-image-wrap' => 'height: {{SIZE}}{{UNIT}}', |
| 102 |
], |
| 103 |
] |
| 104 |
); |
| 105 |
$this->add_responsive_control( |
| 106 |
'items_gap', |
| 107 |
[ |
| 108 |
'label' => esc_html__('Item Gap', 'ultimate-store-kit'), |
| 109 |
'type' => Controls_Manager::SLIDER, |
| 110 |
'default' => [ |
| 111 |
'size' => 150, |
| 112 |
], |
| 113 |
'range' => [ |
| 114 |
'px' => [ |
| 115 |
'min' => 0, |
| 116 |
'max' => 200, |
| 117 |
], |
| 118 |
], |
| 119 |
'tablet_default' => [ |
| 120 |
'size' => 100, |
| 121 |
], |
| 122 |
'mobile_default' => [ |
| 123 |
'size' => 0, |
| 124 |
], |
| 125 |
] |
| 126 |
); |
| 127 |
$this->add_control( |
| 128 |
'title_tags', |
| 129 |
[ |
| 130 |
'label' => esc_html__('Title HTML Tag', 'ultimate-store-kit'), |
| 131 |
'type' => Controls_Manager::SELECT, |
| 132 |
'default' => 'h3', |
| 133 |
'options' => ultimate_store_kit_title_tags(), |
| 134 |
] |
| 135 |
); |
| 136 |
|
| 137 |
$this->add_group_control( |
| 138 |
Group_Control_Image_Size::get_type(), |
| 139 |
[ |
| 140 |
'name' => 'image', |
| 141 |
'label' => esc_html__('Image Size', 'ultimate-store-kit'), |
| 142 |
'exclude' => ['custom'], |
| 143 |
'default' => 'full', |
| 144 |
] |
| 145 |
); |
| 146 |
|
| 147 |
|
| 148 |
$this->end_controls_section(); |
| 149 |
$this->start_controls_section( |
| 150 |
'section_post_query_builder', |
| 151 |
[ |
| 152 |
'label' => __('Query', 'ultimate-store-kit'), |
| 153 |
'tab' => Controls_Manager::TAB_CONTENT, |
| 154 |
] |
| 155 |
); |
| 156 |
$this->register_query_builder_controls(); |
| 157 |
$this->register_controls_wc_additional(); |
| 158 |
$this->end_controls_section(); |
| 159 |
$this->start_controls_section( |
| 160 |
'section_woocommerce_additional', |
| 161 |
[ |
| 162 |
'label' => esc_html__('Additional', 'ultimate-store-kit'), |
| 163 |
] |
| 164 |
); |
| 165 |
$this->start_controls_tabs( |
| 166 |
'tabs_show_hide_content' |
| 167 |
); |
| 168 |
$this->start_controls_tab( |
| 169 |
'show_content_tab', |
| 170 |
[ |
| 171 |
'label' => esc_html__('Content', 'ultimate-store-kit'), |
| 172 |
] |
| 173 |
); |
| 174 |
$this->add_control( |
| 175 |
'show_title', |
| 176 |
[ |
| 177 |
'label' => esc_html__('Title', 'ultimate-store-kit'), |
| 178 |
'type' => Controls_Manager::SWITCHER, |
| 179 |
'default' => 'yes' |
| 180 |
] |
| 181 |
); |
| 182 |
$this->add_control( |
| 183 |
'show_category', |
| 184 |
[ |
| 185 |
'label' => esc_html__('Category', 'ultimate-store-kit'), |
| 186 |
'type' => Controls_Manager::SWITCHER, |
| 187 |
'default' => 'yes' |
| 188 |
] |
| 189 |
); |
| 190 |
if ($this->get_name() !== 'usk-product-image-accordion') : |
| 191 |
$this->add_control( |
| 192 |
'show_excerpt', |
| 193 |
[ |
| 194 |
'label' => esc_html__('List Description', 'ultimate-store-kit'), |
| 195 |
'type' => Controls_Manager::SWITCHER, |
| 196 |
'default' => 'yes', |
| 197 |
] |
| 198 |
); |
| 199 |
$this->add_control( |
| 200 |
'excerpt_limit', |
| 201 |
[ |
| 202 |
'label' => esc_html__('Description Limit', 'ultimate-store-kit'), |
| 203 |
'type' => Controls_Manager::NUMBER, |
| 204 |
'default' => 25, |
| 205 |
'condition' => [ |
| 206 |
'show_excerpt' => 'yes', |
| 207 |
], |
| 208 |
] |
| 209 |
); |
| 210 |
endif; |
| 211 |
$this->add_control( |
| 212 |
'show_rating', |
| 213 |
[ |
| 214 |
'label' => esc_html__('Rating', 'ultimate-store-kit'), |
| 215 |
'type' => Controls_Manager::SWITCHER, |
| 216 |
'default' => 'yes', |
| 217 |
] |
| 218 |
); |
| 219 |
$this->add_control( |
| 220 |
'hide_customer_review', |
| 221 |
[ |
| 222 |
'label' => esc_html__('Hide Review Text', 'ultimate-store-kit'), |
| 223 |
'type' => Controls_Manager::SWITCHER, |
| 224 |
'label_on' => esc_html__('Yes', 'product-grid'), |
| 225 |
'label_off' => esc_html__('No', 'product-grid'), |
| 226 |
// 'return_value' => 'yes', |
| 227 |
'default' => 'yes', |
| 228 |
'condition' => [ |
| 229 |
'show_rating' => 'yes', |
| 230 |
], |
| 231 |
'selectors' => [ |
| 232 |
'{{WRAPPER}} .usk-showcase-slider .usk-rating .woocommerce-review-link' => 'display:none', |
| 233 |
], |
| 234 |
] |
| 235 |
); |
| 236 |
$this->add_control( |
| 237 |
'show_button', |
| 238 |
[ |
| 239 |
'label' => esc_html__('Button', 'ultimate-store-kit'), |
| 240 |
'type' => Controls_Manager::SWITCHER, |
| 241 |
'default' => 'yes' |
| 242 |
] |
| 243 |
); |
| 244 |
$this->add_control( |
| 245 |
'show_price', |
| 246 |
[ |
| 247 |
'label' => esc_html__('Price', 'ultimate-store-kit'), |
| 248 |
'type' => Controls_Manager::SWITCHER, |
| 249 |
'default' => 'yes', |
| 250 |
] |
| 251 |
); |
| 252 |
|
| 253 |
$this->end_controls_tab(); |
| 254 |
$this->start_controls_tab( |
| 255 |
'show_sale_badge_tab', |
| 256 |
[ |
| 257 |
'label' => esc_html__('Badge', 'ultimate-store-kit'), |
| 258 |
] |
| 259 |
); |
| 260 |
$this->add_control( |
| 261 |
'show_sale_badge', |
| 262 |
[ |
| 263 |
'label' => esc_html__('Sale', 'ultimate-store-kit'), |
| 264 |
'type' => Controls_Manager::SWITCHER, |
| 265 |
'default' => 'yes', |
| 266 |
] |
| 267 |
); |
| 268 |
$this->add_control( |
| 269 |
'show_discount_badge', |
| 270 |
[ |
| 271 |
'label' => esc_html__('Percentage', 'ultimate-store-kit'), |
| 272 |
'type' => Controls_Manager::SWITCHER, |
| 273 |
'default' => 'yes', |
| 274 |
] |
| 275 |
); |
| 276 |
$this->add_control( |
| 277 |
'show_stock_status', |
| 278 |
[ |
| 279 |
'label' => esc_html__('Stock Status', 'ultimate-store-kit'), |
| 280 |
'type' => Controls_Manager::SWITCHER, |
| 281 |
'default' => 'yes', |
| 282 |
] |
| 283 |
); |
| 284 |
$this->add_control( |
| 285 |
'show_trending_badge', |
| 286 |
[ |
| 287 |
'label' => esc_html__('Trending', 'ultimate-store-kit'), |
| 288 |
'type' => Controls_Manager::SWITCHER, |
| 289 |
'default' => 'yes', |
| 290 |
] |
| 291 |
); |
| 292 |
$this->add_control( |
| 293 |
'show_new_badge', |
| 294 |
[ |
| 295 |
'label' => esc_html__('New', 'ultimate-store-kit'), |
| 296 |
'type' => Controls_Manager::SWITCHER, |
| 297 |
'default' => 'yes', |
| 298 |
] |
| 299 |
); |
| 300 |
$this->add_control( |
| 301 |
'newness_days', |
| 302 |
[ |
| 303 |
'label' => esc_html__('Newness Days', 'ultimate-store-kit'), |
| 304 |
'type' => Controls_Manager::NUMBER, |
| 305 |
'default' => 30, |
| 306 |
'condition' => [ |
| 307 |
'show_new_badge' => 'yes', |
| 308 |
], |
| 309 |
] |
| 310 |
); |
| 311 |
$this->end_controls_tab(); |
| 312 |
$this->start_controls_tab( |
| 313 |
'show_action_btn_tab', |
| 314 |
[ |
| 315 |
'label' => esc_html__('Action btn', 'ultimate-store-kit'), |
| 316 |
] |
| 317 |
); |
| 318 |
$this->add_control( |
| 319 |
'show_cart', |
| 320 |
[ |
| 321 |
'label' => esc_html__('Add to Cart', 'ultimate-store-kit'), |
| 322 |
'type' => Controls_Manager::SWITCHER, |
| 323 |
'default' => 'yes', |
| 324 |
] |
| 325 |
); |
| 326 |
|
| 327 |
$this->add_control( |
| 328 |
'show_wishlist', |
| 329 |
[ |
| 330 |
'label' => esc_html__('Wishlist', 'ultimate-store-kit'), |
| 331 |
'type' => Controls_Manager::SWITCHER, |
| 332 |
'label_on' => esc_html__('Show', 'ultimate-store-kit'), |
| 333 |
'label_off' => esc_html__('Hide', 'ultimate-store-kit'), |
| 334 |
'return_value' => 'yes', |
| 335 |
'default' => 'yes', |
| 336 |
] |
| 337 |
); |
| 338 |
$this->add_control( |
| 339 |
'show_quick_view', |
| 340 |
[ |
| 341 |
'label' => esc_html__('Quick View', 'ultimate-store-kit'), |
| 342 |
'type' => Controls_Manager::SWITCHER, |
| 343 |
'default' => 'yes', |
| 344 |
] |
| 345 |
); |
| 346 |
$this->end_controls_tab(); |
| 347 |
$this->end_controls_tabs(); |
| 348 |
$this->end_controls_section(); |
| 349 |
$this->register_global_controls_carousel_navigation(); |
| 350 |
$this->start_controls_section( |
| 351 |
'section_carousel_settings', |
| 352 |
[ |
| 353 |
'label' => __('Carousel Settings', 'ultimate-store-kit'), |
| 354 |
] |
| 355 |
); |
| 356 |
$this->add_control( |
| 357 |
'coverflow_toggle', |
| 358 |
[ |
| 359 |
'label' => __('Coverflow Effect', 'ultimate-store-kit'), |
| 360 |
'type' => Controls_Manager::POPOVER_TOGGLE, |
| 361 |
'return_value' => 'yes', |
| 362 |
] |
| 363 |
); |
| 364 |
|
| 365 |
$this->start_popover(); |
| 366 |
|
| 367 |
$this->add_control( |
| 368 |
'coverflow_rotate', |
| 369 |
[ |
| 370 |
'label' => esc_html__('Rotate', 'ultimate-store-kit'), |
| 371 |
'type' => Controls_Manager::SLIDER, |
| 372 |
'default' => [ |
| 373 |
'size' => 50, |
| 374 |
], |
| 375 |
'range' => [ |
| 376 |
'px' => [ |
| 377 |
'min' => -360, |
| 378 |
'max' => 360, |
| 379 |
'step' => 5, |
| 380 |
], |
| 381 |
], |
| 382 |
'render_type' => 'template', |
| 383 |
] |
| 384 |
); |
| 385 |
|
| 386 |
$this->add_control( |
| 387 |
'coverflow_stretch', |
| 388 |
[ |
| 389 |
'label' => __('Stretch', 'ultimate-store-kit'), |
| 390 |
'type' => Controls_Manager::SLIDER, |
| 391 |
'default' => [ |
| 392 |
'size' => 0, |
| 393 |
], |
| 394 |
'range' => [ |
| 395 |
'px' => [ |
| 396 |
'min' => 0, |
| 397 |
'step' => 10, |
| 398 |
'max' => 100, |
| 399 |
], |
| 400 |
], |
| 401 |
'render_type' => 'template', |
| 402 |
] |
| 403 |
); |
| 404 |
|
| 405 |
$this->add_control( |
| 406 |
'coverflow_modifier', |
| 407 |
[ |
| 408 |
'label' => __('Modifier', 'ultimate-store-kit'), |
| 409 |
'type' => Controls_Manager::SLIDER, |
| 410 |
'default' => [ |
| 411 |
'size' => 1, |
| 412 |
], |
| 413 |
'range' => [ |
| 414 |
'px' => [ |
| 415 |
'min' => 1, |
| 416 |
'step' => 1, |
| 417 |
'max' => 10, |
| 418 |
], |
| 419 |
], |
| 420 |
'render_type' => 'template', |
| 421 |
] |
| 422 |
); |
| 423 |
|
| 424 |
$this->add_control( |
| 425 |
'coverflow_depth', |
| 426 |
[ |
| 427 |
'label' => __('Depth', 'ultimate-store-kit'), |
| 428 |
'type' => Controls_Manager::SLIDER, |
| 429 |
'default' => [ |
| 430 |
'size' => 100, |
| 431 |
], |
| 432 |
'range' => [ |
| 433 |
'px' => [ |
| 434 |
'min' => 0, |
| 435 |
'step' => 10, |
| 436 |
'max' => 1000, |
| 437 |
], |
| 438 |
], |
| 439 |
'render_type' => 'template', |
| 440 |
] |
| 441 |
); |
| 442 |
|
| 443 |
$this->end_popover(); |
| 444 |
|
| 445 |
$this->add_control( |
| 446 |
'hr_005', |
| 447 |
[ |
| 448 |
'type' => Controls_Manager::DIVIDER, |
| 449 |
] |
| 450 |
); |
| 451 |
|
| 452 |
$this->add_control( |
| 453 |
'autoplay', |
| 454 |
[ |
| 455 |
'label' => __('Autoplay', 'ultimate-store-kit'), |
| 456 |
'type' => Controls_Manager::SWITCHER, |
| 457 |
'default' => 'yes', |
| 458 |
|
| 459 |
] |
| 460 |
); |
| 461 |
|
| 462 |
$this->add_control( |
| 463 |
'autoplay_speed', |
| 464 |
[ |
| 465 |
'label' => esc_html__('Autoplay Speed', 'ultimate-store-kit'), |
| 466 |
'type' => Controls_Manager::NUMBER, |
| 467 |
'default' => 5000, |
| 468 |
'condition' => [ |
| 469 |
'autoplay' => 'yes', |
| 470 |
], |
| 471 |
] |
| 472 |
); |
| 473 |
|
| 474 |
$this->add_control( |
| 475 |
'pauseonhover', |
| 476 |
[ |
| 477 |
'label' => esc_html__('Pause on Hover', 'ultimate-store-kit'), |
| 478 |
'type' => Controls_Manager::SWITCHER, |
| 479 |
] |
| 480 |
); |
| 481 |
|
| 482 |
$this->add_responsive_control( |
| 483 |
'slides_to_scroll', |
| 484 |
[ |
| 485 |
'type' => Controls_Manager::SELECT, |
| 486 |
'label' => esc_html__('Slides to Scroll', 'ultimate-store-kit'), |
| 487 |
'default' => 1, |
| 488 |
'tablet_default' => 1, |
| 489 |
'mobile_default' => 1, |
| 490 |
'options' => [ |
| 491 |
1 => '1', |
| 492 |
2 => '2', |
| 493 |
3 => '3', |
| 494 |
4 => '4', |
| 495 |
5 => '5', |
| 496 |
6 => '6', |
| 497 |
], |
| 498 |
] |
| 499 |
); |
| 500 |
|
| 501 |
$this->add_control( |
| 502 |
'centered_slides', |
| 503 |
[ |
| 504 |
'label' => __('Center Slide', 'ultimate-store-kit'), |
| 505 |
'description' => __('Use even items from Layout > Columns settings for better preview.', 'ultimate-store-kit'), |
| 506 |
'type' => Controls_Manager::SWITCHER, |
| 507 |
] |
| 508 |
); |
| 509 |
|
| 510 |
$this->add_control( |
| 511 |
'grab_cursor', |
| 512 |
[ |
| 513 |
'label' => __('Grab Cursor', 'ultimate-store-kit'), |
| 514 |
'type' => Controls_Manager::SWITCHER, |
| 515 |
] |
| 516 |
); |
| 517 |
|
| 518 |
$this->add_control( |
| 519 |
'loop', |
| 520 |
[ |
| 521 |
'label' => __('Loop', 'ultimate-store-kit'), |
| 522 |
'type' => Controls_Manager::SWITCHER, |
| 523 |
'default' => 'yes', |
| 524 |
|
| 525 |
] |
| 526 |
); |
| 527 |
|
| 528 |
|
| 529 |
$this->add_control( |
| 530 |
'speed', |
| 531 |
[ |
| 532 |
'label' => __('Animation Speed (ms)', 'ultimate-store-kit'), |
| 533 |
'type' => Controls_Manager::SLIDER, |
| 534 |
'default' => [ |
| 535 |
'size' => 800, |
| 536 |
], |
| 537 |
'range' => [ |
| 538 |
'px' => [ |
| 539 |
'min' => 100, |
| 540 |
'max' => 5000, |
| 541 |
'step' => 50, |
| 542 |
], |
| 543 |
], |
| 544 |
] |
| 545 |
); |
| 546 |
|
| 547 |
$this->add_control( |
| 548 |
'observer', |
| 549 |
[ |
| 550 |
'label' => __('Observer', 'ultimate-store-kit'), |
| 551 |
'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-store-kit'), |
| 552 |
'type' => Controls_Manager::SWITCHER, |
| 553 |
] |
| 554 |
); |
| 555 |
|
| 556 |
$this->end_controls_section(); |
| 557 |
|
| 558 |
$this->start_controls_section( |
| 559 |
'section_style_content', |
| 560 |
[ |
| 561 |
'label' => esc_html__('Item', 'ultimate-store-kit'), |
| 562 |
'tab' => Controls_Manager::TAB_STYLE, |
| 563 |
] |
| 564 |
); |
| 565 |
|
| 566 |
$this->start_controls_tabs('tabs_content_style'); |
| 567 |
|
| 568 |
$this->start_controls_tab( |
| 569 |
'tab_content_normal', |
| 570 |
[ |
| 571 |
'label' => esc_html__('Normal', 'ultimate-store-kit'), |
| 572 |
] |
| 573 |
); |
| 574 |
$this->add_group_control( |
| 575 |
Group_Control_Background::get_type(), |
| 576 |
[ |
| 577 |
'name' => 'content_background', |
| 578 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 579 |
'types' => ['classic', 'gradient'], |
| 580 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-item-box', |
| 581 |
] |
| 582 |
); |
| 583 |
|
| 584 |
$this->add_group_control( |
| 585 |
Group_Control_Border::get_type(), |
| 586 |
[ |
| 587 |
'name' => 'content_border', |
| 588 |
'label' => esc_html__('Border Color', 'ultimate-store-kit'), |
| 589 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item', |
| 590 |
] |
| 591 |
); |
| 592 |
|
| 593 |
$this->add_responsive_control( |
| 594 |
'content_radius', |
| 595 |
[ |
| 596 |
'label' => esc_html__('Radius', 'ultimate-store-kit'), |
| 597 |
'type' => Controls_Manager::DIMENSIONS, |
| 598 |
'size_units' => ['px'], |
| 599 |
'selectors' => [ |
| 600 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;', |
| 601 |
], |
| 602 |
] |
| 603 |
); |
| 604 |
$this->add_responsive_control( |
| 605 |
'content_padding', |
| 606 |
[ |
| 607 |
'label' => esc_html__('Padding', 'ultimate-store-kit'), |
| 608 |
'type' => Controls_Manager::DIMENSIONS, |
| 609 |
'separator' => 'after', |
| 610 |
'size_units' => [ |
| 611 |
'px', 'em', '%' |
| 612 |
], |
| 613 |
'selectors' => [ |
| 614 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 615 |
], |
| 616 |
] |
| 617 |
); |
| 618 |
$this->add_group_control( |
| 619 |
Group_Control_Box_Shadow::get_type(), |
| 620 |
[ |
| 621 |
'name' => 'content_shadow', |
| 622 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item', |
| 623 |
|
| 624 |
] |
| 625 |
); |
| 626 |
$this->end_controls_tab(); |
| 627 |
|
| 628 |
$this->start_controls_tab( |
| 629 |
'tab_content_hover', |
| 630 |
[ |
| 631 |
'label' => esc_html__('Hover', 'ultimate-store-kit'), |
| 632 |
] |
| 633 |
); |
| 634 |
$this->add_group_control( |
| 635 |
Group_Control_Background::get_type(), |
| 636 |
[ |
| 637 |
'name' => 'content_hover_background', |
| 638 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 639 |
'types' => ['classic', 'gradient'], |
| 640 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-item-box:hover', |
| 641 |
] |
| 642 |
); |
| 643 |
$this->add_control( |
| 644 |
'content_hover_border_color', |
| 645 |
[ |
| 646 |
'label' => esc_html__('Border Color', 'ultimate-store-kit'), |
| 647 |
'type' => Controls_Manager::COLOR, |
| 648 |
'condition' => [ |
| 649 |
'item_border_border!' => '', |
| 650 |
], |
| 651 |
'selectors' => [ |
| 652 |
'{{WRAPPER}} .usk-showcase-slider .usk-item-box:hover' => 'border-color: {{VALUE}};', |
| 653 |
], |
| 654 |
] |
| 655 |
); |
| 656 |
$this->end_controls_tab(); |
| 657 |
|
| 658 |
$this->end_controls_tabs(); |
| 659 |
|
| 660 |
$this->end_controls_section(); |
| 661 |
$this->register_global_controls_title(); |
| 662 |
$this->register_global_controls_category(); |
| 663 |
$this->start_controls_section( |
| 664 |
'section_style_price', |
| 665 |
[ |
| 666 |
'label' => esc_html__('Price', 'ultimate-store-kit'), |
| 667 |
'tab' => Controls_Manager::TAB_STYLE, |
| 668 |
'condition' => [ |
| 669 |
'show_price' => 'yes', |
| 670 |
], |
| 671 |
] |
| 672 |
); |
| 673 |
$this->add_control( |
| 674 |
'regular_price_color', |
| 675 |
[ |
| 676 |
'label' => esc_html__('Regular Color', 'ultimate-store-kit'), |
| 677 |
'type' => Controls_Manager::COLOR, |
| 678 |
'selectors' => [ |
| 679 |
'{{WRAPPER}} .' . $this->get_name() . ' .usk-price del .woocommerce-Price-amount.amount' => 'color: {{VALUE}};', |
| 680 |
'{{WRAPPER}} .' . $this->get_name() . ' .usk-item .usk-content .usk-price del' => 'color: {{VALUE}};', |
| 681 |
], |
| 682 |
|
| 683 |
] |
| 684 |
); |
| 685 |
$this->add_control( |
| 686 |
'sale_price_color', |
| 687 |
[ |
| 688 |
'label' => esc_html__('Sale Color', 'ultimate-store-kit'), |
| 689 |
'type' => Controls_Manager::COLOR, |
| 690 |
'selectors' => [ |
| 691 |
'{{WRAPPER}} .' . $this->get_name() . ' .usk-price' => 'color: {{VALUE}}', |
| 692 |
'{{WRAPPER}} .' . $this->get_name() . ' .usk-price ins span' => 'color: {{VALUE}}', |
| 693 |
'{{WRAPPER}} .' . $this->get_name() . ' .usk-price .woocommerce-Price-amount.amount' => 'color: {{VALUE}}', |
| 694 |
'{{WRAPPER}} .' . $this->get_name() . ' .usk-price > .woocommerce-Price-amount.amount bdi' => 'color: {{VALUE}}', |
| 695 |
], |
| 696 |
] |
| 697 |
); |
| 698 |
$this->add_group_control( |
| 699 |
Group_Control_Typography::get_type(), |
| 700 |
[ |
| 701 |
'name' => 'sale_price_typography', |
| 702 |
'label' => esc_html__('Typography', 'ultimate-store-kit'), |
| 703 |
'selector' => ' |
| 704 |
{{WRAPPER}} .' . $this->get_name() . ' .usk-item .usk-price', |
| 705 |
] |
| 706 |
); |
| 707 |
|
| 708 |
$this->end_controls_section(); |
| 709 |
$this->start_controls_section( |
| 710 |
'section_style_button', |
| 711 |
[ |
| 712 |
'label' => esc_html__('Button', 'ultimate-store-kit'), |
| 713 |
'tab' => Controls_Manager::TAB_STYLE, |
| 714 |
'condition' => [ |
| 715 |
'show_cart' => 'yes', |
| 716 |
], |
| 717 |
] |
| 718 |
); |
| 719 |
|
| 720 |
|
| 721 |
$this->start_controls_tabs('tabs_button_style'); |
| 722 |
|
| 723 |
$this->start_controls_tab( |
| 724 |
'tab_button_normal', |
| 725 |
[ |
| 726 |
'label' => esc_html__('Normal', 'ultimate-store-kit'), |
| 727 |
] |
| 728 |
); |
| 729 |
|
| 730 |
$this->add_control( |
| 731 |
'button_text_color', |
| 732 |
[ |
| 733 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 734 |
'type' => Controls_Manager::COLOR, |
| 735 |
'default' => '', |
| 736 |
'selectors' => [ |
| 737 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a' => 'color: {{VALUE}};', |
| 738 |
], |
| 739 |
] |
| 740 |
); |
| 741 |
$this->add_group_control( |
| 742 |
Group_Control_Background::get_type(), |
| 743 |
[ |
| 744 |
'name' => 'btn_background_color', |
| 745 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 746 |
'types' => ['classic', 'gradient'], |
| 747 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a', |
| 748 |
] |
| 749 |
); |
| 750 |
$this->add_responsive_control( |
| 751 |
'btn_padding', |
| 752 |
[ |
| 753 |
'label' => esc_html__('Padding', 'ultimate-store-kit'), |
| 754 |
'type' => Controls_Manager::DIMENSIONS, |
| 755 |
'size_units' => ['px', '%'], |
| 756 |
'selectors' => [ |
| 757 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 758 |
], |
| 759 |
] |
| 760 |
); |
| 761 |
$this->add_responsive_control( |
| 762 |
'btn_margin', |
| 763 |
[ |
| 764 |
'label' => esc_html__('Margin', 'ultimate-store-kit'), |
| 765 |
'type' => Controls_Manager::DIMENSIONS, |
| 766 |
'size_units' => ['px', '%'], |
| 767 |
'selectors' => [ |
| 768 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 769 |
], |
| 770 |
] |
| 771 |
); |
| 772 |
$this->add_group_control( |
| 773 |
Group_Control_Border::get_type(), |
| 774 |
[ |
| 775 |
'name' => 'btn_border', |
| 776 |
'label' => esc_html__('Border', 'ultimate-store-kit'), |
| 777 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a', |
| 778 |
] |
| 779 |
); |
| 780 |
|
| 781 |
$this->add_responsive_control( |
| 782 |
'btn_border_radius', |
| 783 |
[ |
| 784 |
'label' => esc_html__('Border Radius', 'ultimate-store-kit'), |
| 785 |
'type' => Controls_Manager::DIMENSIONS, |
| 786 |
'size_units' => ['px', '%'], |
| 787 |
'selectors' => [ |
| 788 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 789 |
], |
| 790 |
] |
| 791 |
); |
| 792 |
$this->add_group_control( |
| 793 |
Group_Control_Box_Shadow::get_type(), |
| 794 |
[ |
| 795 |
'name' => 'button_shadow', |
| 796 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a', |
| 797 |
] |
| 798 |
); |
| 799 |
|
| 800 |
$this->add_group_control( |
| 801 |
Group_Control_Typography::get_type(), |
| 802 |
[ |
| 803 |
'name' => 'button_typography', |
| 804 |
'label' => esc_html__('Typography', 'ultimate-store-kit'), |
| 805 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a', |
| 806 |
'exclude' => ['line_height', 'letter_spacing'], |
| 807 |
'separator' => 'before', |
| 808 |
] |
| 809 |
); |
| 810 |
$this->end_controls_tab(); |
| 811 |
|
| 812 |
$this->start_controls_tab( |
| 813 |
'tab_button_hover', |
| 814 |
[ |
| 815 |
'label' => esc_html__('Hover', 'ultimate-store-kit'), |
| 816 |
] |
| 817 |
); |
| 818 |
$this->add_control( |
| 819 |
'hover_color', |
| 820 |
[ |
| 821 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 822 |
'type' => Controls_Manager::COLOR, |
| 823 |
'selectors' => [ |
| 824 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a:hover' => 'color: {{VALUE}};', |
| 825 |
], |
| 826 |
] |
| 827 |
); |
| 828 |
|
| 829 |
$this->add_group_control( |
| 830 |
Group_Control_Background::get_type(), |
| 831 |
[ |
| 832 |
'name' => 'btn_hover_bg', |
| 833 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 834 |
'types' => ['classic', 'gradient'], |
| 835 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a:hover', |
| 836 |
] |
| 837 |
); |
| 838 |
|
| 839 |
$this->add_control( |
| 840 |
'button_hover_border_color', |
| 841 |
[ |
| 842 |
'label' => esc_html__('Border Color', 'ultimate-store-kit'), |
| 843 |
'type' => Controls_Manager::COLOR, |
| 844 |
'condition' => [ |
| 845 |
'btn_border_border!' => '', |
| 846 |
], |
| 847 |
'selectors' => [ |
| 848 |
'{{WRAPPER}} .usk-showcase-slider .usk-showcase-slider-wrapper .usk-item .usk-button a:hover' => 'border-color: {{VALUE}};', |
| 849 |
], |
| 850 |
] |
| 851 |
); |
| 852 |
|
| 853 |
$this->end_controls_tab(); |
| 854 |
$this->end_controls_tabs(); |
| 855 |
$this->end_controls_section(); |
| 856 |
$this->register_global_controls_badge(); |
| 857 |
$this->register_global_controls_rating(); |
| 858 |
$this->start_controls_section( |
| 859 |
'style_action_btn', |
| 860 |
[ |
| 861 |
'label' => esc_html__('Action Button', 'ultimate-store-kit'), |
| 862 |
'tab' => Controls_Manager::TAB_STYLE, |
| 863 |
] |
| 864 |
); |
| 865 |
$this->add_group_control( |
| 866 |
Group_Control_Border::get_type(), |
| 867 |
[ |
| 868 |
'name' => 'action_btn_border', |
| 869 |
'label' => esc_html__('Border', 'ultimate-store-kit'), |
| 870 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping a', |
| 871 |
] |
| 872 |
); |
| 873 |
$this->add_responsive_control( |
| 874 |
'action_btn_radius', |
| 875 |
[ |
| 876 |
'label' => esc_html__('Radius', 'ultimate-store-kit'), |
| 877 |
'type' => Controls_Manager::DIMENSIONS, |
| 878 |
'size_units' => ['px', '%', 'em'], |
| 879 |
'selectors' => [ |
| 880 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 881 |
], |
| 882 |
] |
| 883 |
); |
| 884 |
$this->add_responsive_control( |
| 885 |
'action_btn_padding', |
| 886 |
[ |
| 887 |
'label' => esc_html__('Padding', 'ultimate-store-kit'), |
| 888 |
'type' => Controls_Manager::DIMENSIONS, |
| 889 |
'size_units' => ['px', '%', 'em'], |
| 890 |
'selectors' => [ |
| 891 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 892 |
], |
| 893 |
] |
| 894 |
); |
| 895 |
$this->add_responsive_control( |
| 896 |
'action_btn_margin', |
| 897 |
[ |
| 898 |
'label' => esc_html__('Margin', 'ultimate-store-kit'), |
| 899 |
'type' => Controls_Manager::DIMENSIONS, |
| 900 |
'size_units' => ['px', '%', 'em'], |
| 901 |
'selectors' => [ |
| 902 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 903 |
], |
| 904 |
] |
| 905 |
); |
| 906 |
|
| 907 |
$this->add_control( |
| 908 |
'font_family', |
| 909 |
[ |
| 910 |
'label' => esc_html__('Tooltip Font', 'font family'), |
| 911 |
'type' => Controls_Manager::FONT, |
| 912 |
'default' => "'Open Sans', sans-serif", |
| 913 |
'selectors' => [ |
| 914 |
'{{WRAPPER}} .usk-item .usk-shoping a' => 'font-family: {{VALUE}}', |
| 915 |
], |
| 916 |
] |
| 917 |
); |
| 918 |
|
| 919 |
$this->add_control( |
| 920 |
'action_btn_separator', |
| 921 |
[ |
| 922 |
'label' => esc_html__('Button Separator', 'ultimate-store-kit'), |
| 923 |
'show_label' => false, |
| 924 |
'label_block' => false, |
| 925 |
'type' => Controls_Manager::HEADING, |
| 926 |
'separator' => 'before', |
| 927 |
] |
| 928 |
); |
| 929 |
$this->start_controls_tabs( |
| 930 |
'action_btn_tabs' |
| 931 |
); |
| 932 |
$this->start_controls_tab( |
| 933 |
'wishlist_tab', |
| 934 |
[ |
| 935 |
'label' => esc_html__('Wishlist', 'ultimate-store-kit'), |
| 936 |
'condition' => [ |
| 937 |
'show_wishlist' => 'yes' |
| 938 |
] |
| 939 |
] |
| 940 |
); |
| 941 |
$this->add_control( |
| 942 |
'wishlist_normal_color', |
| 943 |
[ |
| 944 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 945 |
'type' => Controls_Manager::COLOR, |
| 946 |
'selectors' => [ |
| 947 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-wishlist .icon:before' => 'color: {{VALUE}}', |
| 948 |
], |
| 949 |
] |
| 950 |
); |
| 951 |
$this->add_control( |
| 952 |
'wishlist_icon_bg', |
| 953 |
[ |
| 954 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 955 |
'type' => Controls_Manager::COLOR, |
| 956 |
'selectors' => [ |
| 957 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-wishlist' => 'background: {{VALUE}}', |
| 958 |
], |
| 959 |
] |
| 960 |
); |
| 961 |
$this->add_control( |
| 962 |
'heading_wishlist_hover', |
| 963 |
[ |
| 964 |
'label' => esc_html__('Hover', 'ultimate-store-kit'), |
| 965 |
'type' => Controls_Manager::HEADING, |
| 966 |
'separator' => 'before', |
| 967 |
] |
| 968 |
); |
| 969 |
$this->add_control( |
| 970 |
'wishlist_hover_color', |
| 971 |
[ |
| 972 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 973 |
'type' => Controls_Manager::COLOR, |
| 974 |
'selectors' => [ |
| 975 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-wishlist:hover .icon:before' => 'color: {{VALUE}}', |
| 976 |
], |
| 977 |
] |
| 978 |
); |
| 979 |
$this->add_control( |
| 980 |
'wishlist_icon_hover_bg', |
| 981 |
[ |
| 982 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 983 |
'type' => Controls_Manager::COLOR, |
| 984 |
'selectors' => [ |
| 985 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-wishlist:hover' => 'background: {{VALUE}}', |
| 986 |
], |
| 987 |
] |
| 988 |
); |
| 989 |
$this->add_control( |
| 990 |
'heading_wishlist_active', |
| 991 |
[ |
| 992 |
'label' => esc_html__('Active', 'ultimate-store-kit'), |
| 993 |
'type' => Controls_Manager::HEADING, |
| 994 |
'separator' => 'before', |
| 995 |
] |
| 996 |
); |
| 997 |
$this->add_control( |
| 998 |
'wishlist_active_color', |
| 999 |
[ |
| 1000 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 1001 |
'type' => Controls_Manager::COLOR, |
| 1002 |
'selectors' => [ |
| 1003 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-wishlist.usk-active .icon::before' => 'color: {{VALUE}}', |
| 1004 |
], |
| 1005 |
] |
| 1006 |
); |
| 1007 |
$this->add_control( |
| 1008 |
'wishlist_active_bg', |
| 1009 |
[ |
| 1010 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 1011 |
'type' => Controls_Manager::COLOR, |
| 1012 |
'selectors' => [ |
| 1013 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-wishlist.usk-active' => 'background: {{VALUE}}', |
| 1014 |
], |
| 1015 |
] |
| 1016 |
); |
| 1017 |
$this->end_controls_tab(); |
| 1018 |
$this->start_controls_tab( |
| 1019 |
'quickview_tab', |
| 1020 |
[ |
| 1021 |
'label' => esc_html__('Quickview', 'ultimate-store-kit'), |
| 1022 |
'condition' => [ |
| 1023 |
'show_quick_view' => 'yes' |
| 1024 |
] |
| 1025 |
] |
| 1026 |
); |
| 1027 |
$this->add_control( |
| 1028 |
'quickview_color', |
| 1029 |
[ |
| 1030 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 1031 |
'type' => Controls_Manager::COLOR, |
| 1032 |
'selectors' => [ |
| 1033 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-quickview .icon:before' => 'color: {{VALUE}}', |
| 1034 |
], |
| 1035 |
] |
| 1036 |
); |
| 1037 |
$this->add_control( |
| 1038 |
'quickview_icon_bg', |
| 1039 |
[ |
| 1040 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 1041 |
'type' => Controls_Manager::COLOR, |
| 1042 |
'selectors' => [ |
| 1043 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-quickview' => 'background: {{VALUE}}', |
| 1044 |
], |
| 1045 |
] |
| 1046 |
); |
| 1047 |
$this->add_control( |
| 1048 |
'heading_quickview_hover', |
| 1049 |
[ |
| 1050 |
'label' => esc_html__('Hover', 'ultimate-store-kit'), |
| 1051 |
'type' => Controls_Manager::HEADING, |
| 1052 |
'separator' => 'before', |
| 1053 |
] |
| 1054 |
); |
| 1055 |
$this->add_control( |
| 1056 |
'quickview_color_hover', |
| 1057 |
[ |
| 1058 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 1059 |
'type' => Controls_Manager::COLOR, |
| 1060 |
'selectors' => [ |
| 1061 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-quickview:hover .icon:before' => 'color: {{VALUE}}', |
| 1062 |
], |
| 1063 |
] |
| 1064 |
); |
| 1065 |
$this->add_control( |
| 1066 |
'quickview_icon_bg_hover', |
| 1067 |
[ |
| 1068 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 1069 |
'type' => Controls_Manager::COLOR, |
| 1070 |
'selectors' => [ |
| 1071 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-shoping-icon-quickview:hover' => 'background: {{VALUE}}', |
| 1072 |
], |
| 1073 |
] |
| 1074 |
); |
| 1075 |
$this->end_controls_tab(); |
| 1076 |
if (($this->get_name() !== 'usk-shiny-grid') && ($this->get_name() !== 'usk-shiny-carousel')) { |
| 1077 |
$this->start_controls_tab( |
| 1078 |
'add_to_cart_tab', |
| 1079 |
[ |
| 1080 |
'label' => esc_html__('Cart', 'ultimate-store-kit'), |
| 1081 |
'condition' => [ |
| 1082 |
'show_cart' => 'yes' |
| 1083 |
] |
| 1084 |
] |
| 1085 |
); |
| 1086 |
$this->add_control( |
| 1087 |
'cart_color', |
| 1088 |
[ |
| 1089 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 1090 |
'type' => Controls_Manager::COLOR, |
| 1091 |
'selectors' => [ |
| 1092 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-cart' => 'color: {{VALUE}}', |
| 1093 |
], |
| 1094 |
] |
| 1095 |
); |
| 1096 |
$this->add_control( |
| 1097 |
'cart_icon_bg', |
| 1098 |
[ |
| 1099 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 1100 |
'type' => Controls_Manager::COLOR, |
| 1101 |
'selectors' => [ |
| 1102 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-cart' => 'background: {{VALUE}}', |
| 1103 |
], |
| 1104 |
] |
| 1105 |
); |
| 1106 |
$this->add_control( |
| 1107 |
'heading_cart_hover', |
| 1108 |
[ |
| 1109 |
'label' => esc_html__('Hover', 'ultimate-store-kit'), |
| 1110 |
'type' => Controls_Manager::HEADING, |
| 1111 |
'separator' => 'before', |
| 1112 |
] |
| 1113 |
); |
| 1114 |
$this->add_control( |
| 1115 |
'cart_color_hover', |
| 1116 |
[ |
| 1117 |
'label' => esc_html__('Color', 'ultimate-store-kit'), |
| 1118 |
'type' => Controls_Manager::COLOR, |
| 1119 |
'selectors' => [ |
| 1120 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-cart:hover' => 'color: {{VALUE}}', |
| 1121 |
], |
| 1122 |
] |
| 1123 |
); |
| 1124 |
$this->add_control( |
| 1125 |
'cart_icon_bg_hover', |
| 1126 |
[ |
| 1127 |
'label' => esc_html__('Background', 'ultimate-store-kit'), |
| 1128 |
'type' => Controls_Manager::COLOR, |
| 1129 |
'selectors' => [ |
| 1130 |
'{{WRAPPER}} .usk-showcase-slider .usk-item .usk-shoping .usk-cart:hover' => 'background: {{VALUE}}', |
| 1131 |
], |
| 1132 |
] |
| 1133 |
); |
| 1134 |
} |
| 1135 |
$this->end_controls_tab(); |
| 1136 |
$this->end_controls_tabs(); |
| 1137 |
$this->end_controls_section(); |
| 1138 |
$this->start_controls_section( |
| 1139 |
'section_style_navigation', |
| 1140 |
[ |
| 1141 |
'label' => __('Navigation', 'ultimate-store-kit'), |
| 1142 |
'tab' => Controls_Manager::TAB_STYLE, |
| 1143 |
'conditions' => [ |
| 1144 |
'relation' => 'or', |
| 1145 |
'terms' => [ |
| 1146 |
[ |
| 1147 |
'name' => 'navigation', |
| 1148 |
'operator' => '!=', |
| 1149 |
'value' => 'none', |
| 1150 |
], |
| 1151 |
[ |
| 1152 |
'name' => 'show_scrollbar', |
| 1153 |
'value' => 'yes', |
| 1154 |
], |
| 1155 |
], |
| 1156 |
], |
| 1157 |
] |
| 1158 |
); |
| 1159 |
|
| 1160 |
$this->add_control( |
| 1161 |
'arrows_heading', |
| 1162 |
[ |
| 1163 |
'label' => __('Arrows', 'ultimate-store-kit'), |
| 1164 |
'type' => Controls_Manager::HEADING, |
| 1165 |
'condition' => [ |
| 1166 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1167 |
], |
| 1168 |
] |
| 1169 |
); |
| 1170 |
|
| 1171 |
$this->start_controls_tabs('tabs_navigation_arrows_style'); |
| 1172 |
|
| 1173 |
$this->start_controls_tab( |
| 1174 |
'tabs_nav_arrows_normal', |
| 1175 |
[ |
| 1176 |
'label' => __('Normal', 'ultimate-store-kit'), |
| 1177 |
'condition' => [ |
| 1178 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1179 |
], |
| 1180 |
] |
| 1181 |
); |
| 1182 |
|
| 1183 |
$this->add_control( |
| 1184 |
'arrows_color', |
| 1185 |
[ |
| 1186 |
'label' => __('Color', 'ultimate-store-kit'), |
| 1187 |
'type' => Controls_Manager::COLOR, |
| 1188 |
'selectors' => [ |
| 1189 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev i, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next i' => 'color: {{VALUE}}', |
| 1190 |
], |
| 1191 |
'condition' => [ |
| 1192 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1193 |
], |
| 1194 |
] |
| 1195 |
); |
| 1196 |
|
| 1197 |
$this->add_control( |
| 1198 |
'arrows_background', |
| 1199 |
[ |
| 1200 |
'label' => __('Background', 'ultimate-store-kit'), |
| 1201 |
'type' => Controls_Manager::COLOR, |
| 1202 |
'selectors' => [ |
| 1203 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'background-color: {{VALUE}}', |
| 1204 |
], |
| 1205 |
'condition' => [ |
| 1206 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1207 |
], |
| 1208 |
] |
| 1209 |
); |
| 1210 |
|
| 1211 |
$this->add_group_control( |
| 1212 |
Group_Control_Border::get_type(), |
| 1213 |
[ |
| 1214 |
'name' => 'nav_arrows_border', |
| 1215 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next', |
| 1216 |
'condition' => [ |
| 1217 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1218 |
], |
| 1219 |
] |
| 1220 |
); |
| 1221 |
|
| 1222 |
$this->add_responsive_control( |
| 1223 |
'border_radius', |
| 1224 |
[ |
| 1225 |
'label' => __('Border Radius', 'ultimate-store-kit'), |
| 1226 |
'type' => Controls_Manager::DIMENSIONS, |
| 1227 |
'size_units' => ['px', '%'], |
| 1228 |
'selectors' => [ |
| 1229 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1230 |
], |
| 1231 |
'condition' => [ |
| 1232 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1233 |
], |
| 1234 |
] |
| 1235 |
); |
| 1236 |
|
| 1237 |
$this->add_responsive_control( |
| 1238 |
'arrows_padding', |
| 1239 |
[ |
| 1240 |
'label' => esc_html__('Padding', 'ultimate-store-kit'), |
| 1241 |
'type' => Controls_Manager::DIMENSIONS, |
| 1242 |
'size_units' => ['px', 'em', '%'], |
| 1243 |
'selectors' => [ |
| 1244 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1245 |
], |
| 1246 |
'condition' => [ |
| 1247 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1248 |
], |
| 1249 |
] |
| 1250 |
); |
| 1251 |
|
| 1252 |
$this->add_responsive_control( |
| 1253 |
'arrows_size', |
| 1254 |
[ |
| 1255 |
'label' => __('Size', 'ultimate-store-kit'), |
| 1256 |
'type' => Controls_Manager::SLIDER, |
| 1257 |
'range' => [ |
| 1258 |
'px' => [ |
| 1259 |
'min' => 10, |
| 1260 |
'max' => 100, |
| 1261 |
], |
| 1262 |
], |
| 1263 |
'selectors' => [ |
| 1264 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev i, |
| 1265 |
{{WRAPPER}} .usk-showcase-slider .usk-navigation-next i' => 'font-size: {{SIZE || 24}}{{UNIT}};', |
| 1266 |
], |
| 1267 |
'condition' => [ |
| 1268 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1269 |
], |
| 1270 |
] |
| 1271 |
); |
| 1272 |
|
| 1273 |
$this->add_responsive_control( |
| 1274 |
'arrows_space', |
| 1275 |
[ |
| 1276 |
'label' => __('Space Between Arrows', 'ultimate-store-kit'), |
| 1277 |
'type' => Controls_Manager::SLIDER, |
| 1278 |
'range' => [ |
| 1279 |
'px' => [ |
| 1280 |
'min' => 0, |
| 1281 |
'max' => 100, |
| 1282 |
], |
| 1283 |
], |
| 1284 |
'selectors' => [ |
| 1285 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev' => 'margin-right: {{SIZE}}px;', |
| 1286 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'margin-left: {{SIZE}}px;', |
| 1287 |
], |
| 1288 |
'condition' => [ |
| 1289 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1290 |
], |
| 1291 |
] |
| 1292 |
); |
| 1293 |
|
| 1294 |
$this->end_controls_tab(); |
| 1295 |
|
| 1296 |
$this->start_controls_tab( |
| 1297 |
'tabs_nav_arrows_hover', |
| 1298 |
[ |
| 1299 |
'label' => __('Hover', 'ultimate-store-kit'), |
| 1300 |
'condition' => [ |
| 1301 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1302 |
], |
| 1303 |
] |
| 1304 |
); |
| 1305 |
|
| 1306 |
$this->add_control( |
| 1307 |
'arrows_hover_color', |
| 1308 |
[ |
| 1309 |
'label' => __('Color', 'ultimate-store-kit'), |
| 1310 |
'type' => Controls_Manager::COLOR, |
| 1311 |
'selectors' => [ |
| 1312 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev:hover i, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next:hover i' => 'color: {{VALUE}}', |
| 1313 |
], |
| 1314 |
'condition' => [ |
| 1315 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1316 |
], |
| 1317 |
] |
| 1318 |
); |
| 1319 |
|
| 1320 |
$this->add_control( |
| 1321 |
'arrows_hover_background', |
| 1322 |
[ |
| 1323 |
'label' => __('Background', 'ultimate-store-kit'), |
| 1324 |
'type' => Controls_Manager::COLOR, |
| 1325 |
'selectors' => [ |
| 1326 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev:hover, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next:hover' => 'background-color: {{VALUE}}', |
| 1327 |
], |
| 1328 |
'condition' => [ |
| 1329 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1330 |
], |
| 1331 |
] |
| 1332 |
); |
| 1333 |
|
| 1334 |
$this->add_control( |
| 1335 |
'nav_arrows_hover_border_color', |
| 1336 |
[ |
| 1337 |
'label' => __('Border Color', 'ultimate-store-kit'), |
| 1338 |
'type' => Controls_Manager::COLOR, |
| 1339 |
'selectors' => [ |
| 1340 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev:hover, {{WRAPPER}} .usk-showcase-slider .usk-navigation-next:hover' => 'border-color: {{VALUE}};', |
| 1341 |
], |
| 1342 |
'condition' => [ |
| 1343 |
'nav_arrows_border_border!' => '', |
| 1344 |
'navigation!' => ['dots', 'progressbar', 'none'], |
| 1345 |
], |
| 1346 |
] |
| 1347 |
); |
| 1348 |
|
| 1349 |
$this->end_controls_tab(); |
| 1350 |
|
| 1351 |
$this->end_controls_tabs(); |
| 1352 |
|
| 1353 |
$this->add_control( |
| 1354 |
'hr_1', |
| 1355 |
[ |
| 1356 |
'type' => Controls_Manager::DIVIDER, |
| 1357 |
'condition' => [ |
| 1358 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1359 |
], |
| 1360 |
] |
| 1361 |
); |
| 1362 |
|
| 1363 |
$this->add_control( |
| 1364 |
'dots_heading', |
| 1365 |
[ |
| 1366 |
'label' => __('Dots', 'ultimate-store-kit'), |
| 1367 |
'type' => Controls_Manager::HEADING, |
| 1368 |
'condition' => [ |
| 1369 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1370 |
], |
| 1371 |
] |
| 1372 |
); |
| 1373 |
|
| 1374 |
$this->add_control( |
| 1375 |
'hr_11', |
| 1376 |
[ |
| 1377 |
'type' => Controls_Manager::DIVIDER, |
| 1378 |
'condition' => [ |
| 1379 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1380 |
], |
| 1381 |
] |
| 1382 |
); |
| 1383 |
|
| 1384 |
$this->add_control( |
| 1385 |
'dots_color', |
| 1386 |
[ |
| 1387 |
'label' => __('Color', 'ultimate-store-kit'), |
| 1388 |
'type' => Controls_Manager::COLOR, |
| 1389 |
'selectors' => [ |
| 1390 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-bullet' => 'background-color: {{VALUE}}', |
| 1391 |
], |
| 1392 |
'condition' => [ |
| 1393 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1394 |
], |
| 1395 |
] |
| 1396 |
); |
| 1397 |
|
| 1398 |
$this->add_control( |
| 1399 |
'active_dot_color', |
| 1400 |
[ |
| 1401 |
'label' => __('Active Color', 'ultimate-store-kit'), |
| 1402 |
'type' => Controls_Manager::COLOR, |
| 1403 |
'selectors' => [ |
| 1404 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}', |
| 1405 |
], |
| 1406 |
'condition' => [ |
| 1407 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1408 |
], |
| 1409 |
] |
| 1410 |
); |
| 1411 |
|
| 1412 |
$this->add_responsive_control( |
| 1413 |
'dots_border_radius', |
| 1414 |
[ |
| 1415 |
'label' => esc_html__('Border Radius', 'ultimate-store-kit'), |
| 1416 |
'type' => Controls_Manager::DIMENSIONS, |
| 1417 |
'size_units' => ['px', '%'], |
| 1418 |
'selectors' => [ |
| 1419 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1420 |
], |
| 1421 |
'condition' => [ |
| 1422 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1423 |
], |
| 1424 |
] |
| 1425 |
); |
| 1426 |
|
| 1427 |
$this->add_responsive_control( |
| 1428 |
'dots_width_size', |
| 1429 |
[ |
| 1430 |
'label' => __('Width(px)', 'ultimate-store-kit'), |
| 1431 |
'type' => Controls_Manager::SLIDER, |
| 1432 |
'range' => [ |
| 1433 |
'px' => [ |
| 1434 |
'min' => 5, |
| 1435 |
'max' => 50, |
| 1436 |
], |
| 1437 |
], |
| 1438 |
'selectors' => [ |
| 1439 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};', |
| 1440 |
], |
| 1441 |
'condition' => [ |
| 1442 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1443 |
], |
| 1444 |
] |
| 1445 |
); |
| 1446 |
|
| 1447 |
$this->add_responsive_control( |
| 1448 |
'dots_height_size', |
| 1449 |
[ |
| 1450 |
'label' => __('Height(px)', 'ultimate-store-kit'), |
| 1451 |
'type' => Controls_Manager::SLIDER, |
| 1452 |
'range' => [ |
| 1453 |
'px' => [ |
| 1454 |
'min' => 5, |
| 1455 |
'max' => 50, |
| 1456 |
], |
| 1457 |
], |
| 1458 |
'selectors' => [ |
| 1459 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};', |
| 1460 |
], |
| 1461 |
'condition' => [ |
| 1462 |
'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'], |
| 1463 |
], |
| 1464 |
] |
| 1465 |
); |
| 1466 |
|
| 1467 |
$this->add_control( |
| 1468 |
'hr_22', |
| 1469 |
[ |
| 1470 |
'type' => Controls_Manager::DIVIDER, |
| 1471 |
'condition' => [ |
| 1472 |
'navigation' => 'arrows-fraction', |
| 1473 |
], |
| 1474 |
] |
| 1475 |
); |
| 1476 |
|
| 1477 |
$this->add_control( |
| 1478 |
'fraction_heading', |
| 1479 |
[ |
| 1480 |
'label' => __('Fraction', 'ultimate-store-kit'), |
| 1481 |
'type' => Controls_Manager::HEADING, |
| 1482 |
'condition' => [ |
| 1483 |
'navigation' => 'arrows-fraction', |
| 1484 |
], |
| 1485 |
] |
| 1486 |
); |
| 1487 |
|
| 1488 |
$this->add_control( |
| 1489 |
'hr_12', |
| 1490 |
[ |
| 1491 |
'type' => Controls_Manager::DIVIDER, |
| 1492 |
'condition' => [ |
| 1493 |
'navigation' => 'arrows-fraction', |
| 1494 |
], |
| 1495 |
] |
| 1496 |
); |
| 1497 |
|
| 1498 |
$this->add_control( |
| 1499 |
'fraction_color', |
| 1500 |
[ |
| 1501 |
'label' => __('Color', 'ultimate-store-kit'), |
| 1502 |
'type' => Controls_Manager::COLOR, |
| 1503 |
'selectors' => [ |
| 1504 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-fraction' => 'color: {{VALUE}}', |
| 1505 |
], |
| 1506 |
'condition' => [ |
| 1507 |
'navigation' => 'arrows-fraction', |
| 1508 |
], |
| 1509 |
] |
| 1510 |
); |
| 1511 |
|
| 1512 |
$this->add_control( |
| 1513 |
'active_fraction_color', |
| 1514 |
[ |
| 1515 |
'label' => __('Active Color', 'ultimate-store-kit'), |
| 1516 |
'type' => Controls_Manager::COLOR, |
| 1517 |
'selectors' => [ |
| 1518 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-current' => 'color: {{VALUE}}', |
| 1519 |
], |
| 1520 |
'condition' => [ |
| 1521 |
'navigation' => 'arrows-fraction', |
| 1522 |
], |
| 1523 |
] |
| 1524 |
); |
| 1525 |
|
| 1526 |
$this->add_group_control( |
| 1527 |
Group_Control_Typography::get_type(), |
| 1528 |
[ |
| 1529 |
'name' => 'fraction_typography', |
| 1530 |
'label' => esc_html__('Typography', 'ultimate-store-kit'), |
| 1531 |
'selector' => '{{WRAPPER}} .usk-showcase-slider .swiper-pagination-fraction', |
| 1532 |
'condition' => [ |
| 1533 |
'navigation' => 'arrows-fraction', |
| 1534 |
], |
| 1535 |
] |
| 1536 |
); |
| 1537 |
|
| 1538 |
$this->add_control( |
| 1539 |
'hr_3', |
| 1540 |
[ |
| 1541 |
'type' => Controls_Manager::DIVIDER, |
| 1542 |
'condition' => [ |
| 1543 |
'navigation' => 'progressbar', |
| 1544 |
], |
| 1545 |
] |
| 1546 |
); |
| 1547 |
|
| 1548 |
$this->add_control( |
| 1549 |
'progresbar_heading', |
| 1550 |
[ |
| 1551 |
'label' => __('Progresbar', 'ultimate-store-kit'), |
| 1552 |
'type' => Controls_Manager::HEADING, |
| 1553 |
'condition' => [ |
| 1554 |
'navigation' => 'progressbar', |
| 1555 |
], |
| 1556 |
] |
| 1557 |
); |
| 1558 |
|
| 1559 |
$this->add_control( |
| 1560 |
'hr_13', |
| 1561 |
[ |
| 1562 |
'type' => Controls_Manager::DIVIDER, |
| 1563 |
'condition' => [ |
| 1564 |
'navigation' => 'progressbar', |
| 1565 |
], |
| 1566 |
] |
| 1567 |
); |
| 1568 |
|
| 1569 |
$this->add_control( |
| 1570 |
'progresbar_color', |
| 1571 |
[ |
| 1572 |
'label' => __('Bar Color', 'ultimate-store-kit'), |
| 1573 |
'type' => Controls_Manager::COLOR, |
| 1574 |
'selectors' => [ |
| 1575 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-progressbar' => 'background-color: {{VALUE}}', |
| 1576 |
], |
| 1577 |
'condition' => [ |
| 1578 |
'navigation' => 'progressbar', |
| 1579 |
], |
| 1580 |
] |
| 1581 |
); |
| 1582 |
|
| 1583 |
$this->add_control( |
| 1584 |
'progres_color', |
| 1585 |
[ |
| 1586 |
'label' => __('Progress Color', 'ultimate-store-kit'), |
| 1587 |
'type' => Controls_Manager::COLOR, |
| 1588 |
'separator' => 'after', |
| 1589 |
'selectors' => [ |
| 1590 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}', |
| 1591 |
], |
| 1592 |
'condition' => [ |
| 1593 |
'navigation' => 'progressbar', |
| 1594 |
], |
| 1595 |
] |
| 1596 |
); |
| 1597 |
|
| 1598 |
$this->add_control( |
| 1599 |
'hr_4', |
| 1600 |
[ |
| 1601 |
'type' => Controls_Manager::DIVIDER, |
| 1602 |
'condition' => [ |
| 1603 |
'show_scrollbar' => 'yes' |
| 1604 |
], |
| 1605 |
] |
| 1606 |
); |
| 1607 |
|
| 1608 |
$this->add_control( |
| 1609 |
'scrollbar_heading', |
| 1610 |
[ |
| 1611 |
'label' => __('Scrollbar', 'ultimate-store-kit'), |
| 1612 |
'type' => Controls_Manager::HEADING, |
| 1613 |
'condition' => [ |
| 1614 |
'show_scrollbar' => 'yes' |
| 1615 |
], |
| 1616 |
] |
| 1617 |
); |
| 1618 |
|
| 1619 |
$this->add_control( |
| 1620 |
'hr_14', |
| 1621 |
[ |
| 1622 |
'type' => Controls_Manager::DIVIDER, |
| 1623 |
'condition' => [ |
| 1624 |
'show_scrollbar' => 'yes' |
| 1625 |
], |
| 1626 |
] |
| 1627 |
); |
| 1628 |
|
| 1629 |
$this->add_control( |
| 1630 |
'scrollbar_color', |
| 1631 |
[ |
| 1632 |
'label' => __('Bar Color', 'ultimate-store-kit'), |
| 1633 |
'type' => Controls_Manager::COLOR, |
| 1634 |
'selectors' => [ |
| 1635 |
'{{WRAPPER}} .usk-showcase-slider .swiper-scrollbar' => 'background: {{VALUE}}', |
| 1636 |
], |
| 1637 |
'condition' => [ |
| 1638 |
'show_scrollbar' => 'yes' |
| 1639 |
], |
| 1640 |
] |
| 1641 |
); |
| 1642 |
|
| 1643 |
$this->add_control( |
| 1644 |
'scrollbar_drag_color', |
| 1645 |
[ |
| 1646 |
'label' => __('Drag Color', 'ultimate-store-kit'), |
| 1647 |
'type' => Controls_Manager::COLOR, |
| 1648 |
'selectors' => [ |
| 1649 |
'{{WRAPPER}} .usk-showcase-slider .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}', |
| 1650 |
], |
| 1651 |
'condition' => [ |
| 1652 |
'show_scrollbar' => 'yes' |
| 1653 |
], |
| 1654 |
] |
| 1655 |
); |
| 1656 |
|
| 1657 |
$this->add_responsive_control( |
| 1658 |
'scrollbar_height', |
| 1659 |
[ |
| 1660 |
'label' => __('Height', 'ultimate-store-kit'), |
| 1661 |
'type' => Controls_Manager::SLIDER, |
| 1662 |
'range' => [ |
| 1663 |
'px' => [ |
| 1664 |
'min' => 1, |
| 1665 |
'max' => 10, |
| 1666 |
], |
| 1667 |
], |
| 1668 |
'selectors' => [ |
| 1669 |
'{{WRAPPER}} .usk-showcase-slider .swiper-container-horizontal > .swiper-scrollbar, {{WRAPPER}} .usk-showcase-slider .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;', |
| 1670 |
], |
| 1671 |
'condition' => [ |
| 1672 |
'show_scrollbar' => 'yes' |
| 1673 |
], |
| 1674 |
] |
| 1675 |
); |
| 1676 |
|
| 1677 |
$this->add_control( |
| 1678 |
'hr_05', |
| 1679 |
[ |
| 1680 |
'type' => Controls_Manager::DIVIDER, |
| 1681 |
] |
| 1682 |
); |
| 1683 |
|
| 1684 |
$this->add_control( |
| 1685 |
'navi_offset_heading', |
| 1686 |
[ |
| 1687 |
'label' => __('Offset', 'ultimate-store-kit'), |
| 1688 |
'type' => Controls_Manager::HEADING, |
| 1689 |
] |
| 1690 |
); |
| 1691 |
|
| 1692 |
$this->add_control( |
| 1693 |
'hr_6', |
| 1694 |
[ |
| 1695 |
'type' => Controls_Manager::DIVIDER, |
| 1696 |
] |
| 1697 |
); |
| 1698 |
|
| 1699 |
$this->add_responsive_control( |
| 1700 |
'arrows_ncx_position', |
| 1701 |
[ |
| 1702 |
'label' => __('Arrows Horizontal Offset', 'ultimate-store-kit'), |
| 1703 |
'type' => Controls_Manager::SLIDER, |
| 1704 |
'default' => [ |
| 1705 |
'size' => 60, |
| 1706 |
], |
| 1707 |
'tablet_default' => [ |
| 1708 |
'size' => 0, |
| 1709 |
], |
| 1710 |
'mobile_default' => [ |
| 1711 |
'size' => 0, |
| 1712 |
], |
| 1713 |
'range' => [ |
| 1714 |
'px' => [ |
| 1715 |
'min' => -200, |
| 1716 |
'max' => 200, |
| 1717 |
], |
| 1718 |
], |
| 1719 |
'conditions' => [ |
| 1720 |
'terms' => [ |
| 1721 |
[ |
| 1722 |
'name' => 'navigation', |
| 1723 |
'value' => 'arrows', |
| 1724 |
], |
| 1725 |
[ |
| 1726 |
'name' => 'arrows_position', |
| 1727 |
'operator' => '!=', |
| 1728 |
'value' => 'center', |
| 1729 |
], |
| 1730 |
], |
| 1731 |
], |
| 1732 |
'selectors' => [ |
| 1733 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-arrows-ncx: {{SIZE}}px;' |
| 1734 |
], |
| 1735 |
] |
| 1736 |
); |
| 1737 |
|
| 1738 |
$this->add_responsive_control( |
| 1739 |
'arrows_ncy_position', |
| 1740 |
[ |
| 1741 |
'label' => __('Arrows Vertical Offset', 'ultimate-store-kit'), |
| 1742 |
'type' => Controls_Manager::SLIDER, |
| 1743 |
'default' => [ |
| 1744 |
'size' => 40, |
| 1745 |
], |
| 1746 |
'tablet_default' => [ |
| 1747 |
'size' => 40, |
| 1748 |
], |
| 1749 |
'mobile_default' => [ |
| 1750 |
'size' => 40, |
| 1751 |
], |
| 1752 |
'range' => [ |
| 1753 |
'px' => [ |
| 1754 |
'min' => -200, |
| 1755 |
'max' => 200, |
| 1756 |
], |
| 1757 |
], |
| 1758 |
'selectors' => [ |
| 1759 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-arrows-ncy: {{SIZE}}px;' |
| 1760 |
], |
| 1761 |
'conditions' => [ |
| 1762 |
'terms' => [ |
| 1763 |
[ |
| 1764 |
'name' => 'navigation', |
| 1765 |
'value' => 'arrows', |
| 1766 |
], |
| 1767 |
[ |
| 1768 |
'name' => 'arrows_position', |
| 1769 |
'operator' => '!=', |
| 1770 |
'value' => 'center', |
| 1771 |
], |
| 1772 |
], |
| 1773 |
], |
| 1774 |
] |
| 1775 |
); |
| 1776 |
|
| 1777 |
$this->add_responsive_control( |
| 1778 |
'arrows_acx_position', |
| 1779 |
[ |
| 1780 |
'label' => __('Arrows Horizontal Offset', 'ultimate-store-kit'), |
| 1781 |
'type' => Controls_Manager::SLIDER, |
| 1782 |
'default' => [ |
| 1783 |
'size' => 60, |
| 1784 |
], |
| 1785 |
'range' => [ |
| 1786 |
'px' => [ |
| 1787 |
'min' => -200, |
| 1788 |
'max' => 200, |
| 1789 |
], |
| 1790 |
], |
| 1791 |
'selectors' => [ |
| 1792 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev' => 'left: {{SIZE}}px;', |
| 1793 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'right: {{SIZE}}px;', |
| 1794 |
], |
| 1795 |
'conditions' => [ |
| 1796 |
'terms' => [ |
| 1797 |
[ |
| 1798 |
'name' => 'navigation', |
| 1799 |
'value' => 'arrows', |
| 1800 |
], |
| 1801 |
[ |
| 1802 |
'name' => 'arrows_position', |
| 1803 |
'value' => 'center', |
| 1804 |
], |
| 1805 |
], |
| 1806 |
], |
| 1807 |
] |
| 1808 |
); |
| 1809 |
|
| 1810 |
$this->add_responsive_control( |
| 1811 |
'dots_nnx_position', |
| 1812 |
[ |
| 1813 |
'label' => __('Dots Horizontal Offset', 'ultimate-store-kit'), |
| 1814 |
'type' => Controls_Manager::SLIDER, |
| 1815 |
'default' => [ |
| 1816 |
'size' => 0, |
| 1817 |
], |
| 1818 |
'tablet_default' => [ |
| 1819 |
'size' => 0, |
| 1820 |
], |
| 1821 |
'mobile_default' => [ |
| 1822 |
'size' => 0, |
| 1823 |
], |
| 1824 |
'range' => [ |
| 1825 |
'px' => [ |
| 1826 |
'min' => -200, |
| 1827 |
'max' => 200, |
| 1828 |
], |
| 1829 |
], |
| 1830 |
'conditions' => [ |
| 1831 |
'terms' => [ |
| 1832 |
[ |
| 1833 |
'name' => 'navigation', |
| 1834 |
'value' => 'dots', |
| 1835 |
], |
| 1836 |
[ |
| 1837 |
'name' => 'dots_position', |
| 1838 |
'operator' => '!=', |
| 1839 |
'value' => '', |
| 1840 |
], |
| 1841 |
], |
| 1842 |
], |
| 1843 |
'selectors' => [ |
| 1844 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-dots-nnx: {{SIZE}}px;' |
| 1845 |
], |
| 1846 |
] |
| 1847 |
); |
| 1848 |
|
| 1849 |
$this->add_responsive_control( |
| 1850 |
'dots_nny_position', |
| 1851 |
[ |
| 1852 |
'label' => __('Dots Vertical Offset', 'ultimate-store-kit'), |
| 1853 |
'type' => Controls_Manager::SLIDER, |
| 1854 |
'default' => [ |
| 1855 |
'size' => 30, |
| 1856 |
], |
| 1857 |
'tablet_default' => [ |
| 1858 |
'size' => 30, |
| 1859 |
], |
| 1860 |
'mobile_default' => [ |
| 1861 |
'size' => 30, |
| 1862 |
], |
| 1863 |
'range' => [ |
| 1864 |
'px' => [ |
| 1865 |
'min' => -200, |
| 1866 |
'max' => 200, |
| 1867 |
], |
| 1868 |
], |
| 1869 |
'conditions' => [ |
| 1870 |
'terms' => [ |
| 1871 |
[ |
| 1872 |
'name' => 'navigation', |
| 1873 |
'value' => 'dots', |
| 1874 |
], |
| 1875 |
[ |
| 1876 |
'name' => 'dots_position', |
| 1877 |
'operator' => '!=', |
| 1878 |
'value' => '', |
| 1879 |
], |
| 1880 |
], |
| 1881 |
], |
| 1882 |
'selectors' => [ |
| 1883 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-dots-nny: {{SIZE}}px;' |
| 1884 |
], |
| 1885 |
] |
| 1886 |
); |
| 1887 |
|
| 1888 |
$this->add_responsive_control( |
| 1889 |
'both_ncx_position', |
| 1890 |
[ |
| 1891 |
'label' => __('Arrows & Dots Horizontal Offset', 'ultimate-store-kit'), |
| 1892 |
'type' => Controls_Manager::SLIDER, |
| 1893 |
'default' => [ |
| 1894 |
'size' => 0, |
| 1895 |
], |
| 1896 |
'tablet_default' => [ |
| 1897 |
'size' => 0, |
| 1898 |
], |
| 1899 |
'mobile_default' => [ |
| 1900 |
'size' => 0, |
| 1901 |
], |
| 1902 |
'range' => [ |
| 1903 |
'px' => [ |
| 1904 |
'min' => -200, |
| 1905 |
'max' => 200, |
| 1906 |
], |
| 1907 |
], |
| 1908 |
'conditions' => [ |
| 1909 |
'terms' => [ |
| 1910 |
[ |
| 1911 |
'name' => 'navigation', |
| 1912 |
'value' => 'both', |
| 1913 |
], |
| 1914 |
[ |
| 1915 |
'name' => 'both_position', |
| 1916 |
'operator' => '!=', |
| 1917 |
'value' => 'center', |
| 1918 |
], |
| 1919 |
], |
| 1920 |
], |
| 1921 |
'selectors' => [ |
| 1922 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-both-ncx: {{SIZE}}px;' |
| 1923 |
], |
| 1924 |
] |
| 1925 |
); |
| 1926 |
|
| 1927 |
$this->add_responsive_control( |
| 1928 |
'both_ncy_position', |
| 1929 |
[ |
| 1930 |
'label' => __('Arrows & Dots Vertical Offset', 'ultimate-store-kit'), |
| 1931 |
'type' => Controls_Manager::SLIDER, |
| 1932 |
'default' => [ |
| 1933 |
'size' => 40, |
| 1934 |
], |
| 1935 |
'tablet_default' => [ |
| 1936 |
'size' => 40, |
| 1937 |
], |
| 1938 |
'mobile_default' => [ |
| 1939 |
'size' => 40, |
| 1940 |
], |
| 1941 |
'range' => [ |
| 1942 |
'px' => [ |
| 1943 |
'min' => -200, |
| 1944 |
'max' => 200, |
| 1945 |
], |
| 1946 |
], |
| 1947 |
'conditions' => [ |
| 1948 |
'terms' => [ |
| 1949 |
[ |
| 1950 |
'name' => 'navigation', |
| 1951 |
'value' => 'both', |
| 1952 |
], |
| 1953 |
[ |
| 1954 |
'name' => 'both_position', |
| 1955 |
'operator' => '!=', |
| 1956 |
'value' => 'center', |
| 1957 |
], |
| 1958 |
], |
| 1959 |
], |
| 1960 |
'selectors' => [ |
| 1961 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-both-ncy: {{SIZE}}px;' |
| 1962 |
], |
| 1963 |
] |
| 1964 |
); |
| 1965 |
|
| 1966 |
$this->add_responsive_control( |
| 1967 |
'both_cx_position', |
| 1968 |
[ |
| 1969 |
'label' => __('Arrows Offset', 'ultimate-store-kit'), |
| 1970 |
'type' => Controls_Manager::SLIDER, |
| 1971 |
'default' => [ |
| 1972 |
'size' => -60, |
| 1973 |
], |
| 1974 |
'range' => [ |
| 1975 |
'px' => [ |
| 1976 |
'min' => -200, |
| 1977 |
'max' => 200, |
| 1978 |
], |
| 1979 |
], |
| 1980 |
'selectors' => [ |
| 1981 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev' => 'left: {{SIZE}}px;', |
| 1982 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'right: {{SIZE}}px;', |
| 1983 |
], |
| 1984 |
'conditions' => [ |
| 1985 |
'terms' => [ |
| 1986 |
[ |
| 1987 |
'name' => 'navigation', |
| 1988 |
'value' => 'both', |
| 1989 |
], |
| 1990 |
[ |
| 1991 |
'name' => 'both_position', |
| 1992 |
'value' => 'center', |
| 1993 |
], |
| 1994 |
], |
| 1995 |
], |
| 1996 |
] |
| 1997 |
); |
| 1998 |
|
| 1999 |
$this->add_responsive_control( |
| 2000 |
'both_cy_position', |
| 2001 |
[ |
| 2002 |
'label' => __('Dots Offset', 'ultimate-store-kit'), |
| 2003 |
'type' => Controls_Manager::SLIDER, |
| 2004 |
'default' => [ |
| 2005 |
'size' => 30, |
| 2006 |
], |
| 2007 |
'range' => [ |
| 2008 |
'px' => [ |
| 2009 |
'min' => -200, |
| 2010 |
'max' => 200, |
| 2011 |
], |
| 2012 |
], |
| 2013 |
'selectors' => [ |
| 2014 |
'{{WRAPPER}} .usk-showcase-slider .usk-dots-container' => 'transform: translateY({{SIZE}}px);', |
| 2015 |
], |
| 2016 |
'conditions' => [ |
| 2017 |
'terms' => [ |
| 2018 |
[ |
| 2019 |
'name' => 'navigation', |
| 2020 |
'value' => 'both', |
| 2021 |
], |
| 2022 |
[ |
| 2023 |
'name' => 'both_position', |
| 2024 |
'value' => 'center', |
| 2025 |
], |
| 2026 |
], |
| 2027 |
], |
| 2028 |
] |
| 2029 |
); |
| 2030 |
|
| 2031 |
$this->add_responsive_control( |
| 2032 |
'arrows_fraction_ncx_position', |
| 2033 |
[ |
| 2034 |
'label' => __('Arrows & Fraction Horizontal Offset', 'ultimate-store-kit'), |
| 2035 |
'type' => Controls_Manager::SLIDER, |
| 2036 |
'default' => [ |
| 2037 |
'size' => 0, |
| 2038 |
], |
| 2039 |
'tablet_default' => [ |
| 2040 |
'size' => 0, |
| 2041 |
], |
| 2042 |
'mobile_default' => [ |
| 2043 |
'size' => 0, |
| 2044 |
], |
| 2045 |
'range' => [ |
| 2046 |
'px' => [ |
| 2047 |
'min' => -200, |
| 2048 |
'max' => 200, |
| 2049 |
], |
| 2050 |
], |
| 2051 |
'conditions' => [ |
| 2052 |
'terms' => [ |
| 2053 |
[ |
| 2054 |
'name' => 'navigation', |
| 2055 |
'value' => 'arrows-fraction', |
| 2056 |
], |
| 2057 |
[ |
| 2058 |
'name' => 'arrows_fraction_position', |
| 2059 |
'operator' => '!=', |
| 2060 |
'value' => 'center', |
| 2061 |
], |
| 2062 |
], |
| 2063 |
], |
| 2064 |
'selectors' => [ |
| 2065 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-arrows-fraction-ncx: {{SIZE}}px;' |
| 2066 |
], |
| 2067 |
] |
| 2068 |
); |
| 2069 |
|
| 2070 |
$this->add_responsive_control( |
| 2071 |
'arrows_fraction_ncy_position', |
| 2072 |
[ |
| 2073 |
'label' => __('Arrows & Fraction Vertical Offset', 'ultimate-store-kit'), |
| 2074 |
'type' => Controls_Manager::SLIDER, |
| 2075 |
'default' => [ |
| 2076 |
'size' => 40, |
| 2077 |
], |
| 2078 |
'tablet_default' => [ |
| 2079 |
'size' => 40, |
| 2080 |
], |
| 2081 |
'mobile_default' => [ |
| 2082 |
'size' => 40, |
| 2083 |
], |
| 2084 |
'range' => [ |
| 2085 |
'px' => [ |
| 2086 |
'min' => -200, |
| 2087 |
'max' => 200, |
| 2088 |
], |
| 2089 |
], |
| 2090 |
'conditions' => [ |
| 2091 |
'terms' => [ |
| 2092 |
[ |
| 2093 |
'name' => 'navigation', |
| 2094 |
'value' => 'arrows-fraction', |
| 2095 |
], |
| 2096 |
[ |
| 2097 |
'name' => 'arrows_fraction_position', |
| 2098 |
'operator' => '!=', |
| 2099 |
'value' => 'center', |
| 2100 |
], |
| 2101 |
], |
| 2102 |
], |
| 2103 |
'selectors' => [ |
| 2104 |
'{{WRAPPER}}' => '--' . $this->get_name() . '-arrows-fraction-ncy: {{SIZE}}px;' |
| 2105 |
], |
| 2106 |
] |
| 2107 |
); |
| 2108 |
|
| 2109 |
$this->add_responsive_control( |
| 2110 |
'arrows_fraction_cx_position', |
| 2111 |
[ |
| 2112 |
'label' => __('Arrows Offset', 'ultimate-store-kit'), |
| 2113 |
'type' => Controls_Manager::SLIDER, |
| 2114 |
'default' => [ |
| 2115 |
'size' => -60, |
| 2116 |
], |
| 2117 |
'range' => [ |
| 2118 |
'px' => [ |
| 2119 |
'min' => -200, |
| 2120 |
'max' => 200, |
| 2121 |
], |
| 2122 |
], |
| 2123 |
'selectors' => [ |
| 2124 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-prev' => 'left: {{SIZE}}px;', |
| 2125 |
'{{WRAPPER}} .usk-showcase-slider .usk-navigation-next' => 'right: {{SIZE}}px;', |
| 2126 |
], |
| 2127 |
'conditions' => [ |
| 2128 |
'terms' => [ |
| 2129 |
[ |
| 2130 |
'name' => 'navigation', |
| 2131 |
'value' => 'arrows-fraction', |
| 2132 |
], |
| 2133 |
[ |
| 2134 |
'name' => 'arrows_fraction_position', |
| 2135 |
'value' => 'center', |
| 2136 |
], |
| 2137 |
], |
| 2138 |
], |
| 2139 |
] |
| 2140 |
); |
| 2141 |
|
| 2142 |
$this->add_responsive_control( |
| 2143 |
'arrows_fraction_cy_position', |
| 2144 |
[ |
| 2145 |
'label' => __('Fraction Offset', 'ultimate-store-kit'), |
| 2146 |
'type' => Controls_Manager::SLIDER, |
| 2147 |
'default' => [ |
| 2148 |
'size' => 30, |
| 2149 |
], |
| 2150 |
'range' => [ |
| 2151 |
'px' => [ |
| 2152 |
'min' => -200, |
| 2153 |
'max' => 200, |
| 2154 |
], |
| 2155 |
], |
| 2156 |
'selectors' => [ |
| 2157 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);', |
| 2158 |
], |
| 2159 |
'conditions' => [ |
| 2160 |
'terms' => [ |
| 2161 |
[ |
| 2162 |
'name' => 'navigation', |
| 2163 |
'value' => 'arrows-fraction', |
| 2164 |
], |
| 2165 |
[ |
| 2166 |
'name' => 'arrows_fraction_position', |
| 2167 |
'value' => 'center', |
| 2168 |
], |
| 2169 |
], |
| 2170 |
], |
| 2171 |
] |
| 2172 |
); |
| 2173 |
|
| 2174 |
$this->add_responsive_control( |
| 2175 |
'progress_y_position', |
| 2176 |
[ |
| 2177 |
'label' => __('Progress Offset', 'ultimate-store-kit'), |
| 2178 |
'type' => Controls_Manager::SLIDER, |
| 2179 |
'default' => [ |
| 2180 |
'size' => 15, |
| 2181 |
], |
| 2182 |
'range' => [ |
| 2183 |
'px' => [ |
| 2184 |
'min' => -200, |
| 2185 |
'max' => 200, |
| 2186 |
], |
| 2187 |
], |
| 2188 |
'selectors' => [ |
| 2189 |
'{{WRAPPER}} .usk-showcase-slider .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);', |
| 2190 |
], |
| 2191 |
'condition' => [ |
| 2192 |
'navigation' => 'progressbar', |
| 2193 |
], |
| 2194 |
] |
| 2195 |
); |
| 2196 |
|
| 2197 |
$this->add_responsive_control( |
| 2198 |
'scrollbar_vertical_offset', |
| 2199 |
[ |
| 2200 |
'label' => __('Scrollbar Offset', 'ultimate-store-kit'), |
| 2201 |
'type' => Controls_Manager::SLIDER, |
| 2202 |
'selectors' => [ |
| 2203 |
'{{WRAPPER}} .usk-showcase-slider .swiper-container-horizontal > .swiper-scrollbar, {{WRAPPER}} .usk-showcase-slider .swiper-horizontal > .swiper-scrollbar' => 'bottom: {{SIZE}}px;', |
| 2204 |
], |
| 2205 |
'condition' => [ |
| 2206 |
'show_scrollbar' => 'yes' |
| 2207 |
], |
| 2208 |
] |
| 2209 |
); |
| 2210 |
|
| 2211 |
$this->end_controls_section(); |
| 2212 |
} |
| 2213 |
|
| 2214 |
public function render_image() { |
| 2215 |
$tooltip_position = 'top'; |
| 2216 |
global $product; |
| 2217 |
$settings = $this->get_settings_for_display(); |
| 2218 |
$product_image = wp_get_attachment_image_url(get_post_thumbnail_id(), $settings['image_size']); |
| 2219 |
?> |
| 2220 |
<div class="usk-image-wrap"> |
| 2221 |
<img class="usk-image" src="<?php echo esc_url($product_image); ?>" alt="<?php echo esc_html(get_the_title()); ?>"> |
| 2222 |
<div class="usk-shoping"> |
| 2223 |
<?php |
| 2224 |
$this->register_global_template_add_to_wishlist($tooltip_position); |
| 2225 |
$this->register_global_template_quick_view($product->get_id(), $tooltip_position); |
| 2226 |
$this->register_global_template_add_to_cart($tooltip_position); |
| 2227 |
?> |
| 2228 |
</div> |
| 2229 |
</div> |
| 2230 |
<?php |
| 2231 |
} |
| 2232 |
public function render_add_to_cart() { |
| 2233 |
global $product; |
| 2234 |
$settings = $this->get_settings_for_display(); |
| 2235 |
if ('yes' == $settings['show_cart']) : ?> |
| 2236 |
<?php if ($product) { |
| 2237 |
$defaults = [ |
| 2238 |
'quantity' => 1, |
| 2239 |
'class' => implode( |
| 2240 |
' ', |
| 2241 |
array_filter( |
| 2242 |
[ |
| 2243 |
'usk-button', |
| 2244 |
'product_type_' . $product->get_type(), |
| 2245 |
$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '', |
| 2246 |
$product->supports('ajax_add_to_cart') && $product->is_purchasable() && $product->is_in_stock() ? 'ajax_add_to_cart' : '', |
| 2247 |
] |
| 2248 |
) |
| 2249 |
), |
| 2250 |
'attributes' => [ |
| 2251 |
'data-product_id' => $product->get_id(), |
| 2252 |
'data-product_sku' => $product->get_sku(), |
| 2253 |
'aria-label' => $product->add_to_cart_description(), |
| 2254 |
'rel' => 'nofollow', |
| 2255 |
], |
| 2256 |
]; |
| 2257 |
$args = apply_filters('woocommerce_loop_add_to_cart_args', wp_parse_args($defaults), $product); |
| 2258 |
if (isset($args['attributes']['aria-label'])) { |
| 2259 |
$args['attributes']['aria-label'] = wp_strip_all_tags($args['attributes']['aria-label']); |
| 2260 |
} |
| 2261 |
echo apply_filters( |
| 2262 |
'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok. |
| 2263 |
sprintf( |
| 2264 |
'<a href="%s" data-quantity="%s" class="%s" %s>%s <i class="button-icon eicon-arrow-right"></i></a>', |
| 2265 |
esc_url($product->add_to_cart_url()), |
| 2266 |
esc_attr(isset($args['quantity']) ? $args['quantity'] : 1), |
| 2267 |
esc_attr(isset($args['class']) ? $args['class'] : 'button'), |
| 2268 |
isset($args['attributes']) ? wc_implode_html_attributes($args['attributes']) : '', |
| 2269 |
esc_html($product->add_to_cart_text()) |
| 2270 |
), |
| 2271 |
$product, |
| 2272 |
$args |
| 2273 |
); |
| 2274 |
}; ?> |
| 2275 |
<?php endif; |
| 2276 |
} |
| 2277 |
function render_slider_header() { |
| 2278 |
$settings = $this->get_settings_for_display(); |
| 2279 |
$this->add_render_attribute('slider', 'class', ['usk-showcase-slider']); |
| 2280 |
$id = 'ultimate-store-kit-' . $this->get_id(); |
| 2281 |
$elementor_vp_lg = get_option('elementor_viewport_lg'); |
| 2282 |
$elementor_vp_md = get_option('elementor_viewport_md'); |
| 2283 |
$viewport_lg = !empty($elementor_vp_lg) ? $elementor_vp_lg - 1 : 1023; |
| 2284 |
$viewport_md = !empty($elementor_vp_md) ? $elementor_vp_md - 1 : 767; |
| 2285 |
$this->add_render_attribute('slider', 'id', $id); |
| 2286 |
$this->add_render_attribute('slider', 'class', ['usk-carousel', 'usk-carousel-layout', 'elementor-swiper']); |
| 2287 |
if ('arrows' == $settings['navigation']) { |
| 2288 |
$this->add_render_attribute('slider', 'class', 'usk-arrows-align-' . $settings['arrows_position']); |
| 2289 |
} elseif ('dots' == $settings['navigation']) { |
| 2290 |
$this->add_render_attribute('slider', 'class', 'usk-dots-align-' . $settings['dots_position']); |
| 2291 |
} elseif ('both' == $settings['navigation']) { |
| 2292 |
$this->add_render_attribute('slider', 'class', 'usk-arrows-dots-align-' . $settings['both_position']); |
| 2293 |
} elseif ('arrows-fraction' == $settings['navigation']) { |
| 2294 |
$this->add_render_attribute('slider', 'class', 'usk-arrows-dots-align-' . $settings['arrows_fraction_position']); |
| 2295 |
} |
| 2296 |
|
| 2297 |
if ('arrows-fraction' == $settings['navigation']) { |
| 2298 |
$pagination_type = 'fraction'; |
| 2299 |
} elseif ('both' == $settings['navigation'] or 'dots' == $settings['navigation']) { |
| 2300 |
$pagination_type = 'bullets'; |
| 2301 |
} elseif ('progressbar' == $settings['navigation']) { |
| 2302 |
$pagination_type = 'progressbar'; |
| 2303 |
} else { |
| 2304 |
$pagination_type = ''; |
| 2305 |
} |
| 2306 |
|
| 2307 |
$this->add_render_attribute( |
| 2308 |
[ |
| 2309 |
'slider' => [ |
| 2310 |
'data-settings' => [ |
| 2311 |
wp_json_encode(array_filter([ |
| 2312 |
"autoplay" => ("yes" == $settings["autoplay"]) ? ["delay" => $settings["autoplay_speed"]] : false, |
| 2313 |
"loop" => ($settings["loop"] == "yes") ? true : false, |
| 2314 |
"speed" => $settings["speed"]["size"], |
| 2315 |
"pauseOnHover" => ("yes" == $settings["pauseonhover"]) ? true : false, |
| 2316 |
"slidesPerView" => 1, |
| 2317 |
"slidesPerGroup" => isset($settings["slides_to_scroll_mobile"]) ? (int)$settings["slides_to_scroll_mobile"] : 1, |
| 2318 |
"spaceBetween" => !empty($settings["items_gap_mobile"]["size"]) ? (int)$settings["items_gap_mobile"]["size"] : 20, |
| 2319 |
"centeredSlides" => true, |
| 2320 |
"grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false, |
| 2321 |
"effect" => 'coverflow', |
| 2322 |
"observer" => ($settings["observer"]) ? true : false, |
| 2323 |
"observeParents" => ($settings["observer"]) ? true : false, |
| 2324 |
"breakpoints" => [ |
| 2325 |
(int) $viewport_md => [ |
| 2326 |
"slidesPerView" => 1.7, |
| 2327 |
"spaceBetween" => !empty($settings["items_gap_tablet"]["size"]) ? (int)$settings["items_gap_tablet"]["size"] : 20, |
| 2328 |
"slidesPerGroup" => isset($settings["slides_to_scroll_tablet"]) ? (int)$settings["slides_to_scroll_tablet"] : 1, |
| 2329 |
], |
| 2330 |
(int) $viewport_lg => [ |
| 2331 |
"slidesPerView" => 2, |
| 2332 |
"spaceBetween" => !empty($settings["items_gap"]["size"]) ? (int)$settings["items_gap"]["size"] : 20, |
| 2333 |
"slidesPerGroup" => isset($settings["slides_to_scroll"]) ? (int)$settings["slides_to_scroll"] : 1, |
| 2334 |
] |
| 2335 |
], |
| 2336 |
"navigation" => [ |
| 2337 |
"nextEl" => "#" . $id . " .usk-navigation-next", |
| 2338 |
"prevEl" => "#" . $id . " .usk-navigation-prev", |
| 2339 |
], |
| 2340 |
"pagination" => [ |
| 2341 |
"el" => "#" . $id . " .swiper-pagination", |
| 2342 |
"type" => $pagination_type, |
| 2343 |
"clickable" => "true", |
| 2344 |
'dynamicBullets' => ("yes" == $settings["dynamic_bullets"]) ? true : false, |
| 2345 |
], |
| 2346 |
"scrollbar" => [ |
| 2347 |
"el" => "#" . $id . " .swiper-scrollbar", |
| 2348 |
"hide" => "true", |
| 2349 |
], |
| 2350 |
'coverflowEffect' => [ |
| 2351 |
'rotate' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_rotate"]["size"] : 0, |
| 2352 |
'stretch' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_stretch"]["size"] : 0, |
| 2353 |
'depth' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_depth"]["size"] : 100, |
| 2354 |
'modifier' => ("yes" == $settings["coverflow_toggle"]) ? $settings["coverflow_modifier"]["size"] : 1, |
| 2355 |
'slideShadows' => false, |
| 2356 |
], |
| 2357 |
|
| 2358 |
])) |
| 2359 |
] |
| 2360 |
] |
| 2361 |
] |
| 2362 |
); |
| 2363 |
|
| 2364 |
$swiper_class = Plugin::$instance->experiments->is_feature_active( 'e_swiper_latest' ) ? 'swiper' : 'swiper-container'; |
| 2365 |
$this->add_render_attribute('swiper', 'class', 'usk-showcase-slider-wrapper swiper-carousel ' . $swiper_class); |
| 2366 |
?> |
| 2367 |
<div class="ultimate-store-kit"> |
| 2368 |
<div <?php $this->print_render_attribute_string('slider'); ?>> |
| 2369 |
<div <?php echo $this->get_render_attribute_string('swiper'); ?>> |
| 2370 |
<div class="swiper-wrapper"> |
| 2371 |
<?php |
| 2372 |
} |
| 2373 |
public function render_slider_footer() { |
| 2374 |
$settings = $this->get_settings_for_display(); |
| 2375 |
?> |
| 2376 |
</div> |
| 2377 |
<?php if ('yes' === $settings['show_scrollbar']) : ?> |
| 2378 |
<div class="swiper-scrollbar"></div> |
| 2379 |
<?php endif; ?> |
| 2380 |
</div> |
| 2381 |
|
| 2382 |
<?php if ('both' == $settings['navigation']) : ?> |
| 2383 |
<?php $this->register_global_template_both_navigation(); ?> |
| 2384 |
<?php if ('center' === $settings['both_position']) : ?> |
| 2385 |
<div class="usk-position-z-index usk-position-bottom"> |
| 2386 |
<div class="usk-dots-container"> |
| 2387 |
<div class="swiper-pagination"></div> |
| 2388 |
</div> |
| 2389 |
</div> |
| 2390 |
<?php endif; ?> |
| 2391 |
<?php elseif ('arrows-fraction' == $settings['navigation']) : ?> |
| 2392 |
<?php $this->register_global_template_arrows_fraction() ?> |
| 2393 |
<?php if ('center' === $settings['arrows_fraction_position']) : ?> |
| 2394 |
<div class="usk-dots-container"> |
| 2395 |
<div class="swiper-pagination"></div> |
| 2396 |
</div> |
| 2397 |
<?php endif; ?> |
| 2398 |
<?php else : ?> |
| 2399 |
<?php $this->register_global_template_pagination(); ?> |
| 2400 |
<?php $this->register_global_template_navigation(); ?> |
| 2401 |
|
| 2402 |
<?php endif; ?> |
| 2403 |
</div> |
| 2404 |
<?php |
| 2405 |
} |
| 2406 |
public function print_price_output($output) { |
| 2407 |
$tags = [ |
| 2408 |
'del' => ['aria-hidden' => []], |
| 2409 |
'span' => ['class' => []], |
| 2410 |
'bdi' => [], |
| 2411 |
'ins' => [], |
| 2412 |
]; |
| 2413 |
|
| 2414 |
if (isset($output)) { |
| 2415 |
echo wp_kses($output, $tags); |
| 2416 |
} |
| 2417 |
} |
| 2418 |
public function render_loop_item() { |
| 2419 |
$settings = $this->get_settings_for_display(); |
| 2420 |
$id = 'usk-wc-product-' . $this->get_id(); |
| 2421 |
$modal_id = wp_unique_id('modal-id-'); |
| 2422 |
|
| 2423 |
// $wp_query = $this->render_query(); |
| 2424 |
$this->query_product(); |
| 2425 |
$wp_query = $this->get_query(); |
| 2426 |
if ($wp_query->have_posts()) { ?> |
| 2427 |
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); |
| 2428 |
global $product; |
| 2429 |
$rating_count = $product->get_rating_count(); |
| 2430 |
$average = $product->get_average_rating(); |
| 2431 |
$have_rating = ('yes' === $settings['show_rating']) ? 'usk-have-rating' : ''; |
| 2432 |
|
| 2433 |
?> |
| 2434 |
<div class="swiper-slide usk-item <?php esc_attr_e($have_rating, 'ultimate-store-kit'); ?>"> |
| 2435 |
<?php $this->render_image(); ?> |
| 2436 |
<div class="usk-badge-label-wrapper"> |
| 2437 |
<div class="usk-badge-label-content"> |
| 2438 |
<?php $this->register_global_template_badge_label(); ?> |
| 2439 |
</div> |
| 2440 |
</div> |
| 2441 |
<div class="usk-item-box"> |
| 2442 |
<div class="usk-content"> |
| 2443 |
<?php if ('yes' == $settings['show_category']) : ?> |
| 2444 |
<?php printf('<div class="usk-category">%1$s</div>', wc_get_product_category_list($product->get_id(), ' | ')); ?> |
| 2445 |
<?php endif; ?> |
| 2446 |
<?php if ('yes' == $settings['show_title']) : |
| 2447 |
printf('<a href="%2$s" class="usk-title"><%1$s class="title">%3$s</%1$s></a>', $settings['title_tags'], $product->get_permalink(), $product->get_title()); |
| 2448 |
endif; ?> |
| 2449 |
</div> |
| 2450 |
<div class="usk-price-button-wrap"> |
| 2451 |
<?php if ('yes' == $settings['show_button']) : |
| 2452 |
printf('<div class="usk-button"><a href="%s">details</a></div>', get_permalink()); |
| 2453 |
endif; ?> |
| 2454 |
<?php if (('yes' == $settings['show_price'])) : ?> |
| 2455 |
<div class="usk-price"> |
| 2456 |
<?php |
| 2457 |
$this->print_price_output($product->get_price_html()); |
| 2458 |
?> |
| 2459 |
</div> |
| 2460 |
<?php endif; ?> |
| 2461 |
<?php if (('yes' == $settings['show_rating'])) : ?> |
| 2462 |
<div class="usk-rating"> |
| 2463 |
<?php echo $this->register_global_template_wc_rating($average, $rating_count); ?> |
| 2464 |
</div> |
| 2465 |
<?php endif; ?> |
| 2466 |
</div> |
| 2467 |
</div> |
| 2468 |
</div> |
| 2469 |
<?php endwhile; |
| 2470 |
wp_reset_postdata(); |
| 2471 |
} else { |
| 2472 |
echo '<div class="usk-alert-warning" usk-alert>' . esc_html__('Ops! There no product to display.', 'ultimate-store-kit') . '</div>'; |
| 2473 |
} |
| 2474 |
} |
| 2475 |
|
| 2476 |
public function render() { |
| 2477 |
$this->render_slider_header(); |
| 2478 |
$this->render_loop_item(); |
| 2479 |
$this->render_slider_footer(); |
| 2480 |
} |
| 2481 |
public function query_product() { |
| 2482 |
$default = $this->getGroupControlQueryArgs(); |
| 2483 |
$this->_query = new WP_Query($default); |
| 2484 |
} |
| 2485 |
} |
| 2486 |
|