PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.86
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.86
51.1.86 51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 All 40 releases
← All changes | includes/widgets/Media_Grid/Media_Grid.php +8058 -0 51.1.2 → 51.1.86 View file →
@@ -1,0 +1,8058 @@
1 +<?php
2 +
3 +namespace King_Addons;
4 +
5 +use Elementor\Embed;
6 +use Elementor\Icons_Manager;
7 +use Elementor\Widget_Base;
8 +use Elementor\Controls_Manager;
9 +use Elementor\Group_Control_Box_Shadow;
10 +use Elementor\Group_Control_Text_Shadow;
11 +use Elementor\Group_Control_Typography;
12 +use Elementor\Repeater;
13 +use Elementor\Group_Control_Image_Size;
14 +use WP_Query;
15 +
16 +if (!defined('ABSPATH')) {
17 + exit;
18 +}
19 +
20 +class Media_Grid extends Widget_Base
21 +{
22 +
23 + public function get_name()
24 + {
25 + return 'king-addons-media-grid';
26 + }
27 +
28 + public function get_title()
29 + {
30 + return esc_html__('Advanced Image Gallery', 'king-addons');
31 + }
32 +
33 + public function get_icon()
34 + {
35 + return 'king-addons-icon king-addons-media-grid';
36 + }
37 +
38 + public function get_categories()
39 + {
40 + return ['king-addons'];
41 + }
42 +
43 + public function get_keywords()
44 + {
45 + return ['king addons', 'king', 'addons', 'kingaddons', 'king-addons', 'carousel', 'slider', 'img', 'gr', 'filter', 'loop',
46 + 'image gallery', 'image slider', 'image carousel', 'image grid', 'media grid', 'slick', 'tile', 'tiles', 'gallery',
47 + 'masonry grid', 'isotope', 'masonry', 'grid', 'filterable grid', 'media', 'image', 'filterable'];
48 + }
49 +
50 + public function get_script_depends()
51 + {
52 + return [
53 + 'jquery',
54 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-grid-media',
55 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-isotope-kng',
56 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-slick-slick',
57 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-lightgallery-lightgallery'
58 + ];
59 + }
60 +
61 + public function get_style_depends()
62 + {
63 + return [
64 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-grid-grid',
65 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-slick-helper',
66 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-animation-button',
67 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-animation-general',
68 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-animation-timing',
69 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-animation-loading',
70 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-lightgallery-lightgallery',
71 + KING_ADDONS_ASSETS_UNIQUE_KEY . '-general-general',
72 + ];
73 + }
74 +
75 + public function get_custom_help_url()
76 + {
77 + return 'mailto:[email protected]?subject=Bug Report - King Addons&body=Please describe the issue';
78 + }
79 +
80 + public function has_widget_inner_wrapper(): bool
81 + {
82 + return true;
83 + }
84 +
85 + public function add_control_query_randomize()
86 + {
87 + $this->add_control(
88 + 'query_randomize',
89 + [
90 + 'label' => sprintf(__('Randomize Query %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
91 + 'type' => Controls_Manager::SWITCHER,
92 + 'classes' => 'king-addons-pro-control no-distance'
93 + ]
94 + );
95 + }
96 +
97 + public function add_control_order_posts()
98 + {
99 + $this->add_control(
100 + 'order_posts',
101 + [
102 + 'label' => esc_html__('Order By', 'king-addons'),
103 + 'type' => Controls_Manager::SELECT,
104 + 'default' => 'date',
105 + 'label_block' => false,
106 + 'options' => [
107 + 'date' => esc_html__('Date', 'king-addons'),
108 + 'pro-tl' => esc_html__('Title (Pro)', 'king-addons'),
109 + 'pro-mf' => esc_html__('Last Modified (Pro)', 'king-addons'),
110 + 'pro-d' => esc_html__('Post ID (Pro)', 'king-addons'),
111 + 'pro-ar' => esc_html__('Post Author (Pro)', 'king-addons'),
112 + 'pro-cc' => esc_html__('Comment Count (Pro)', 'king-addons')
113 + ],
114 + 'condition' => [
115 + 'query_randomize!' => 'rand',
116 + 'query_selection!' => 'manual'
117 + ]
118 + ]
119 + );
120 + }
121 +
122 + public function add_control_layout_columns()
123 + {
124 + $this->add_responsive_control(
125 + 'layout_columns',
126 + [
127 + 'label' => esc_html__('Columns', 'king-addons'),
128 + 'type' => Controls_Manager::SELECT,
129 + 'default' => 4,
130 + 'widescreen_default' => 4,
131 + 'laptop_default' => 4,
132 + 'tablet_extra_default' => 4,
133 + 'tablet_default' => 3,
134 + 'mobile_extra_default' => 3,
135 + 'mobile_default' => 1,
136 + 'options' => [
137 + 1 => esc_html__('One', 'king-addons'),
138 + 2 => esc_html__('Two', 'king-addons'),
139 + 3 => esc_html__('Three', 'king-addons'),
140 + 4 => esc_html__('Four', 'king-addons'),
141 + 'pro-5' => esc_html__('Five (Pro)', 'king-addons'),
142 + 'pro-6' => esc_html__('Six (Pro)', 'king-addons'),
143 + 'pro-7' => esc_html__('Seven (Pro)', 'king-addons'),
144 + 'pro-8' => esc_html__('Eight (Pro)', 'king-addons'),
145 + ],
146 + 'prefix_class' => 'king-addons-grid-columns-%s',
147 + 'separator' => 'before',
148 + 'render_type' => 'template',
149 + 'condition' => [
150 + 'layout_select' => ['fitRows', 'masonry', 'list'],
151 + ]
152 + ]
153 + );
154 + }
155 +
156 + public function add_control_layout_animation()
157 + {
158 + $this->add_control(
159 + 'layout_animation',
160 + [
161 + 'label' => esc_html__('Select Animation', 'king-addons'),
162 + 'type' => Controls_Manager::SELECT,
163 + 'default' => 'default',
164 + 'options' => [
165 + 'default' => esc_html__('Default', 'king-addons'),
166 + 'zoom' => esc_html__('Zoom', 'king-addons'),
167 + 'pro-fd' => esc_html__('Fade (Pro)', 'king-addons'),
168 + 'pro-fs' => esc_html__('Fade + SlideUp (Pro)', 'king-addons'),
169 + ],
170 + 'selectors_dictionary' => [
171 + 'default' => '',
172 + 'zoom' => 'opacity: 0; transform: scale(0.01)',
173 + ],
174 + 'selectors' => [
175 + '{{WRAPPER}} .king-addons-grid-item-inner' => '{{VALUE}}',
176 + ],
177 + 'render_type' => 'template',
178 + 'separator' => 'before',
179 + 'condition' => [
180 + 'layout_select!' => 'slider',
181 + ]
182 + ]
183 + );
184 + }
185 +
186 + public function add_control_layout_slider_amount()
187 + {
188 + $this->add_responsive_control(
189 + 'layout_slider_amount',
190 + [
191 + 'label' => esc_html__('Columns (Carousel)', 'king-addons'),
192 + 'type' => Controls_Manager::SELECT,
193 + 'label_block' => false,
194 + 'default' => 2,
195 + 'widescreen_default' => 2,
196 + 'laptop_default' => 2,
197 + 'tablet_extra_default' => 2,
198 + 'tablet_default' => 2,
199 + 'mobile_extra_default' => 2,
200 + 'mobile_default' => 1,
201 + 'options' => [
202 + 1 => esc_html__('One', 'king-addons'),
203 + 2 => esc_html__('Two', 'king-addons'),
204 + 'pro-3' => esc_html__('Three (Pro)', 'king-addons'),
205 + 'pro-4' => esc_html__('Four (Pro)', 'king-addons'),
206 + 'pro-5' => esc_html__('Five (Pro)', 'king-addons'),
207 + 'pro-6' => esc_html__('Six (Pro)', 'king-addons'),
208 + ],
209 + 'prefix_class' => 'king-addons-grid-slider-columns-%s',
210 + 'frontend_available' => true,
211 + 'render_type' => 'template',
212 + 'separator' => 'before',
213 + 'condition' => [
214 + 'layout_select' => 'slider',
215 + ],
216 + ]
217 + );
218 + }
219 +
220 + public function add_control_layout_slider_rows()
221 + {
222 + /** @noinspection PhpDuplicateArrayKeysInspection */
223 + $this->add_control(
224 + 'layout_slider_rows',
225 + [
226 + 'label' => esc_html__('Rows (Carousel)', 'king-addons'),
227 + 'type' => Controls_Manager::SELECT,
228 + 'label_block' => false,
229 + 'default' => 1,
230 + 'classes' => 'king-addons-pro-control no-distance',
231 + 'options' => [
232 + 1 => esc_html__('One', 'king-addons'),
233 + 1 => esc_html__('Two (Pro)', 'king-addons'),
234 + 1 => esc_html__('Three (Pro)', 'king-addons'),
235 + ],
236 + 'frontend_available' => true,
237 + 'render_type' => 'template',
238 + 'separator' => 'before',
239 + 'condition' => [
240 + 'layout_select' => 'slider',
241 + ],
242 + ]
243 + );
244 + }
245 +
246 + public function add_control_layout_slider_nav_hover()
247 + {
248 + $this->add_control(
249 + 'layout_slider_nav_hover',
250 + [
251 + 'label' => sprintf(__('Show on Hover %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
252 + 'type' => Controls_Manager::SWITCHER,
253 + 'classes' => 'king-addons-pro-control no-distance'
254 + ]
255 + );
256 + }
257 +
258 + public function add_control_layout_slider_dots_position()
259 + {
260 + $this->add_control(
261 + 'layout_slider_dots_position',
262 + [
263 + 'label' => esc_html__('Pagination Layout', 'king-addons'),
264 + 'type' => Controls_Manager::SELECT,
265 + 'default' => 'horizontal',
266 + 'options' => [
267 + 'horizontal' => esc_html__('Horizontal', 'king-addons'),
268 + 'pro-vr' => esc_html__('Vertical (Pro)', 'king-addons'),
269 + ],
270 + 'prefix_class' => 'king-addons-grid-slider-dots-',
271 + 'render_type' => 'template',
272 + 'condition' => [
273 + 'layout_slider_dots' => 'yes',
274 + 'layout_select' => 'slider',
275 + ],
276 + ]
277 + );
278 + }
279 +
280 + public function add_controls_group_layout_slider_autoplay()
281 + {
282 + $this->add_control(
283 + 'layout_slider_autoplay',
284 + [
285 + 'label' => sprintf(__('Autoplay %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
286 + 'type' => Controls_Manager::SWITCHER,
287 + 'classes' => 'king-addons-pro-control no-distance'
288 + ]
289 + );
290 + }
291 +
292 + public function add_option_element_select()
293 + {
294 + return [
295 + 'title' => esc_html__('Title', 'king-addons'),
296 + 'caption' => esc_html__('Caption', 'king-addons'),
297 + 'date' => esc_html__('Date', 'king-addons'),
298 + 'time' => esc_html__('Time', 'king-addons'),
299 + 'author' => esc_html__('Author', 'king-addons'),
300 + 'lightbox' => esc_html__('Lightbox', 'king-addons'),
301 + 'separator' => esc_html__('Separator', 'king-addons'),
302 + 'pro-lk' => esc_html__('Likes (Pro)', 'king-addons'),
303 + 'pro-shr' => esc_html__('Sharing (Pro)', 'king-addons'),
304 + ];
305 + }
306 +
307 + public function add_repeater_args_element_like_icon()
308 + {
309 + return [
310 + 'type' => Controls_Manager::HIDDEN,
311 + 'default' => ''
312 + ];
313 + }
314 +
315 + public function add_repeater_args_element_like_text()
316 + {
317 + return [
318 + 'type' => Controls_Manager::HIDDEN,
319 + 'default' => ''
320 + ];
321 + }
322 +
323 + public function add_repeater_args_element_like_show_count()
324 + {
325 + return [
326 + 'type' => Controls_Manager::HIDDEN,
327 + 'default' => ''
328 + ];
329 + }
330 +
331 + public function add_repeater_args_element_sharing_icon_1()
332 + {
333 + return [
334 + 'type' => Controls_Manager::HIDDEN,
335 + 'default' => ''
336 + ];
337 + }
338 +
339 + public function add_repeater_args_element_sharing_icon_2()
340 + {
341 + return [
342 + 'type' => Controls_Manager::HIDDEN,
343 + 'default' => ''
344 + ];
345 + }
346 +
347 + public function add_repeater_args_element_sharing_icon_3()
348 + {
349 + return [
350 + 'type' => Controls_Manager::HIDDEN,
351 + 'default' => ''
352 + ];
353 + }
354 +
355 + public function add_repeater_args_element_sharing_icon_4()
356 + {
357 + return [
358 + 'type' => Controls_Manager::HIDDEN,
359 + 'default' => ''
360 + ];
361 + }
362 +
363 + public function add_repeater_args_element_sharing_icon_5()
364 + {
365 + return [
366 + 'type' => Controls_Manager::HIDDEN,
367 + 'default' => ''
368 + ];
369 + }
370 +
371 + public function add_repeater_args_element_sharing_icon_6()
372 + {
373 + return [
374 + 'type' => Controls_Manager::HIDDEN,
375 + 'default' => ''
376 + ];
377 + }
378 +
379 + public function add_repeater_args_element_sharing_trigger()
380 + {
381 + return [
382 + 'type' => Controls_Manager::HIDDEN,
383 + 'default' => ''
384 + ];
385 + }
386 +
387 + public function add_repeater_args_element_sharing_trigger_icon()
388 + {
389 + return [
390 + 'type' => Controls_Manager::HIDDEN,
391 + 'default' => ''
392 + ];
393 + }
394 +
395 + public function add_repeater_args_element_sharing_trigger_action()
396 + {
397 + return [
398 + 'type' => Controls_Manager::HIDDEN,
399 + 'default' => ''
400 + ];
401 + }
402 +
403 + public function add_repeater_args_element_sharing_trigger_direction()
404 + {
405 + return [
406 + 'type' => Controls_Manager::HIDDEN,
407 + 'default' => ''
408 + ];
409 + }
410 +
411 + public function add_repeater_args_element_sharing_tooltip()
412 + {
413 + return [
414 + 'type' => Controls_Manager::HIDDEN,
415 + 'default' => ''
416 + ];
417 + }
418 +
419 + public function add_control_overlay_animation_divider()
420 + {
421 + }
422 +
423 + public function add_control_overlay_image()
424 + {
425 + }
426 +
427 + public function add_control_overlay_image_width()
428 + {
429 + }
430 +
431 + public function add_control_image_effects()
432 + {
433 + $this->add_control(
434 + 'image_effects',
435 + [
436 + 'label' => esc_html__('Select Effect', 'king-addons'),
437 + 'type' => Controls_Manager::SELECT,
438 + 'options' => [
439 + 'none' => esc_html__('None', 'king-addons'),
440 + 'pro-zi' => esc_html__('Zoom In (Pro)', 'king-addons'),
441 + 'pro-zo' => esc_html__('Zoom Out (Pro)', 'king-addons'),
442 + 'grayscale-in' => esc_html__('Grayscale In', 'king-addons'),
443 + 'pro-go' => esc_html__('Grayscale Out (Pro)', 'king-addons'),
444 + 'blur-in' => esc_html__('Blur In', 'king-addons'),
445 + 'pro-bo' => esc_html__('Blur Out (Pro)', 'king-addons'),
446 + 'slide' => esc_html__('Slide', 'king-addons'),
447 + ],
448 + 'default' => 'none',
449 + ]
450 + );
451 + }
452 +
453 + public function add_control_lightbox_popup_thumbnails()
454 + {
455 + $this->add_control(
456 + 'lightbox_popup_thumbnails',
457 + [
458 + 'label' => sprintf(__('Show Thumbnails %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
459 + 'type' => Controls_Manager::SWITCHER,
460 + 'classes' => 'king-addons-pro-control no-distance'
461 + ]
462 + );
463 + }
464 +
465 + public function add_control_lightbox_popup_thumbnails_default()
466 + {
467 + $this->add_control(
468 + 'lightbox_popup_thumbnails_default',
469 + [
470 + 'label' => sprintf(__('Show Thumbnails by Default %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
471 + 'type' => Controls_Manager::SWITCHER,
472 + 'classes' => 'king-addons-pro-control no-distance'
473 + ]
474 + );
475 + }
476 +
477 + public function add_control_lightbox_popup_sharing()
478 + {
479 + $this->add_control(
480 + 'lightbox_popup_sharing',
481 + [
482 + 'label' => sprintf(__('Show Sharing Button %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
483 + 'type' => Controls_Manager::SWITCHER,
484 + 'classes' => 'king-addons-pro-control no-distance'
485 + ]
486 + );
487 + }
488 +
489 + public function add_control_filters_deeplinking()
490 + {
491 + $this->add_control(
492 + 'filters_deeplinking',
493 + [
494 + 'label' => sprintf(__('Enable Deep Linking %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
495 + 'type' => Controls_Manager::SWITCHER,
496 + 'classes' => 'king-addons-pro-control no-distance'
497 + ]
498 + );
499 + }
500 +
501 + public function add_control_filters_animation()
502 + {
503 + $this->add_control(
504 + 'filters_animation',
505 + [
506 + 'label' => esc_html__('Select Animation', 'king-addons'),
507 + 'type' => Controls_Manager::SELECT,
508 + 'default' => 'default',
509 + 'options' => [
510 + 'default' => esc_html__('Default', 'king-addons'),
511 + 'zoom' => esc_html__('Zoom', 'king-addons'),
512 + 'pro-fd' => esc_html__('Fade (Pro)', 'king-addons'),
513 + 'pro-fs' => esc_html__('Fade + SlideUp (Pro)', 'king-addons'),
514 + ],
515 + 'separator' => 'before',
516 + ]
517 + );
518 + }
519 +
520 + public function add_control_filters_icon()
521 + {
522 + }
523 +
524 + public function add_control_filters_icon_align()
525 + {
526 + }
527 +
528 + public function add_control_filters_count()
529 + {
530 + $this->add_control(
531 + 'filters_count',
532 + [
533 + 'label' => sprintf(__('Show Count %s', 'king-addons'), '<i class="eicon-pro-icon"></i>'),
534 + 'type' => Controls_Manager::SWITCHER,
535 + 'classes' => 'king-addons-pro-control no-distance'
536 + ]
537 + );
538 + }
539 +
540 + public function add_control_filters_count_superscript()
541 + {
542 + }
543 +
544 + public function add_control_filters_count_brackets()
545 + {
546 + }
547 +
548 + public function add_control_filters_default_filter()
549 + {
550 + }
551 +
552 + public function add_control_pagination_type()
553 + {
554 + $this->add_control(
555 + 'pagination_type',
556 + [
557 + 'label' => esc_html__('Select Type', 'king-addons'),
558 + 'type' => Controls_Manager::SELECT,
559 + 'default' => 'load-more',
560 + 'options' => [
561 + 'default' => esc_html__('Default', 'king-addons'),
562 + 'numbered' => esc_html__('Numbered', 'king-addons'),
563 + 'load-more' => esc_html__('Load More Button', 'king-addons'),
564 + 'pro-is' => esc_html__('Infinite Scrolling (Pro)', 'king-addons'),
565 + ],
566 + 'separator' => 'after'
567 + ]
568 + );
569 + }
570 +
571 + public function add_section_style_likes()
572 + {
573 + }
574 +
575 + public function add_section_style_sharing()
576 + {
577 + }
578 +
579 + public function add_control_grid_item_even_bg_color()
580 + {
581 + }
582 +
583 + public function add_control_grid_item_even_border_color()
584 + {
585 + }
586 +
587 + public function add_control_overlay_color()
588 + {
589 + $this->add_control(
590 + 'overlay_color',
591 + [
592 + 'label' => esc_html__('Background Color', 'king-addons'),
593 + 'type' => Controls_Manager::COLOR,
594 + 'default' => 'rgba(0, 0, 0, 0.25)',
595 + 'selectors' => [
596 + '{{WRAPPER}} .king-addons-grid-media-hover-bg' => 'background-color: {{VALUE}}',
597 + ],
598 + ]
599 + );
600 + }
601 +
602 + public function add_control_overlay_blend_mode()
603 + {
604 + }
605 +
606 + public function add_control_overlay_border_color()
607 + {
608 + }
609 +
610 + public function add_control_overlay_border_type()
611 + {
612 + }
613 +
614 + public function add_control_overlay_border_width()
615 + {
616 + }
617 +
618 + public function add_control_title_pointer_color_hr()
619 + {
620 + }
621 +
622 + public function add_control_title_pointer()
623 + {
624 + }
625 +
626 + public function add_control_title_pointer_height()
627 + {
628 + }
629 +
630 + public function add_control_title_pointer_animation()
631 + {
632 + }
633 +
634 + public function add_control_tax1_pointer_color_hr()
635 + {
636 + }
637 +
638 + public function add_control_tax1_pointer()
639 + {
640 + }
641 +
642 + public function add_control_tax1_pointer_height()
643 + {
644 + }
645 +
646 + public function add_control_tax1_pointer_animation()
647 + {
648 + }
649 +
650 + public function add_control_tax2_pointer_color_hr()
651 + {
652 + }
653 +
654 + public function add_control_tax2_pointer()
655 + {
656 + }
657 +
658 + public function add_control_tax2_pointer_height()
659 + {
660 + }
661 +
662 + public function add_control_tax2_pointer_animation()
663 + {
664 + }
665 +
666 + public function add_control_filters_pointer_color_hr()
667 + {
668 + }
669 +
670 + public function add_control_filters_pointer()
671 + {
672 + }
673 +
674 + public function add_control_filters_pointer_height()
675 + {
676 + }
677 +
678 + public function add_control_filters_pointer_animation()
679 + {
680 + }
681 +
682 + public function add_control_stack_grid_slider_nav_position()
683 + {
684 + }
685 +
686 + public function add_control_grid_slider_dots_hr()
687 + {
688 + }
689 +
690 + protected function register_controls()
691 + {
692 +
693 +
694 + $this->start_controls_section(
695 + 'section_grid_query',
696 + [
697 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Query', 'king-addons'),
698 + 'tab' => Controls_Manager::TAB_CONTENT,
699 + ]
700 + );
701 +
702 +
703 + $post_taxonomies = get_object_taxonomies('attachment', 'objects');
704 + $post_taxonomy_names = [];
705 +
706 + $this->add_control(
707 + 'query_selection',
708 + [
709 + 'label' => esc_html__('Selection', 'king-addons'),
710 + 'type' => Controls_Manager::SELECT,
711 + 'default' => 'dynamic',
712 + 'options' => [
713 + 'dynamic' => esc_html__('Auto', 'king-addons'),
714 + 'manual' => esc_html__('Manual', 'king-addons'),
715 + ],
716 + ]
717 + );
718 +
719 + $this->add_control_order_posts();
720 +
721 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'grid', 'order_posts', ['pro-tl', 'pro-mf', 'pro-d', 'pro-ar', 'pro-cc']);
722 +
723 + $this->add_control(
724 + 'order_direction',
725 + [
726 + 'label' => esc_html__('Order', 'king-addons'),
727 + 'type' => Controls_Manager::SELECT,
728 + 'default' => 'DESC',
729 + 'label_block' => false,
730 + 'options' => [
731 + 'ASC' => esc_html__('Ascending', 'king-addons'),
732 + 'DESC' => esc_html__('Descending', 'king-addons'),
733 + ],
734 + 'condition' => [
735 + 'query_randomize!' => 'rand',
736 + 'query_selection!' => 'manual'
737 + ]
738 + ]
739 + );
740 +
741 + $this->add_control(
742 + 'query_author',
743 + [
744 + 'label' => esc_html__('Authors', 'king-addons'),
745 + 'type' => 'king-addons-ajax-select2',
746 + 'options' => 'ajaxselect2/getUsers',
747 + 'multiple' => true,
748 + 'label_block' => true,
749 + 'separator' => 'before',
750 + 'condition' => [
751 + 'query_selection' => 'dynamic',
752 + ],
753 + ]
754 + );
755 +
756 +
757 + foreach ($post_taxonomies as $slug => $tax) {
758 + global $wp_taxonomies;
759 + $post_type = '';
760 +
761 + if (isset($wp_taxonomies[$slug]->object_type[0])) {
762 + $post_type = $wp_taxonomies[$slug]->object_type[0];
763 + }
764 +
765 + $post_taxonomy_names[$slug] = $tax->label;
766 +
767 + $this->add_control(
768 + 'query_taxonomy_' . $slug,
769 + [
770 + 'label' => $tax,
771 + 'type' => 'king-addons-ajax-select2',
772 + 'options' => 'ajaxselect2/getTaxonomies',
773 + 'query_slug' => $slug,
774 + 'multiple' => true,
775 + 'label_block' => true,
776 + 'condition' => [
777 + 'query_source' => $post_type,
778 + 'query_selection' => 'dynamic',
779 + ],
780 + ]
781 + );
782 + }
783 +
784 +
785 + $this->add_control(
786 + 'query_exclude_attachment',
787 + [
788 + 'label' => esc_html__('Exclude Images', 'king-addons'),
789 + 'type' => 'king-addons-ajax-select2',
790 + 'options' => 'ajaxselect2/getPostsByPostType',
791 + 'query_slug' => 'attachment',
792 + 'multiple' => true,
793 + 'label_block' => true,
794 + 'condition' => [
795 + 'query_selection' => 'dynamic',
796 + ],
797 + ]
798 + );
799 +
800 +
801 + $this->add_control(
802 + 'query_manual_attachment',
803 + [
804 + 'label' => esc_html__('Add Images (Legacy)', 'king-addons'),
805 + 'type' => Controls_Manager::GALLERY,
806 + 'description' => esc_html__('Used only when "Add Images & Videos" is empty. Prefer the repeater below for images and videos together.', 'king-addons'),
807 + 'separator' => 'before',
808 + 'dynamic' => [
809 + 'active' => true,
810 + ],
811 + 'condition' => [
812 + 'query_selection' => 'manual',
813 + ],
814 + ]
815 + );
816 +
817 + $media_repeater = new Repeater();
818 +
819 + $media_repeater->add_control(
820 + 'item_type',
821 + [
822 + 'label' => esc_html__('Media Type', 'king-addons'),
823 + 'type' => Controls_Manager::SELECT,
824 + 'default' => 'image',
825 + 'options' => [
826 + 'image' => esc_html__('Image', 'king-addons'),
827 + 'video' => esc_html__('Video', 'king-addons'),
828 + ],
829 + ]
830 + );
831 +
832 + $media_repeater->add_control(
833 + 'item_image',
834 + [
835 + 'label' => esc_html__('Image', 'king-addons'),
836 + 'type' => Controls_Manager::MEDIA,
837 + 'dynamic' => [
838 + 'active' => true,
839 + ],
840 + 'description' => esc_html__('For videos, this image is used as the cover/poster in the gallery.', 'king-addons'),
841 + ]
842 + );
843 +
844 + $media_repeater->add_control(
845 + 'item_video',
846 + [
847 + 'label' => esc_html__('Video File', 'king-addons'),
848 + 'type' => Controls_Manager::MEDIA,
849 + 'media_types' => [
850 + 'video',
851 + ],
852 + 'condition' => [
853 + 'item_type' => 'video',
854 + ],
855 + ]
856 + );
857 +
858 + $this->add_control(
859 + 'query_manual_media',
860 + [
861 + 'label' => esc_html__('Add Images & Videos', 'king-addons'),
862 + 'type' => Controls_Manager::REPEATER,
863 + 'fields' => $media_repeater->get_controls(),
864 + 'default' => [],
865 + 'title_field' => '{{{ item_type.charAt(0).toUpperCase() + item_type.slice(1) }}}',
866 + 'separator' => 'before',
867 + 'condition' => [
868 + 'query_selection' => 'manual',
869 + ],
870 + ]
871 + );
872 +
873 + $this->add_control(
874 + 'query_include_videos',
875 + [
876 + 'label' => esc_html__('Include Videos', 'king-addons'),
877 + 'type' => Controls_Manager::SWITCHER,
878 + 'default' => '',
879 + 'description' => esc_html__('Include video files from the Media Library in the Auto selection.', 'king-addons'),
880 + 'condition' => [
881 + 'query_selection' => 'dynamic',
882 + ],
883 + 'separator' => 'before',
884 + ]
885 + );
886 +
887 + $this->add_control(
888 + 'query_posts_per_page',
889 + [
890 + 'label' => esc_html__('Items Per Page', 'king-addons'),
891 + 'type' => Controls_Manager::NUMBER,
892 + 'default' => 10,
893 + 'min' => 0,
894 + ]
895 + );
896 +
897 + $this->add_control(
898 + 'query_offset',
899 + [
900 + 'label' => esc_html__('Offset', 'king-addons'),
901 + 'type' => Controls_Manager::NUMBER,
902 + 'default' => 0,
903 + 'min' => 0,
904 + 'condition' => [
905 + 'query_selection' => 'dynamic',
906 + ]
907 + ]
908 + );
909 +
910 + $this->add_control(
911 + 'query_not_found_text',
912 + [
913 + 'label' => esc_html__('Not Found Text', 'king-addons'),
914 + 'type' => Controls_Manager::TEXT,
915 + 'dynamic' => [
916 + 'active' => true,
917 + ],
918 + 'default' => 'No Images Found!',
919 + 'condition' => [
920 + 'query_selection' => 'dynamic',
921 + ]
922 + ]
923 + );
924 +
925 + $this->add_control_query_randomize();
926 +
927 +
928 + $this->end_controls_section();
929 +
930 +
931 + $this->start_controls_section(
932 + 'section_grid_layout',
933 + [
934 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Layout', 'king-addons'),
935 + 'tab' => Controls_Manager::TAB_CONTENT,
936 + ]
937 + );
938 +
939 + $this->add_control(
940 + 'layout_select',
941 + [
942 + 'label' => esc_html__('Select Layout', 'king-addons'),
943 + 'type' => Controls_Manager::SELECT,
944 + 'default' => 'masonry',
945 + 'options' => [
946 + 'fitRows' => esc_html__('FitRows - Equal Height', 'king-addons'),
947 + 'masonry' => esc_html__('Masonry - Unlimited Height', 'king-addons'),
948 + 'slider' => esc_html__('Slider / Carousel', 'king-addons'),
949 + ],
950 + 'render_type' => 'template',
951 + 'label_block' => true
952 + ]
953 + );
954 +
955 + $this->add_responsive_control(
956 + 'layout_fitrows_media_height',
957 + [
958 + 'label' => esc_html__('Media Height', 'king-addons'),
959 + 'type' => Controls_Manager::SLIDER,
960 + 'size_units' => ['px', 'vh'],
961 + 'range' => [
962 + 'px' => [
963 + 'min' => 50,
964 + 'max' => 800,
965 + ],
966 + 'vh' => [
967 + 'min' => 10,
968 + 'max' => 100,
969 + ],
970 + ],
971 + 'default' => [
972 + 'unit' => 'px',
973 + 'size' => 280,
974 + ],
975 + 'selectors' => [
976 + '{{WRAPPER}} .king-addons-grid[data-settings*="fitRows"] .king-addons-grid-media-wrap' => 'height: {{SIZE}}{{UNIT}};',
977 + ],
978 + 'condition' => [
979 + 'layout_select' => 'fitRows',
980 + ],
981 + 'separator' => 'before',
982 + ]
983 + );
984 +
985 + $this->add_responsive_control(
986 + 'layout_fitrows_image_fit',
987 + [
988 + 'label' => esc_html__('Image Fit', 'king-addons'),
989 + 'type' => Controls_Manager::SELECT,
990 + 'options' => [
991 + 'cover' => esc_html__('Cover', 'king-addons'),
992 + 'contain' => esc_html__('Contain', 'king-addons'),
993 + ],
994 + 'default' => 'cover',
995 + 'selectors' => [
996 + '{{WRAPPER}} .king-addons-grid[data-settings*="fitRows"] .king-addons-grid-image-wrap img' => 'object-fit: {{VALUE}};',
997 + ],
998 + 'condition' => [
999 + 'layout_select' => 'fitRows',
1000 + ],
1001 + ]
1002 + );
1003 +
1004 + $this->add_responsive_control(
1005 + 'layout_fitrows_image_fit_position',
1006 + [
1007 + 'label' => esc_html__('Image Fit Position', 'king-addons'),
1008 + 'type' => Controls_Manager::SELECT,
1009 + 'options' => [
1010 + 'center center' => esc_html__('Center', 'king-addons'),
1011 + 'top center' => esc_html__('Top', 'king-addons'),
1012 + 'bottom center' => esc_html__('Bottom', 'king-addons'),
1013 + 'center left' => esc_html__('Left', 'king-addons'),
1014 + 'center right' => esc_html__('Right', 'king-addons'),
1015 + ],
1016 + 'default' => 'center center',
1017 + 'selectors' => [
1018 + '{{WRAPPER}} .king-addons-grid[data-settings*="fitRows"] .king-addons-grid-image-wrap img' => 'object-position: {{VALUE}};',
1019 + ],
1020 + 'condition' => [
1021 + 'layout_select' => 'fitRows',
1022 + ],
1023 + ]
1024 + );
1025 +
1026 + $this->add_group_control(
1027 + Group_Control_Image_Size::get_type(),
1028 + [
1029 + 'name' => 'layout_image_crop',
1030 + 'default' => 'full',
1031 + ]
1032 + );
1033 +
1034 + $this->add_control_layout_columns();
1035 +
1036 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
1037 + $this->add_control(
1038 + 'grid_columns_pro_notice',
1039 + [
1040 + 'type' => Controls_Manager::RAW_HTML,
1041 + 'raw' => 'Grid Columns option is fully supported<br> in the <strong><a href="https://kingaddons.com/pricing/?utm_source=kng-module-media-grid-settings-upgrade-pro&utm_medium=plugin&utm_campaign=kng" target="_blank">Pro version</a></strong>',
1042 +
1043 + 'content_classes' => 'king-addons-pro-notice',
1044 + ]
1045 + );
1046 + }
1047 +
1048 + $this->add_responsive_control(
1049 + 'layout_gutter_hr',
1050 + [
1051 + 'label' => esc_html__('Horizontal Gutter', 'king-addons'),
1052 + 'type' => Controls_Manager::SLIDER,
1053 + 'default' => [
1054 + 'size' => 10,
1055 + ],
1056 + 'widescreen_default' => [
1057 + 'size' => 10,
1058 + ],
1059 + 'laptop_default' => [
1060 + 'size' => 10,
1061 + ],
1062 + 'tablet_extra_default' => [
1063 + 'size' => 10,
1064 + ],
1065 + 'tablet_default' => [
1066 + 'size' => 10,
1067 + ],
1068 + 'mobile_extra_default' => [
1069 + 'size' => 10,
1070 + ],
1071 + 'mobile_default' => [
1072 + 'size' => 10,
1073 + ],
1074 + 'range' => [
1075 + 'px' => [
1076 + 'min' => 0,
1077 + 'max' => 150,
1078 + ],
1079 + ],
1080 + 'condition' => [
1081 + 'layout_select' => ['fitRows', 'masonry', 'list'],
1082 + ],
1083 + 'separator' => 'before'
1084 + ]
1085 + );
1086 +
1087 + $this->add_responsive_control(
1088 + 'layout_gutter_vr',
1089 + [
1090 + 'label' => esc_html__('Vertical Gutter', 'king-addons'),
1091 + 'type' => Controls_Manager::SLIDER,
1092 + 'default' => [
1093 + 'size' => 10,
1094 + ],
1095 + 'widescreen_default' => [
1096 + 'size' => 10,
1097 + ],
1098 + 'laptop_default' => [
1099 + 'size' => 10,
1100 + ],
1101 + 'tablet_extra_default' => [
1102 + 'size' => 10,
1103 + ],
1104 + 'tablet_default' => [
1105 + 'size' => 10,
1106 + ],
1107 + 'mobile_extra_default' => [
1108 + 'size' => 10,
1109 + ],
1110 + 'mobile_default' => [
1111 + 'size' => 10,
1112 + ],
1113 + 'range' => [
1114 + 'px' => [
1115 + 'min' => 0,
1116 + 'max' => 150,
1117 + ],
1118 + ],
1119 + 'condition' => [
1120 + 'layout_select' => ['fitRows', 'masonry', 'list'],
1121 + ],
1122 + ]
1123 + );
1124 +
1125 + $this->add_responsive_control(
1126 + 'layout_filters',
1127 + [
1128 + 'label' => esc_html__('Show Filters', 'king-addons'),
1129 + 'type' => Controls_Manager::SWITCHER,
1130 + 'default' => '',
1131 + 'selectors_dictionary' => [
1132 + '' => 'none',
1133 + 'yes' => 'block'
1134 + ],
1135 + 'selectors' => [
1136 + '{{WRAPPER}} .king-addons-grid-filters' => 'display:{{VALUE}};',
1137 + ],
1138 + 'render_type' => 'template',
1139 + 'separator' => 'before',
1140 + 'condition' => [
1141 + 'layout_select!' => 'slider',
1142 + ]
1143 + ]
1144 + );
1145 +
1146 + $this->add_control(
1147 + 'layout_pagination',
1148 + [
1149 + 'label' => esc_html__('Show Pagination', 'king-addons'),
1150 + 'description' => esc_html__('Please note that Pagination doesn\'t work in editor', 'king-addons'),
1151 + 'type' => Controls_Manager::SWITCHER,
1152 + 'default' => 'yes',
1153 + 'return_value' => 'yes',
1154 + 'render_type' => 'template',
1155 + 'condition' => [
1156 + 'layout_select!' => 'slider',
1157 + ]
1158 + ]
1159 + );
1160 +
1161 + $this->add_control_layout_animation();
1162 +
1163 +
1164 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'layout_animation', ['pro-fd', 'pro-fs']);
1165 +
1166 + $this->add_control(
1167 + 'layout_animation_duration',
1168 + [
1169 + 'label' => esc_html__('Animation Duration', 'king-addons'),
1170 + 'type' => Controls_Manager::NUMBER,
1171 + 'default' => 0.3,
1172 + 'min' => 0,
1173 + 'max' => 5,
1174 + 'step' => 0.1,
1175 + 'condition' => [
1176 + 'layout_animation!' => 'default',
1177 + 'layout_select!' => 'slider',
1178 + ],
1179 + ]
1180 + );
1181 +
1182 + $this->add_control(
1183 + 'layout_animation_delay',
1184 + [
1185 + 'label' => esc_html__('Animation Delay', 'king-addons'),
1186 + 'type' => Controls_Manager::NUMBER,
1187 + 'default' => 0.1,
1188 + 'min' => 0,
1189 + 'max' => 5,
1190 + 'step' => 0.05,
1191 + 'condition' => [
1192 + 'layout_animation!' => 'default',
1193 + 'layout_select!' => 'slider',
1194 + ],
1195 + ]
1196 + );
1197 +
1198 + $this->add_control_layout_slider_amount();
1199 +
1200 + $this->add_control_layout_slider_rows();
1201 +
1202 + $this->add_control(
1203 + 'layout_slides_to_scroll',
1204 + [
1205 + 'label' => esc_html__('Slides to Scroll', 'king-addons'),
1206 + 'type' => Controls_Manager::NUMBER,
1207 + 'min' => 1,
1208 + 'max' => 10,
1209 + 'default' => 2,
1210 + 'frontend_available' => true,
1211 + 'separator' => 'before',
1212 + 'condition' => [
1213 + 'layout_select' => 'slider',
1214 + ],
1215 + ]
1216 + );
1217 +
1218 + $this->add_responsive_control(
1219 + 'layout_slider_gutter',
1220 + [
1221 + 'type' => Controls_Manager::SLIDER,
1222 + 'label' => esc_html__('Gutter', 'king-addons'),
1223 + 'size_units' => ['px'],
1224 + 'range' => [
1225 + 'px' => [
1226 + 'min' => 0,
1227 + 'max' => 50,
1228 + ]
1229 + ],
1230 + 'default' => [
1231 + 'unit' => 'px',
1232 + 'size' => 0,
1233 + ],
1234 + 'selectors' => [
1235 + '{{WRAPPER}} .king-addons-grid .slick-slide' => 'margin-left: {{SIZE}}{{UNIT}};',
1236 + '{{WRAPPER}}.king-addons-grid-slider-rows-2 .king-addons-grid .king-addons-grid-item' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1237 + '{{WRAPPER}}.king-addons-grid-slider-rows-3 .king-addons-grid .king-addons-grid-item' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1238 + '{{WRAPPER}} .king-addons-grid .slick-list' => 'margin-left: -{{SIZE}}{{UNIT}};',
1239 + '{{WRAPPER}}.king-addons-grid-slider-rows-2 .king-addons-grid .slick-list' => 'margin-bottom: -{{SIZE}}{{UNIT}};',
1240 + '{{WRAPPER}}.king-addons-grid-slider-rows-3 .king-addons-grid .slick-list' => 'margin-bottom: -{{SIZE}}{{UNIT}};'
1241 + ],
1242 + 'render_type' => 'template',
1243 + 'condition' => [
1244 + 'layout_slider_amount!' => '1',
1245 + 'layout_select' => 'slider',
1246 + ]
1247 + ]
1248 + );
1249 +
1250 + $this->add_responsive_control(
1251 + 'layout_slider_nav',
1252 + [
1253 + 'label' => esc_html__('Navigation', 'king-addons'),
1254 + 'type' => Controls_Manager::SWITCHER,
1255 + 'default' => 'yes',
1256 + 'widescreen_default' => 'yes',
1257 + 'laptop_default' => 'yes',
1258 + 'tablet_extra_default' => 'yes',
1259 + 'tablet_default' => 'yes',
1260 + 'mobile_extra_default' => 'yes',
1261 + 'mobile_default' => 'yes',
1262 + 'selectors_dictionary' => [
1263 + '' => 'none',
1264 + 'yes' => 'flex'
1265 + ],
1266 + 'selectors' => [
1267 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'display:{{VALUE}} !important;',
1268 + ],
1269 + 'separator' => 'before',
1270 + 'condition' => [
1271 + 'layout_select' => 'slider',
1272 + ]
1273 + ]
1274 + );
1275 +
1276 + $this->add_control_layout_slider_nav_hover();
1277 +
1278 + $this->add_control(
1279 + 'layout_slider_nav_icon',
1280 + [
1281 + 'label' => esc_html__('Select Icon', 'king-addons'),
1282 + 'type' => Controls_Manager::SELECT,
1283 + 'default' => 'fas fa-angle-left',
1284 + 'options' => [
1285 + 'fas fa-angle-left' => esc_html__('Angle', 'king-addons'),
1286 + 'fas fa-angle-double-left' => esc_html__('Angle Double', 'king-addons'),
1287 + 'fas fa-arrow-left' => esc_html__('Arrow', 'king-addons'),
1288 + 'fas fa-arrow-alt-circle-left' => esc_html__('Arrow Circle', 'king-addons'),
1289 + 'far fa-arrow-alt-circle-left' => esc_html__('Arrow Circle Alt', 'king-addons'),
1290 + 'fas fa-long-arrow-alt-left' => esc_html__('Long Arrow', 'king-addons'),
1291 + 'fas fa-chevron-left' => esc_html__('Chevron', 'king-addons'),
1292 + ],
1293 + 'separator' => 'after',
1294 + 'condition' => [
1295 + 'layout_slider_nav' => 'yes',
1296 + 'layout_select' => 'slider',
1297 + ],
1298 + ]
1299 + );
1300 +
1301 + $this->add_responsive_control(
1302 + 'layout_slider_dots',
1303 + [
1304 + 'label' => esc_html__('Pagination', 'king-addons'),
1305 + 'type' => Controls_Manager::SWITCHER,
1306 + 'default' => 'yes',
1307 + 'widescreen_default' => 'yes',
1308 + 'laptop_default' => 'yes',
1309 + 'tablet_extra_default' => 'yes',
1310 + 'tablet_default' => 'yes',
1311 + 'mobile_extra_default' => 'yes',
1312 + 'mobile_default' => 'yes',
1313 + 'selectors_dictionary' => [
1314 + '' => 'none',
1315 + 'yes' => 'inline-table'
1316 + ],
1317 + 'selectors' => [
1318 + '{{WRAPPER}} .king-addons-grid-slider-dots' => 'display:{{VALUE}};',
1319 + ],
1320 + 'render_type' => 'template',
1321 + 'condition' => [
1322 + 'layout_select' => 'slider',
1323 + ]
1324 + ]
1325 + );
1326 +
1327 + $this->add_control_layout_slider_dots_position();
1328 +
1329 +
1330 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'layout_slider_dots_position', ['pro-vr']);
1331 +
1332 + $this->add_controls_group_layout_slider_autoplay();
1333 +
1334 + $this->add_control(
1335 + 'layout_slider_loop',
1336 + [
1337 + 'label' => esc_html__('Infinite Loop', 'king-addons'),
1338 + 'type' => Controls_Manager::SWITCHER,
1339 + 'default' => 'yes',
1340 + 'frontend_available' => true,
1341 + 'separator' => 'before',
1342 + 'condition' => [
1343 + 'layout_select' => 'slider',
1344 + ],
1345 + ]
1346 + );
1347 +
1348 + $this->add_control(
1349 + 'layout_slider_effect',
1350 + [
1351 + 'type' => Controls_Manager::SELECT,
1352 + 'label' => esc_html__('Effect', 'king-addons'),
1353 + 'default' => 'slide',
1354 + 'options' => [
1355 + 'slide' => esc_html__('Slide', 'king-addons'),
1356 + 'fade' => esc_html__('Fade', 'king-addons'),
1357 + ],
1358 + 'condition' => [
1359 + 'layout_slider_amount' => 1,
1360 + 'layout_select' => 'slider',
1361 + ],
1362 + ]
1363 + );
1364 +
1365 + $this->add_control(
1366 + 'layout_slider_effect_duration',
1367 + [
1368 + 'label' => esc_html__('Effect Duration', 'king-addons'),
1369 + 'type' => Controls_Manager::NUMBER,
1370 + 'default' => 0.7,
1371 + 'min' => 0,
1372 + 'max' => 5,
1373 + 'step' => 0.1,
1374 + 'condition' => [
1375 + 'layout_slider_amount' => 1,
1376 + 'layout_select' => 'slider',
1377 + ],
1378 + ]
1379 + );
1380 +
1381 + $this->end_controls_section();
1382 +
1383 +
1384 + $this->start_controls_section(
1385 + 'section_grid_elements',
1386 + [
1387 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Elements', 'king-addons'),
1388 + 'tab' => Controls_Manager::TAB_CONTENT,
1389 + ]
1390 + );
1391 +
1392 + $repeater = new Repeater();
1393 +
1394 + $repeater->add_control(
1395 + 'element_select',
1396 + [
1397 + 'label' => esc_html__('Select Element', 'king-addons'),
1398 + 'type' => Controls_Manager::SELECT,
1399 + 'default' => 'title',
1400 + 'options' => array_merge($this->add_option_element_select(), $post_taxonomy_names),
1401 + 'separator' => 'after'
1402 + ]
1403 + );
1404 +
1405 +
1406 + Core::renderUpgradeProNotice($repeater, Controls_Manager::RAW_HTML, 'media-grid', 'element_select', ['pro-lk', 'pro-shr']);
1407 +
1408 + $repeater->add_control(
1409 + 'element_location',
1410 + [
1411 + 'label' => esc_html__('Location', 'king-addons'),
1412 + 'type' => Controls_Manager::SELECT,
1413 + 'default' => 'over',
1414 + 'options' => [
1415 + 'above' => esc_html__('Above Media', 'king-addons'),
1416 + 'over' => esc_html__('Over Media', 'king-addons'),
1417 + 'below' => esc_html__('Below Media', 'king-addons'),
1418 + ]
1419 + ]
1420 + );
1421 +
1422 + $repeater->add_control(
1423 + 'element_display',
1424 + [
1425 + 'label' => esc_html__('Display', 'king-addons'),
1426 + 'type' => Controls_Manager::SELECT,
1427 + 'default' => 'block',
1428 + 'options' => [
1429 + 'inline' => esc_html__('Inline', 'king-addons'),
1430 + 'block' => esc_html__('Seperate Line', 'king-addons'),
1431 + 'custom' => esc_html__('Custom Width', 'king-addons'),
1432 + ],
1433 + ]
1434 + );
1435 +
1436 + $repeater->add_control(
1437 + 'element_custom_width',
1438 + [
1439 + 'label' => esc_html__('Element Width', 'king-addons'),
1440 + 'type' => Controls_Manager::SLIDER,
1441 + 'size_units' => ['%'],
1442 + 'range' => [
1443 + '%' => [
1444 + 'min' => 0,
1445 + 'max' => 100,
1446 + ],
1447 + ],
1448 + 'default' => [
1449 + 'unit' => '%',
1450 + 'size' => 100,
1451 + ],
1452 + 'selectors' => [
1453 + '{{WRAPPER}} {{CURRENT_ITEM}}' => 'width: {{SIZE}}%;',
1454 + ],
1455 + 'condition' => [
1456 + 'element_display' => 'custom',
1457 + ],
1458 + ]
1459 + );
1460 +
1461 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
1462 + $repeater->add_control(
1463 + 'element_align_pro_notice',
1464 + [
1465 + 'raw' => 'Vertical Align option is available<br> in the <strong><a href="https://kingaddons.com/pricing/?utm_source=kng-module-media-grid-settings-upgrade-pro&utm_medium=plugin&utm_campaign=kng" target="_blank">Pro version</a></strong>',
1466 +
1467 + 'type' => Controls_Manager::RAW_HTML,
1468 + 'content_classes' => 'king-addons-pro-notice',
1469 + 'condition' => [
1470 + 'element_location' => 'over',
1471 + ],
1472 + ]
1473 + );
1474 + }
1475 +
1476 + $repeater->add_control(
1477 + 'element_align_vr',
1478 + [
1479 + 'label' => esc_html__('Vertical Align', 'king-addons'),
1480 + 'type' => Controls_Manager::CHOOSE,
1481 + 'label_block' => false,
1482 + 'default' => 'middle',
1483 + 'options' => [
1484 + 'top' => [
1485 + 'title' => esc_html__('Top', 'king-addons'),
1486 + 'icon' => 'eicon-v-align-top',
1487 + ],
1488 + 'middle' => [
1489 + 'title' => esc_html__('Middle', 'king-addons'),
1490 + 'icon' => 'eicon-v-align-middle',
1491 + ],
1492 + 'bottom' => [
1493 + 'title' => esc_html__('Bottom', 'king-addons'),
1494 + 'icon' => 'eicon-v-align-bottom',
1495 + ],
1496 + ],
1497 + 'condition' => [
1498 + 'element_location' => 'over',
1499 + ],
1500 + ]
1501 + );
1502 +
1503 + $repeater->add_control(
1504 + 'element_align_hr',
1505 + [
1506 + 'label' => esc_html__('Horizontal Align', 'king-addons'),
1507 + 'type' => Controls_Manager::CHOOSE,
1508 + 'label_block' => false,
1509 + 'default' => 'center',
1510 + 'options' => [
1511 + 'left' => [
1512 + 'title' => esc_html__('Left', 'king-addons'),
1513 + 'icon' => 'eicon-h-align-left',
1514 + ],
1515 + 'center' => [
1516 + 'title' => esc_html__('Center', 'king-addons'),
1517 + 'icon' => 'eicon-h-align-center',
1518 + ],
1519 + 'right' => [
1520 + 'title' => esc_html__('Right', 'king-addons'),
1521 + 'icon' => 'eicon-h-align-right',
1522 + ]
1523 + ],
1524 + 'selectors' => [
1525 + '{{WRAPPER}} {{CURRENT_ITEM}}' => 'text-align: {{VALUE}}',
1526 + ],
1527 + 'render_type' => 'template',
1528 + 'separator' => 'after'
1529 + ]
1530 + );
1531 +
1532 + $repeater->add_control(
1533 + 'element_title_tag',
1534 + [
1535 + 'label' => esc_html__('Title HTML Tag', 'king-addons'),
1536 + 'type' => Controls_Manager::SELECT,
1537 + 'options' => [
1538 + 'h1' => 'H1',
1539 + 'h2' => 'H2',
1540 + 'h3' => 'H3',
1541 + 'h4' => 'H4',
1542 + 'h5' => 'H5',
1543 + 'h6' => 'H6',
1544 + 'div' => 'div',
1545 + 'span' => 'span',
1546 + 'P' => 'p'
1547 + ],
1548 + 'default' => 'h2',
1549 + 'condition' => [
1550 + 'element_select' => 'title',
1551 + ]
1552 + ]
1553 + );
1554 +
1555 + $repeater->add_control(
1556 + 'element_dropcap',
1557 + [
1558 + 'label' => esc_html__('Enable Drop Cap', 'king-addons'),
1559 + 'type' => Controls_Manager::SWITCHER,
1560 + 'return_value' => 'yes',
1561 + 'condition' => [
1562 + 'element_select' => ['caption'],
1563 + ]
1564 + ]
1565 + );
1566 +
1567 + $repeater->add_control(
1568 + 'element_word_count',
1569 + [
1570 + 'label' => esc_html__('Word Count', 'king-addons'),
1571 + 'type' => Controls_Manager::NUMBER,
1572 + 'default' => 20,
1573 + 'min' => 1,
1574 + 'condition' => [
1575 + 'element_select' => ['title', 'caption'],
1576 + ]
1577 + ]
1578 + );
1579 +
1580 + $repeater->add_control(
1581 + 'element_show_avatar',
1582 + [
1583 + 'label' => esc_html__('Show Avatar', 'king-addons'),
1584 + 'type' => Controls_Manager::SWITCHER,
1585 + 'return_value' => 'yes',
1586 + 'condition' => [
1587 + 'element_select' => ['author']
1588 + ]
1589 + ]
1590 + );
1591 +
1592 + $repeater->add_control(
1593 + 'element_avatar_size',
1594 + [
1595 + 'label' => esc_html__('Avatar Size', 'king-addons'),
1596 + 'type' => Controls_Manager::NUMBER,
1597 + 'default' => 32,
1598 + 'min' => 8,
1599 + 'condition' => [
1600 + 'element_select' => ['author'],
1601 + 'element_show_avatar' => 'yes'
1602 + ],
1603 + 'separator' => 'after'
1604 + ]
1605 + );
1606 +
1607 + $repeater->add_control(
1608 + 'element_tax_sep',
1609 + [
1610 + 'label' => esc_html__('Separator', 'king-addons'),
1611 + 'type' => Controls_Manager::TEXT,
1612 + 'dynamic' => [
1613 + 'active' => true,
1614 + ],
1615 + 'default' => ', ',
1616 + 'condition' => [
1617 + 'element_select!' => [
1618 + 'title',
1619 + 'caption',
1620 + 'date',
1621 + 'time',
1622 + 'author',
1623 + 'likes',
1624 + 'sharing',
1625 + 'lightbox',
1626 + 'separator',
1627 + 'post_format',
1628 + ],
1629 + ],
1630 + 'separator' => 'after'
1631 + ]
1632 + );
1633 +
1634 + $repeater->add_control(
1635 + 'element_tax_style',
1636 + [
1637 + 'label' => esc_html__('Select Styling', 'king-addons'),
1638 + 'type' => Controls_Manager::SELECT,
1639 + 'default' => 'king-addons-grid-tax-style-1',
1640 + 'options' => [
1641 + 'king-addons-grid-tax-style-1' => esc_html__('Taxonomy Style 1', 'king-addons'),
1642 + 'king-addons-grid-tax-style-2' => esc_html__('Taxonomy Style 2', 'king-addons'),
1643 + ],
1644 + 'condition' => [
1645 + 'element_select!' => [
1646 + 'title',
1647 + 'caption',
1648 + 'date',
1649 + 'time',
1650 + 'author',
1651 + 'likes',
1652 + 'sharing',
1653 + 'lightbox',
1654 + 'separator',
1655 + ],
1656 + ],
1657 + 'separator' => 'after'
1658 + ]
1659 + );
1660 +
1661 + $repeater->add_control('element_like_icon', $this->add_repeater_args_element_like_icon());
1662 +
1663 + $repeater->add_control('element_like_show_count', $this->add_repeater_args_element_like_show_count());
1664 +
1665 + $repeater->add_control('element_like_text', $this->add_repeater_args_element_like_text());
1666 +
1667 + $repeater->add_control('element_sharing_icon_1', $this->add_repeater_args_element_sharing_icon_1());
1668 +
1669 + $repeater->add_control('element_sharing_icon_2', $this->add_repeater_args_element_sharing_icon_2());
1670 +
1671 + $repeater->add_control('element_sharing_icon_3', $this->add_repeater_args_element_sharing_icon_3());
1672 +
1673 + $repeater->add_control('element_sharing_icon_4', $this->add_repeater_args_element_sharing_icon_4());
1674 +
1675 + $repeater->add_control('element_sharing_icon_5', $this->add_repeater_args_element_sharing_icon_5());
1676 +
1677 + $repeater->add_control('element_sharing_icon_6', $this->add_repeater_args_element_sharing_icon_6());
1678 +
1679 + $repeater->add_control('element_sharing_trigger', $this->add_repeater_args_element_sharing_trigger());
1680 +
1681 + $repeater->add_control('element_sharing_trigger_icon', $this->add_repeater_args_element_sharing_trigger_icon());
1682 +
1683 + $repeater->add_control('element_sharing_trigger_action', $this->add_repeater_args_element_sharing_trigger_action());
1684 +
1685 + $repeater->add_control('element_sharing_trigger_direction', $this->add_repeater_args_element_sharing_trigger_direction());
1686 +
1687 + $repeater->add_control('element_sharing_tooltip', $this->add_repeater_args_element_sharing_tooltip());
1688 +
1689 + $repeater->add_control(
1690 + 'element_lightbox_overlay',
1691 + [
1692 + 'label' => esc_html__('Media Overlay', 'king-addons'),
1693 + 'type' => Controls_Manager::SWITCHER,
1694 + 'return_value' => 'yes',
1695 + 'separator' => 'after',
1696 + 'condition' => [
1697 + 'element_select' => ['lightbox'],
1698 + ],
1699 + ]
1700 + );
1701 +
1702 + $repeater->add_control(
1703 + 'element_separator_style',
1704 + [
1705 + 'label' => esc_html__('Select Styling', 'king-addons'),
1706 + 'type' => Controls_Manager::SELECT,
1707 + 'default' => 'king-addons-grid-sep-style-1',
1708 + 'options' => [
1709 + 'king-addons-grid-sep-style-1' => esc_html__('Separator Style 1', 'king-addons'),
1710 + 'king-addons-grid-sep-style-2' => esc_html__('Separator Style 2', 'king-addons'),
1711 + ],
1712 + 'condition' => [
1713 + 'element_select' => 'separator',
1714 + ]
1715 + ]
1716 + );
1717 +
1718 + $repeater->add_control(
1719 + 'element_extra_text_pos',
1720 + [
1721 + 'label' => esc_html__('Extra Text Display', 'king-addons'),
1722 + 'type' => Controls_Manager::SELECT,
1723 + 'options' => [
1724 + 'none' => esc_html__('None', 'king-addons'),
1725 + 'before' => esc_html__('Before Element', 'king-addons'),
1726 + 'after' => esc_html__('After Element', 'king-addons'),
1727 + ],
1728 + 'default' => 'none',
1729 + 'condition' => [
1730 + 'element_select!' => [
1731 + 'title',
1732 + 'caption',
1733 + 'separator',
1734 + ],
1735 + ]
1736 + ]
1737 + );
1738 +
1739 + $repeater->add_control(
1740 + 'element_extra_text',
1741 + [
1742 + 'label' => esc_html__('Extra Text', 'king-addons'),
1743 + 'type' => Controls_Manager::TEXT,
1744 + 'dynamic' => [
1745 + 'active' => true,
1746 + ],
1747 + 'default' => '',
1748 + 'condition' => [
1749 + 'element_select!' => [
1750 + 'title',
1751 + 'caption',
1752 + 'separator',
1753 + ],
1754 + 'element_extra_text_pos!' => 'none'
1755 + ]
1756 + ]
1757 + );
1758 +
1759 + $repeater->add_control(
1760 + 'element_extra_icon_pos',
1761 + [
1762 + 'label' => esc_html__('Extra Icon Position', 'king-addons'),
1763 + 'type' => Controls_Manager::SELECT,
1764 + 'options' => [
1765 + 'none' => esc_html__('None', 'king-addons'),
1766 + 'before' => esc_html__('Before Element', 'king-addons'),
1767 + 'after' => esc_html__('After Element', 'king-addons'),
1768 + ],
1769 + 'default' => 'none',
1770 + 'condition' => [
1771 + 'element_select!' => [
1772 + 'title',
1773 + 'caption',
1774 + 'separator',
1775 + 'likes',
1776 + 'sharing',
1777 + ],
1778 + ]
1779 + ]
1780 + );
1781 +
1782 + $repeater->add_control(
1783 + 'element_extra_icon',
1784 + [
1785 + 'label' => esc_html__('Select Icon', 'king-addons'),
1786 + 'type' => Controls_Manager::ICONS,
1787 + 'skin' => 'inline',
1788 + 'label_block' => false,
1789 + 'default' => [
1790 + 'value' => 'fas fa-search',
1791 + 'library' => 'fa-solid',
1792 + ],
1793 + 'condition' => [
1794 + 'element_select!' => [
1795 + 'title',
1796 + 'caption',
1797 + 'separator',
1798 + 'likes',
1799 + 'sharing',
1800 + ],
1801 + 'element_extra_icon_pos!' => 'none'
1802 + ]
1803 + ]
1804 + );
1805 +
1806 + $repeater->add_control(
1807 + 'animation_divider',
1808 + [
1809 + 'type' => Controls_Manager::DIVIDER,
1810 + 'style' => 'thick',
1811 + 'condition' => [
1812 + 'element_location' => 'over'
1813 + ],
1814 + ]
1815 + );
1816 +
1817 + $repeater->add_control(
1818 + 'element_animation',
1819 + [
1820 + 'label' => esc_html__('Select Animation', 'king-addons'),
1821 + 'type' => 'king-addons-animations',
1822 + 'default' => 'none',
1823 + 'condition' => [
1824 + 'element_location' => 'over'
1825 + ],
1826 + ]
1827 + );
1828 +
1829 +
1830 + Core::renderUpgradeProNotice($repeater, Controls_Manager::RAW_HTML, 'media-grid', 'element_animation', ['pro-slrt', 'pro-slxrt', 'pro-slbt', 'pro-sllt', 'pro-sltp', 'pro-slxlt', 'pro-sktp', 'pro-skrt', 'pro-skbt', 'pro-sklt', 'pro-scup', 'pro-scdn', 'pro-rllt', 'pro-rlrt']);
1831 +
1832 + $repeater->add_control(
1833 + 'element_animation_duration',
1834 + [
1835 + 'label' => esc_html__('Animation Duration', 'king-addons'),
1836 + 'type' => Controls_Manager::NUMBER,
1837 + 'default' => 0.3,
1838 + 'min' => 0,
1839 + 'max' => 5,
1840 + 'step' => 0.1,
1841 + 'selectors' => [
1842 + '{{WRAPPER}} {{CURRENT_ITEM}}' => 'transition-duration: {{VALUE}}s;'
1843 + ],
1844 + 'condition' => [
1845 + 'element_animation!' => 'none',
1846 + 'element_location' => 'over',
1847 + ],
1848 + ]
1849 + );
1850 +
1851 + $repeater->add_control(
1852 + 'element_animation_delay',
1853 + [
1854 + 'label' => esc_html__('Animation Delay', 'king-addons'),
1855 + 'type' => Controls_Manager::NUMBER,
1856 + 'default' => 0,
1857 + 'min' => 0,
1858 + 'max' => 5,
1859 + 'step' => 0.1,
1860 + 'selectors' => [
1861 + '{{WRAPPER}} .king-addons-animation-wrap:hover {{CURRENT_ITEM}}' => 'transition-delay: {{VALUE}}s;'
1862 + ],
1863 + 'condition' => [
1864 + 'element_animation!' => 'none',
1865 + 'element_location' => 'over'
1866 + ],
1867 + ]
1868 + );
1869 +
1870 + $repeater->add_control(
1871 + 'element_animation_timing',
1872 + [
1873 + 'label' => esc_html__('Animation Timing', 'king-addons'),
1874 + 'type' => Controls_Manager::SELECT,
1875 + 'options' => Core::getAnimationTimings(),
1876 + 'default' => 'ease-default',
1877 + 'condition' => [
1878 + 'element_animation!' => 'none',
1879 + 'element_location' => 'over'
1880 + ],
1881 + ]
1882 + );
1883 +
1884 +
1885 + Core::renderUpgradeProNotice($repeater, Controls_Manager::RAW_HTML, 'media-grid', 'element_animation_timing', Core::getAnimationTimingsConditionsPro());
1886 +
1887 + $repeater->add_control(
1888 + 'element_animation_size',
1889 + [
1890 + 'label' => esc_html__('Animation Size', 'king-addons'),
1891 + 'type' => Controls_Manager::SELECT,
1892 + 'options' => [
1893 + 'small' => esc_html__('Small', 'king-addons'),
1894 + 'medium' => esc_html__('Medium', 'king-addons'),
1895 + 'large' => esc_html__('Large', 'king-addons'),
1896 + ],
1897 + 'default' => 'large',
1898 + 'condition' => [
1899 + 'element_animation!' => 'none',
1900 + 'element_location' => 'over'
1901 + ],
1902 + ]
1903 + );
1904 +
1905 + $repeater->add_control(
1906 + 'element_animation_tr',
1907 + [
1908 + 'label' => esc_html__('Animation Transparency', 'king-addons'),
1909 + 'type' => Controls_Manager::SWITCHER,
1910 + 'default' => 'yes',
1911 + 'return_value' => 'yes',
1912 + 'condition' => [
1913 + 'element_animation!' => 'none',
1914 + 'element_location' => 'over'
1915 + ],
1916 + ]
1917 + );
1918 +
1919 + $repeater->add_control(
1920 + 'element_disable_link',
1921 + [
1922 + 'label' => esc_html__('Disable Link', 'king-addons'),
1923 + 'type' => Controls_Manager::SWITCHER,
1924 + 'condition' => [
1925 + 'element_select' => 'title'
1926 + ],
1927 + ]
1928 + );
1929 +
1930 + $repeater->add_responsive_control(
1931 + 'element_show_on',
1932 + [
1933 + 'label' => esc_html__('Show on this Device', 'king-addons'),
1934 + 'type' => Controls_Manager::SWITCHER,
1935 + 'default' => 'yes',
1936 + 'widescreen_default' => 'yes',
1937 + 'laptop_default' => 'yes',
1938 + 'tablet_extra_default' => 'yes',
1939 + 'tablet_default' => 'yes',
1940 + 'mobile_extra_default' => 'yes',
1941 + 'mobile_default' => 'yes',
1942 + 'selectors_dictionary' => [
1943 + '' => 'position: absolute; left: -99999999px;',
1944 + 'yes' => 'position: static; left: auto;'
1945 + ],
1946 + 'selectors' => [
1947 + '{{WRAPPER}} {{CURRENT_ITEM}}' => '{{VALUE}}',
1948 + ],
1949 + 'render_type' => 'template',
1950 + ]
1951 + );
1952 +
1953 + $this->add_control(
1954 + 'grid_elements',
1955 + [
1956 + 'label' => esc_html__('Grid Elements', 'king-addons'),
1957 + 'type' => Controls_Manager::REPEATER,
1958 + 'fields' => $repeater->get_controls(),
1959 + 'default' => [
1960 + [
1961 + 'element_select' => 'lightbox',
1962 + 'element_location' => 'over',
1963 + 'element_extra_icon_pos' => 'before',
1964 + 'element_animation' => 'fade-in',
1965 + 'element_animation_size' => 'large',
1966 + 'element_lightbox_overlay' => 'yes',
1967 + 'element_sharing_trigger_icon' => 'fas fa-share',
1968 + ],
1969 + [
1970 + 'element_select' => 'title',
1971 + 'element_location' => 'over',
1972 + 'element_extra_icon_pos' => 'before',
1973 + 'element_animation' => 'fade-in',
1974 + 'element_animation_size' => 'large',
1975 + 'element_sharing_trigger_icon' => 'fas fa-share',
1976 + ],
1977 + ],
1978 + 'title_field' => '{{ element_select.charAt(0).toUpperCase() + element_select.slice(1) }}',
1979 + ]
1980 + );
1981 +
1982 + $this->end_controls_section();
1983 +
1984 +
1985 + $this->start_controls_section(
1986 + 'section_image_overlay',
1987 + [
1988 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Media Overlay', 'king-addons'),
1989 + 'tab' => Controls_Manager::TAB_CONTENT,
1990 + ]
1991 + );
1992 +
1993 + $this->add_responsive_control(
1994 + 'overlay_width',
1995 + [
1996 + 'label' => esc_html__('Overlay Width', 'king-addons'),
1997 + 'type' => Controls_Manager::SLIDER,
1998 + 'size_units' => ['%', 'px'],
1999 + 'default' => [
2000 + 'unit' => '%',
2001 + 'size' => 100,
2002 + ],
2003 + 'range' => [
2004 + '%' => [
2005 + 'min' => 0,
2006 + 'max' => 100,
2007 + ],
2008 + 'px' => [
2009 + 'min' => 0,
2010 + 'max' => 500,
2011 + ],
2012 + ],
2013 + 'selectors' => [
2014 + '{{WRAPPER}} .king-addons-grid-media-hover-bg' => 'width: {{SIZE}}{{UNIT}};top:calc((100% - {{overlay_height.SIZE}}{{overlay_height.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);',
2015 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-top"]' => 'top:calc((100% - {{overlay_height.SIZE}}{{overlay_height.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);',
2016 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-bottom"]' => 'bottom:calc((100% - {{overlay_height.SIZE}}{{overlay_height.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);',
2017 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-right"]' => 'top:calc((100% - {{overlay_height.SIZE}}{{overlay_height.UNIT}})/2);right:calc((100% - {{SIZE}}{{UNIT}})/2);',
2018 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-left"]' => 'top:calc((100% - {{overlay_height.SIZE}}{{overlay_height.UNIT}})/2);left:calc((100% - {{SIZE}}{{UNIT}})/2);',
2019 + ],
2020 + ]
2021 + );
2022 +
2023 + $this->add_responsive_control(
2024 + 'overlay_height',
2025 + [
2026 + 'label' => esc_html__('Overlay Height', 'king-addons'),
2027 + 'type' => Controls_Manager::SLIDER,
2028 + 'size_units' => ['%', 'px'],
2029 + 'default' => [
2030 + 'unit' => '%',
2031 + 'size' => 100,
2032 + ],
2033 + 'range' => [
2034 + '%' => [
2035 + 'min' => 0,
2036 + 'max' => 100,
2037 + ],
2038 + 'px' => [
2039 + 'min' => 0,
2040 + 'max' => 500,
2041 + ],
2042 + ],
2043 + 'selectors' => [
2044 + '{{WRAPPER}} .king-addons-grid-media-hover-bg' => 'height: {{SIZE}}{{UNIT}};top:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);',
2045 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-top"]' => 'top:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);',
2046 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-bottom"]' => 'bottom:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);',
2047 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-right"]' => 'top:calc((100% - {{SIZE}}{{UNIT}})/2);right:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);',
2048 + '{{WRAPPER}} .king-addons-grid-media-hover-bg[class*="-left"]' => 'top:calc((100% - {{SIZE}}{{UNIT}})/2);left:calc((100% - {{overlay_width.SIZE}}{{overlay_width.UNIT}})/2);',
2049 + ],
2050 + 'separator' => 'after',
2051 + ]
2052 + );
2053 +
2054 + $this->add_control(
2055 + 'overlay_animation',
2056 + [
2057 + 'label' => esc_html__('Select Animation', 'king-addons'),
2058 + 'type' => 'king-addons-animations-alt',
2059 + 'default' => 'fade-in',
2060 + ]
2061 + );
2062 +
2063 +
2064 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'overlay_animation', ['pro-slrt', 'pro-slxrt', 'pro-slbt', 'pro-sllt', 'pro-sltp', 'pro-slxlt', 'pro-sktp', 'pro-skrt', 'pro-skbt', 'pro-sklt', 'pro-scup', 'pro-scdn', 'pro-rllt', 'pro-rlrt',]);
2065 +
2066 + $this->add_control(
2067 + 'overlay_animation_duration',
2068 + [
2069 + 'label' => esc_html__('Animation Duration', 'king-addons'),
2070 + 'type' => Controls_Manager::NUMBER,
2071 + 'default' => 0.3,
2072 + 'min' => 0,
2073 + 'max' => 5,
2074 + 'step' => 0.1,
2075 + 'selectors' => [
2076 + '{{WRAPPER}} .king-addons-grid-media-hover-bg' => 'transition-duration: {{VALUE}}s;'
2077 + ],
2078 + 'condition' => [
2079 + 'overlay_animation!' => 'none',
2080 + ],
2081 + ]
2082 + );
2083 +
2084 + $this->add_control(
2085 + 'overlay_animation_delay',
2086 + [
2087 + 'label' => esc_html__('Animation Delay', 'king-addons'),
2088 + 'type' => Controls_Manager::NUMBER,
2089 + 'default' => 0,
2090 + 'min' => 0,
2091 + 'max' => 5,
2092 + 'step' => 0.1,
2093 + 'selectors' => [
2094 + '{{WRAPPER}} .king-addons-animation-wrap:hover .king-addons-grid-media-hover-bg' => 'transition-delay: {{VALUE}}s;'
2095 + ],
2096 + 'condition' => [
2097 + 'overlay_animation!' => 'none',
2098 + ],
2099 + ]
2100 + );
2101 +
2102 + $this->add_control(
2103 + 'overlay_animation_timing',
2104 + [
2105 + 'label' => esc_html__('Animation Timing', 'king-addons'),
2106 + 'type' => Controls_Manager::SELECT,
2107 + 'options' => Core::getAnimationTimings(),
2108 + 'default' => 'ease-default',
2109 + 'condition' => [
2110 + 'overlay_animation!' => 'none',
2111 + ],
2112 + ]
2113 + );
2114 +
2115 +
2116 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'overlay_animation_timing', Core::getAnimationTimingsConditionsPro());
2117 +
2118 + $this->add_control(
2119 + 'overlay_animation_size',
2120 + [
2121 + 'label' => esc_html__('Animation Size', 'king-addons'),
2122 + 'type' => Controls_Manager::SELECT,
2123 + 'options' => [
2124 + 'small' => esc_html__('Small', 'king-addons'),
2125 + 'medium' => esc_html__('Medium', 'king-addons'),
2126 + 'large' => esc_html__('Large', 'king-addons'),
2127 + ],
2128 + 'default' => 'large',
2129 + 'condition' => [
2130 + 'overlay_animation!' => 'none',
2131 + ],
2132 + ]
2133 + );
2134 +
2135 + $this->add_control(
2136 + 'overlay_animation_tr',
2137 + [
2138 + 'label' => esc_html__('Animation Transparency', 'king-addons'),
2139 + 'type' => Controls_Manager::SWITCHER,
2140 + 'default' => 'yes',
2141 + 'return_value' => 'yes',
2142 + 'condition' => [
2143 + 'overlay_animation!' => 'none',
2144 + ],
2145 + ]
2146 + );
2147 +
2148 + $this->add_control_overlay_animation_divider();
2149 +
2150 + $this->add_control_overlay_image();
2151 +
2152 + $this->add_control_overlay_image_width();
2153 +
2154 + $this->end_controls_section();
2155 +
2156 +
2157 + $this->start_controls_section(
2158 + 'section_image_effects',
2159 + [
2160 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Image Effects', 'king-addons'),
2161 + 'tab' => Controls_Manager::TAB_CONTENT,
2162 + ]
2163 + );
2164 +
2165 + $this->add_control_image_effects();
2166 +
2167 +
2168 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'image_effects', ['pro-zi', 'pro-zo', 'pro-go', 'pro-bo']);
2169 +
2170 + $this->add_control(
2171 + 'image_effects_duration',
2172 + [
2173 + 'label' => esc_html__('Animation Duration', 'king-addons'),
2174 + 'type' => Controls_Manager::NUMBER,
2175 + 'default' => 0.3,
2176 + 'min' => 0,
2177 + 'max' => 5,
2178 + 'step' => 0.1,
2179 + 'selectors' => [
2180 + '{{WRAPPER}} .king-addons-grid-media-wrap img' => 'transition-duration: {{VALUE}}s;'
2181 + ],
2182 + 'condition' => [
2183 + 'image_effects!' => 'none',
2184 + ],
2185 + ]
2186 + );
2187 +
2188 + $this->add_control(
2189 + 'image_effects_delay',
2190 + [
2191 + 'label' => esc_html__('Animation Delay', 'king-addons'),
2192 + 'type' => Controls_Manager::NUMBER,
2193 + 'default' => 0,
2194 + 'min' => 0,
2195 + 'max' => 5,
2196 + 'step' => 0.1,
2197 + 'selectors' => [
2198 + '{{WRAPPER}} .king-addons-grid-media-wrap:hover img' => 'transition-delay: {{VALUE}}s;'
2199 + ],
2200 + 'condition' => [
2201 + 'image_effects!' => 'none',
2202 + ],
2203 + ]
2204 + );
2205 +
2206 + $this->add_control(
2207 + 'image_effects_animation_timing',
2208 + [
2209 + 'label' => esc_html__('Animation Timing', 'king-addons'),
2210 + 'type' => Controls_Manager::SELECT,
2211 + 'options' => Core::getAnimationTimings(),
2212 + 'default' => 'ease-default',
2213 + 'condition' => [
2214 + 'image_effects!' => 'none',
2215 + ],
2216 + ]
2217 + );
2218 +
2219 +
2220 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'image_effects_animation_timing', Core::getAnimationTimingsConditionsPro());
2221 +
2222 + $this->add_control(
2223 + 'image_effects_size',
2224 + [
2225 + 'label' => esc_html__('Animation Size', 'king-addons'),
2226 + 'type' => Controls_Manager::SELECT,
2227 + 'options' => [
2228 + 'small' => esc_html__('Small', 'king-addons'),
2229 + 'medium' => esc_html__('Medium', 'king-addons'),
2230 + 'large' => esc_html__('Large', 'king-addons'),
2231 + ],
2232 + 'default' => 'small',
2233 + 'condition' => [
2234 + 'image_effects!' => ['none', 'slide'],
2235 + ]
2236 + ]
2237 + );
2238 +
2239 + $this->add_control(
2240 + 'image_effects_direction',
2241 + [
2242 + 'label' => esc_html__('Animation Direction', 'king-addons'),
2243 + 'type' => Controls_Manager::SELECT,
2244 + 'options' => [
2245 + 'top' => esc_html__('Top', 'king-addons'),
2246 + 'right' => esc_html__('Right', 'king-addons'),
2247 + 'bottom' => esc_html__('Bottom', 'king-addons'),
2248 + 'left' => esc_html__('Left', 'king-addons'),
2249 + ],
2250 + 'default' => 'bottom',
2251 + 'condition' => [
2252 + 'image_effects!' => 'none',
2253 + 'image_effects' => 'slide'
2254 + ]
2255 + ]
2256 + );
2257 +
2258 + $this->end_controls_section();
2259 +
2260 +
2261 + $this->start_controls_section(
2262 + 'section_lightbox_popup',
2263 + [
2264 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Lightbox Popup', 'king-addons'),
2265 + 'tab' => Controls_Manager::TAB_CONTENT,
2266 + ]
2267 + );
2268 +
2269 + $this->add_control(
2270 + 'lightbox_popup_autoplay',
2271 + [
2272 + 'label' => esc_html__('Autoplay Slides', 'king-addons'),
2273 + 'type' => Controls_Manager::SWITCHER,
2274 + 'default' => 'true',
2275 + 'return_value' => 'true',
2276 + ]
2277 + );
2278 +
2279 + $this->add_control(
2280 + 'lightbox_popup_progressbar',
2281 + [
2282 + 'label' => esc_html__('Show Progress Bar', 'king-addons'),
2283 + 'type' => Controls_Manager::SWITCHER,
2284 + 'default' => 'true',
2285 + 'return_value' => 'true',
2286 + 'condition' => [
2287 + 'lightbox_popup_autoplay' => 'true'
2288 + ]
2289 + ]
2290 + );
2291 +
2292 + $this->add_control(
2293 + 'lightbox_popup_pause',
2294 + [
2295 + 'label' => esc_html__('Autoplay Speed', 'king-addons'),
2296 + 'type' => Controls_Manager::NUMBER,
2297 + 'default' => 5,
2298 + 'min' => 1,
2299 + 'max' => 10,
2300 + 'step' => 1,
2301 + 'condition' => [
2302 + 'lightbox_popup_autoplay' => 'true',
2303 + ],
2304 + ]
2305 + );
2306 +
2307 + $this->add_control(
2308 + 'lightbox_popup_counter',
2309 + [
2310 + 'label' => esc_html__('Show Counter', 'king-addons'),
2311 + 'type' => Controls_Manager::SWITCHER,
2312 + 'default' => 'true',
2313 + 'return_value' => 'true',
2314 + ]
2315 + );
2316 +
2317 + $this->add_control(
2318 + 'lightbox_popup_arrows',
2319 + [
2320 + 'label' => esc_html__('Show Arrows', 'king-addons'),
2321 + 'type' => Controls_Manager::SWITCHER,
2322 + 'default' => 'true',
2323 + 'return_value' => 'true',
2324 + ]
2325 + );
2326 +
2327 + $this->add_control(
2328 + 'lightbox_popup_captions',
2329 + [
2330 + 'label' => esc_html__('Show Captions', 'king-addons'),
2331 + 'type' => Controls_Manager::SWITCHER,
2332 + 'default' => 'true',
2333 + 'return_value' => 'true',
2334 + ]
2335 + );
2336 +
2337 + $this->add_control(
2338 + 'video_play_icon',
2339 + [
2340 + 'label' => esc_html__('Video Play Icon', 'king-addons'),
2341 + 'type' => Controls_Manager::ICONS,
2342 + 'skin' => 'inline',
2343 + 'label_block' => false,
2344 + 'default' => [
2345 + 'value' => 'fas fa-play',
2346 + 'library' => 'fa-solid',
2347 + ],
2348 + 'separator' => 'before',
2349 + ]
2350 + );
2351 +
2352 + $this->add_control_lightbox_popup_thumbnails();
2353 +
2354 + $this->add_control_lightbox_popup_thumbnails_default();
2355 +
2356 + $this->add_control_lightbox_popup_sharing();
2357 +
2358 + $this->add_control(
2359 + 'lightbox_popup_zoom',
2360 + [
2361 + 'label' => esc_html__('Show Zoom Button', 'king-addons'),
2362 + 'type' => Controls_Manager::SWITCHER,
2363 + 'default' => 'true',
2364 + 'return_value' => 'true',
2365 + ]
2366 + );
2367 +
2368 + $this->add_control(
2369 + 'lightbox_popup_fullscreen',
2370 + [
2371 + 'label' => esc_html__('Show Full Screen Button', 'king-addons'),
2372 + 'type' => Controls_Manager::SWITCHER,
2373 + 'default' => 'true',
2374 + 'return_value' => 'true',
2375 + ]
2376 + );
2377 +
2378 + $this->add_control(
2379 + 'lightbox_popup_download',
2380 + [
2381 + 'label' => esc_html__('Show Download Button', 'king-addons'),
2382 + 'type' => Controls_Manager::SWITCHER,
2383 + 'default' => 'true',
2384 + 'return_value' => 'true',
2385 + ]
2386 + );
2387 +
2388 + $this->add_control(
2389 + 'lightbox_popup_description',
2390 + [
2391 + 'raw' => sprintf(__('You can change Lightbox Popup styling options globally. Navigate to <strong>Dashboard > %s > Settings</strong>.', 'king-addons'), Core::getPluginName()),
2392 + 'type' => Controls_Manager::RAW_HTML,
2393 + 'separator' => 'before',
2394 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
2395 + ]
2396 + );
2397 +
2398 + $this->end_controls_section();
2399 +
2400 + $this->start_controls_section(
2401 + 'section_grid_filters',
2402 + [
2403 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Filters', 'king-addons'),
2404 + 'tab' => Controls_Manager::TAB_CONTENT,
2405 + 'condition' => [
2406 + 'layout_select!' => 'slider',
2407 + 'layout_filters' => 'yes',
2408 + ],
2409 + ]
2410 + );
2411 +
2412 + $this->add_control(
2413 + 'filters_select',
2414 + [
2415 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Select Taxonomy', 'king-addons'),
2416 + 'type' => Controls_Manager::SELECT,
2417 + 'options' => $post_taxonomy_names,
2418 + 'default' => 'media_category',
2419 + 'description' => 'If it is empty, add a taxonomy for media in the WordPress dashboard using Media Library Assistant or any CPT manager plugin. ',
2420 + 'separator' => 'after',
2421 + ]
2422 + );
2423 +
2424 + $this->add_control(
2425 + 'filters_linkable',
2426 + [
2427 + 'label' => esc_html__('Set Linkable Filters', 'king-addons'),
2428 + 'type' => Controls_Manager::SWITCHER,
2429 + 'default' => 'no',
2430 + 'return_value' => 'yes',
2431 + ]
2432 + );
2433 +
2434 + $this->add_control(
2435 + 'filters_hide_empty',
2436 + [
2437 + 'label' => esc_html__('Hide Empty Filters', 'king-addons'),
2438 + 'type' => Controls_Manager::SWITCHER,
2439 + 'default' => 'no',
2440 + 'return_value' => 'yes',
2441 + 'condition' => [
2442 + 'filters_linkable!' => 'yes',
2443 + ],
2444 + ]
2445 + );
2446 +
2447 + $this->add_control_filters_deeplinking();
2448 +
2449 + $this->add_control(
2450 + 'filters_all',
2451 + [
2452 + 'label' => esc_html__('Show "All" Filter', 'king-addons'),
2453 + 'type' => Controls_Manager::SWITCHER,
2454 + 'default' => 'yes',
2455 + 'return_value' => 'yes',
2456 + 'condition' => [
2457 + 'filters_linkable!' => 'yes',
2458 + ],
2459 + ]
2460 + );
2461 +
2462 + $this->add_control(
2463 + 'filters_all_text',
2464 + [
2465 + 'label' => esc_html__('"All" Filter Text', 'king-addons'),
2466 + 'type' => Controls_Manager::TEXT,
2467 + 'dynamic' => [
2468 + 'active' => true,
2469 + ],
2470 + 'default' => 'All Photos',
2471 + 'condition' => [
2472 + 'filters_all' => 'yes',
2473 + 'filters_linkable!' => 'yes',
2474 + ],
2475 + ]
2476 + );
2477 +
2478 + $this->add_control_filters_count();
2479 +
2480 + $this->add_control_filters_count_superscript();
2481 +
2482 + $this->add_control_filters_count_brackets();
2483 +
2484 + $this->add_control_filters_default_filter();
2485 +
2486 + $this->add_control_filters_icon();
2487 +
2488 + $this->add_control_filters_icon_align();
2489 +
2490 + $this->add_control(
2491 + 'filters_separator',
2492 + [
2493 + 'label' => esc_html__('Separator', 'king-addons'),
2494 + 'type' => Controls_Manager::TEXT,
2495 + 'dynamic' => [
2496 + 'active' => true,
2497 + ],
2498 + 'default' => '',
2499 + 'separator' => 'before',
2500 + ]
2501 + );
2502 +
2503 + $this->add_control(
2504 + 'filters_separator_align',
2505 + [
2506 + 'label' => esc_html__('Separator Position', 'king-addons'),
2507 + 'type' => Controls_Manager::CHOOSE,
2508 + 'label_block' => false,
2509 + 'default' => 'left',
2510 + 'options' => [
2511 + 'left' => [
2512 + 'title' => esc_html__('Left', 'king-addons'),
2513 + 'icon' => 'eicon-h-align-left',
2514 + ],
2515 + 'right' => [
2516 + 'title' => esc_html__('Right', 'king-addons'),
2517 + 'icon' => 'eicon-h-align-right',
2518 + ]
2519 + ],
2520 + 'condition' => [
2521 + 'filters_separator!' => '',
2522 + ],
2523 + ]
2524 + );
2525 +
2526 + $this->add_responsive_control(
2527 + 'filters_align',
2528 + [
2529 + 'label' => esc_html__('Align', 'king-addons'),
2530 + 'type' => Controls_Manager::CHOOSE,
2531 + 'label_block' => false,
2532 + 'default' => 'center',
2533 + 'options' => [
2534 + 'left' => [
2535 + 'title' => esc_html__('Left', 'king-addons'),
2536 + 'icon' => 'eicon-h-align-left',
2537 + ],
2538 + 'center' => [
2539 + 'title' => esc_html__('Center', 'king-addons'),
2540 + 'icon' => 'eicon-h-align-center',
2541 + ],
2542 + 'right' => [
2543 + 'title' => esc_html__('Right', 'king-addons'),
2544 + 'icon' => 'eicon-h-align-right',
2545 + ]
2546 + ],
2547 + 'selectors' => [
2548 + '{{WRAPPER}} .king-addons-grid-filters' => 'text-align: {{VALUE}}',
2549 + ],
2550 + 'separator' => 'before',
2551 + ]
2552 + );
2553 +
2554 + $this->add_control_filters_animation();
2555 +
2556 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'filters_animation', ['pro-fd', 'pro-fs']);
2557 +
2558 + $this->add_control(
2559 + 'filters_animation_duration',
2560 + [
2561 + 'label' => esc_html__('Animation Duration', 'king-addons'),
2562 + 'type' => Controls_Manager::NUMBER,
2563 + 'default' => 0.3,
2564 + 'min' => 0,
2565 + 'max' => 5,
2566 + 'step' => 0.1,
2567 + 'condition' => [
2568 + 'filters_animation!' => 'default',
2569 + ],
2570 + ]
2571 + );
2572 +
2573 + $this->add_control(
2574 + 'filters_animation_delay',
2575 + [
2576 + 'label' => esc_html__('Animation Delay', 'king-addons'),
2577 + 'type' => Controls_Manager::NUMBER,
2578 + 'default' => 0.1,
2579 + 'min' => 0,
2580 + 'max' => 5,
2581 + 'step' => 0.05,
2582 + 'condition' => [
2583 + 'filters_animation!' => 'default'
2584 + ],
2585 + ]
2586 + );
2587 +
2588 + $this->end_controls_section();
2589 +
2590 +
2591 + $this->start_controls_section(
2592 + 'section_grid_pagination',
2593 + [
2594 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Pagination', 'king-addons'),
2595 + 'tab' => Controls_Manager::TAB_CONTENT,
2596 + 'condition' => [
2597 + 'layout_select!' => 'slider',
2598 + 'layout_pagination' => 'yes',
2599 + ],
2600 + ]
2601 + );
2602 +
2603 + $this->add_control_pagination_type();
2604 +
2605 +
2606 + Core::renderUpgradeProNotice($this, Controls_Manager::RAW_HTML, 'media-grid', 'pagination_type', ['pro-is']);
2607 +
2608 + $this->add_control(
2609 + 'pagination_older_text',
2610 + [
2611 + 'label' => esc_html__('Older Posts Text', 'king-addons'),
2612 + 'type' => Controls_Manager::TEXT,
2613 + 'dynamic' => [
2614 + 'active' => true,
2615 + ],
2616 + 'default' => 'Older Posts',
2617 + 'condition' => [
2618 + 'pagination_type' => 'default',
2619 + ],
2620 + ]
2621 + );
2622 +
2623 + $this->add_control(
2624 + 'pagination_newer_text',
2625 + [
2626 + 'label' => esc_html__('Newer Posts Text', 'king-addons'),
2627 + 'type' => Controls_Manager::TEXT,
2628 + 'dynamic' => [
2629 + 'active' => true,
2630 + ],
2631 + 'default' => 'Newer Posts',
2632 + 'condition' => [
2633 + 'pagination_type' => 'default',
2634 + ]
2635 + ]
2636 + );
2637 +
2638 + $this->add_control(
2639 + 'pagination_on_icon',
2640 + [
2641 + 'label' => esc_html__('Select Icon', 'king-addons'),
2642 + 'type' => Controls_Manager::SELECT,
2643 + 'default' => 'fas fa-angle',
2644 + 'options' => [
2645 + 'fas fa-angle' => esc_html__('Angle', 'king-addons'),
2646 + 'fas fa-angle-double' => esc_html__('Angle Double', 'king-addons'),
2647 + 'fas fa-arrow' => esc_html__('Arrow', 'king-addons'),
2648 + 'fas fa-arrow-alt-circle' => esc_html__('Arrow Circle', 'king-addons'),
2649 + 'far fa-arrow-alt-circle' => esc_html__('Arrow Circle Alt', 'king-addons'),
2650 + 'fas fa-long-arrow-alt' => esc_html__('Long Arrow', 'king-addons'),
2651 + 'fas fa-chevron' => esc_html__('Chevron', 'king-addons'),
2652 + ],
2653 + 'condition' => [
2654 + 'pagination_type' => 'default'
2655 + ],
2656 + ]
2657 + );
2658 +
2659 + $this->add_control(
2660 + 'pagination_prev_next',
2661 + [
2662 + 'label' => esc_html__('Previous & Next Buttons', 'king-addons'),
2663 + 'type' => Controls_Manager::SWITCHER,
2664 + 'default' => 'yes',
2665 + 'return_value' => 'yes',
2666 + 'condition' => [
2667 + 'pagination_type' => 'numbered',
2668 + ],
2669 + ]
2670 + );
2671 +
2672 + $this->add_control(
2673 + 'pagination_prev_text',
2674 + [
2675 + 'label' => esc_html__('Prev Page Text', 'king-addons'),
2676 + 'type' => Controls_Manager::TEXT,
2677 + 'dynamic' => [
2678 + 'active' => true,
2679 + ],
2680 + 'default' => 'Previous Page',
2681 + 'condition' => [
2682 + 'pagination_type' => 'numbered',
2683 + 'pagination_prev_next' => 'yes',
2684 + ],
2685 + ]
2686 + );
2687 +
2688 + $this->add_control(
2689 + 'pagination_next_text',
2690 + [
2691 + 'label' => esc_html__('Next Page Text', 'king-addons'),
2692 + 'type' => Controls_Manager::TEXT,
2693 + 'dynamic' => [
2694 + 'active' => true,
2695 + ],
2696 + 'default' => 'Next Page',
2697 + 'condition' => [
2698 + 'pagination_type' => 'numbered',
2699 + 'pagination_prev_next' => 'yes',
2700 + ]
2701 + ]
2702 + );
2703 +
2704 + $this->add_control(
2705 + 'pagination_pn_icon',
2706 + [
2707 + 'label' => esc_html__('Select Icon', 'king-addons'),
2708 + 'type' => Controls_Manager::SELECT,
2709 + 'default' => 'fas fa-angle',
2710 + 'options' => [
2711 + 'fas fa-angle' => esc_html__('Angle', 'king-addons'),
2712 + 'fas fa-angle-double' => esc_html__('Angle Double', 'king-addons'),
2713 + 'fas fa-arrow' => esc_html__('Arrow', 'king-addons'),
2714 + 'fas fa-arrow-alt-circle' => esc_html__('Arrow Circle', 'king-addons'),
2715 + 'far fa-arrow-alt-circle' => esc_html__('Arrow Circle Alt', 'king-addons'),
2716 + 'fas fa-long-arrow-alt' => esc_html__('Long Arrow', 'king-addons'),
2717 + 'fas fa-chevron' => esc_html__('Chevron', 'king-addons'),
2718 + ],
2719 + 'condition' => [
2720 + 'pagination_type' => 'numbered',
2721 + 'pagination_prev_next' => 'yes'
2722 + ],
2723 + ]
2724 + );
2725 +
2726 + $this->add_control(
2727 + 'pagination_first_last',
2728 + [
2729 + 'label' => esc_html__('First & Last Buttons', 'king-addons'),
2730 + 'type' => Controls_Manager::SWITCHER,
2731 + 'default' => 'yes',
2732 + 'return_value' => 'yes',
2733 + 'condition' => [
2734 + 'pagination_type' => 'numbered',
2735 + ],
2736 + ]
2737 + );
2738 +
2739 + $this->add_control(
2740 + 'pagination_first_text',
2741 + [
2742 + 'label' => esc_html__('First Page Text', 'king-addons'),
2743 + 'type' => Controls_Manager::TEXT,
2744 + 'dynamic' => [
2745 + 'active' => true,
2746 + ],
2747 + 'default' => 'First Page',
2748 + 'condition' => [
2749 + 'pagination_type' => 'numbered',
2750 + 'pagination_first_last' => 'yes',
2751 + ],
2752 + ]
2753 + );
2754 +
2755 + $this->add_control(
2756 + 'pagination_last_text',
2757 + [
2758 + 'label' => esc_html__('Last Page Text', 'king-addons'),
2759 + 'type' => Controls_Manager::TEXT,
2760 + 'dynamic' => [
2761 + 'active' => true,
2762 + ],
2763 + 'default' => 'Last Page',
2764 + 'condition' => [
2765 + 'pagination_type' => 'numbered',
2766 + 'pagination_first_last' => 'yes',
2767 + ]
2768 + ]
2769 + );
2770 +
2771 + $this->add_control(
2772 + 'pagination_fl_icon',
2773 + [
2774 + 'label' => esc_html__('Select Icon', 'king-addons'),
2775 + 'type' => Controls_Manager::SELECT,
2776 + 'default' => 'fas fa-angle',
2777 + 'options' => [
2778 + 'fas fa-angle' => esc_html__('Angle', 'king-addons'),
2779 + 'fas fa-angle-double' => esc_html__('Angle Double', 'king-addons'),
2780 + 'fas fa-arrow' => esc_html__('Arrow', 'king-addons'),
2781 + 'fas fa-arrow-alt-circle' => esc_html__('Arrow Circle', 'king-addons'),
2782 + 'far fa-arrow-alt-circle' => esc_html__('Arrow Circle Alt', 'king-addons'),
2783 + 'fas fa-long-arrow-alt' => esc_html__('Long Arrow', 'king-addons'),
2784 + 'fas fa-chevron' => esc_html__('Chevron', 'king-addons'),
2785 + ],
2786 + 'condition' => [
2787 + 'pagination_type' => 'numbered',
2788 + 'pagination_first_last' => 'yes'
2789 + ],
2790 + ]
2791 + );
2792 +
2793 + $this->add_control(
2794 + 'pagination_disabled_arrows',
2795 + [
2796 + 'label' => esc_html__('Show Disabled Buttons', 'king-addons'),
2797 + 'type' => Controls_Manager::SWITCHER,
2798 + 'default' => 'yes',
2799 + 'return_value' => 'yes',
2800 + 'condition' => [
2801 + 'pagination_type' => ['default', 'numbered'],
2802 + ],
2803 + ]
2804 + );
2805 +
2806 + $this->add_control(
2807 + 'pagination_range',
2808 + [
2809 + 'label' => esc_html__('Range', 'king-addons'),
2810 + 'type' => Controls_Manager::NUMBER,
2811 + 'default' => 2,
2812 + 'min' => 1,
2813 + 'condition' => [
2814 + 'pagination_type' => 'numbered',
2815 + ]
2816 + ]
2817 + );
2818 +
2819 + $this->add_control(
2820 + 'pagination_load_more_text',
2821 + [
2822 + 'label' => esc_html__('Load More Text', 'king-addons'),
2823 + 'type' => Controls_Manager::TEXT,
2824 + 'dynamic' => [
2825 + 'active' => true,
2826 + ],
2827 + 'default' => 'Load More',
2828 + 'condition' => [
2829 + 'pagination_type' => 'load-more',
2830 + ]
2831 + ]
2832 + );
2833 +
2834 + $this->add_control(
2835 + 'pagination_finish_text',
2836 + [
2837 + 'label' => esc_html__('Finish Text', 'king-addons'),
2838 + 'type' => Controls_Manager::TEXT,
2839 + 'dynamic' => [
2840 + 'active' => true,
2841 + ],
2842 + 'default' => 'End of Content.',
2843 + 'condition' => [
2844 + 'pagination_type' => ['load-more', 'infinite-scroll'],
2845 + ]
2846 + ]
2847 + );
2848 +
2849 + $this->add_control(
2850 + 'pagination_animation',
2851 + [
2852 + 'label' => esc_html__('Select Animation', 'king-addons'),
2853 + 'type' => Controls_Manager::SELECT,
2854 + 'default' => 'loader-1',
2855 + 'options' => [
2856 + 'none' => esc_html__('None', 'king-addons'),
2857 + 'loader-1' => esc_html__('Loader 1', 'king-addons'),
2858 + 'loader-2' => esc_html__('Loader 2', 'king-addons'),
2859 + 'loader-3' => esc_html__('Loader 3', 'king-addons'),
2860 + 'loader-4' => esc_html__('Loader 4', 'king-addons'),
2861 + 'loader-5' => esc_html__('Loader 5', 'king-addons'),
2862 + 'loader-6' => esc_html__('Loader 6', 'king-addons'),
2863 + ],
2864 + 'condition' => [
2865 + 'pagination_type' => ['load-more', 'infinite-scroll'],
2866 + ]
2867 + ]
2868 + );
2869 +
2870 + $this->add_control(
2871 + 'pagination_align',
2872 + [
2873 + 'label' => esc_html__('Alignment', 'king-addons'),
2874 + 'type' => Controls_Manager::CHOOSE,
2875 + 'options' => [
2876 + 'left' => [
2877 + 'title' => esc_html__('Left', 'king-addons'),
2878 + 'icon' => 'eicon-text-align-left',
2879 + ],
2880 + 'center' => [
2881 + 'title' => esc_html__('Center', 'king-addons'),
2882 + 'icon' => 'eicon-text-align-center',
2883 + ],
2884 + 'right' => [
2885 + 'title' => esc_html__('Right', 'king-addons'),
2886 + 'icon' => 'eicon-text-align-right',
2887 + ],
2888 + 'justify' => [
2889 + 'title' => esc_html__('Justified', 'king-addons'),
2890 + 'icon' => 'eicon-text-align-justify',
2891 + ],
2892 + ],
2893 + 'default' => 'center',
2894 + 'prefix_class' => 'king-addons-grid-pagination-',
2895 + 'render_type' => 'template',
2896 + 'separator' => 'before',
2897 + 'condition' => [
2898 + 'pagination_type!' => 'infinite-scroll',
2899 + ]
2900 + ]
2901 + );
2902 +
2903 + $this->add_control(
2904 + 'pagination_notice',
2905 + [
2906 + 'raw' => sprintf(__('<strong>Performance Note:</strong> For grids that include a large number of images (100+), we recommend using the Default and Numbered pagination types because the browser tab can become heavy (especially in Chromium-based browsers).', 'king-addons'), Core::getPluginName()),
2907 + 'type' => Controls_Manager::RAW_HTML,
2908 + 'separator' => 'before',
2909 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
2910 + ]
2911 + );
2912 +
2913 + $this->end_controls_section();
2914 +
2915 + Core::renderProFeaturesSection($this, '', Controls_Manager::RAW_HTML, 'media-grid', [
2916 + 'Grid Columns 1, 2, 3, 4, 5, 6, 7, 8',
2917 + 'Masonry Layout',
2918 + 'Image Slider Columns (Carousel) 1, 2, 3, 4, 5, 6, 7, 8',
2919 + 'Image Slider Autoplay Options',
2920 + 'Infinite Scrolling Pagination',
2921 + 'Random Images Query',
2922 + 'Image Order',
2923 + 'Grid Category Filter Deep Linking',
2924 + 'Grid Category Filter Icons Select',
2925 + 'Grid Category Filter Count',
2926 + 'Image Slider Advanced Navigation Positioning',
2927 + 'Image Slider Advanced Pagination Positioning',
2928 + 'Lightbox Thumbnail Gallery, Lightbox Image Sharing Button',
2929 + 'Advanced Grid Loading Animations (Fade In & Slide Up)',
2930 + 'Advanced Grid Elements Positioning',
2931 + 'Unlimited Image Overlay Animations',
2932 + 'Image Overlay GIF Upload Option',
2933 + 'Image Overlay Blend Mode',
2934 + 'Image Effects: Zoom, Grayscale, Blur',
2935 + 'Advanced Image Likes',
2936 + 'Advanced Image Sharing',
2937 + 'Grid Item Even/Odd Background Color',
2938 + 'Title & Category Advanced Link Hover Animations'
2939 + ]);
2940 +
2941 +
2942 + $this->start_controls_section(
2943 + 'section_style_grid_item',
2944 + [
2945 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Grid Item', 'king-addons'),
2946 + 'tab' => Controls_Manager::TAB_STYLE,
2947 + 'show_label' => false,
2948 + ]
2949 + );
2950 +
2951 + $this->add_control(
2952 + 'grid_item_bg_color',
2953 + [
2954 + 'label' => esc_html__('Background Color', 'king-addons'),
2955 + 'type' => Controls_Manager::COLOR,
2956 + 'default' => '#ffffff',
2957 + 'selectors' => [
2958 + '{{WRAPPER}} .king-addons-grid-item-above-content' => 'background-color: {{VALUE}}',
2959 + '{{WRAPPER}} .king-addons-grid-item-below-content' => 'background-color: {{VALUE}}',
2960 + ],
2961 + ]
2962 + );
2963 +
2964 + $this->add_control_grid_item_even_bg_color();
2965 +
2966 + $this->add_control(
2967 + 'grid_item_border_color',
2968 + [
2969 + 'label' => esc_html__('Border Color', 'king-addons'),
2970 + 'type' => Controls_Manager::COLOR,
2971 + 'default' => '#E8E8E8',
2972 + 'selectors' => [
2973 + '{{WRAPPER}} .king-addons-grid-item-above-content' => 'border-color: {{VALUE}}',
2974 + '{{WRAPPER}} .king-addons-grid-item-below-content' => 'border-color: {{VALUE}}',
2975 + ],
2976 + ]
2977 + );
2978 +
2979 + $this->add_control_grid_item_even_border_color();
2980 +
2981 + $this->add_control(
2982 + 'grid_item_border_type',
2983 + [
2984 + 'label' => esc_html__('Border Type', 'king-addons'),
2985 + 'type' => Controls_Manager::SELECT,
2986 + 'options' => [
2987 + 'none' => esc_html__('None', 'king-addons'),
2988 + 'solid' => esc_html__('Solid', 'king-addons'),
2989 + 'double' => esc_html__('Double', 'king-addons'),
2990 + 'dotted' => esc_html__('Dotted', 'king-addons'),
2991 + 'dashed' => esc_html__('Dashed', 'king-addons'),
2992 + 'groove' => esc_html__('Groove', 'king-addons'),
2993 + ],
2994 + 'default' => 'solid',
2995 + 'selectors' => [
2996 + '{{WRAPPER}} .king-addons-grid-item-above-content' => 'border-style: {{VALUE}};',
2997 + '{{WRAPPER}} .king-addons-grid-item-below-content' => 'border-style: {{VALUE}};',
2998 + ],
2999 + 'separator' => 'before',
3000 + ]
3001 + );
3002 +
3003 + $this->add_control(
3004 + 'grid_item_border_width',
3005 + [
3006 + 'label' => esc_html__('Border Width', 'king-addons'),
3007 + 'type' => Controls_Manager::DIMENSIONS,
3008 + 'size_units' => ['px'],
3009 + 'default' => [
3010 + 'top' => 1,
3011 + 'right' => 1,
3012 + 'bottom' => 1,
3013 + 'left' => 1,
3014 + ],
3015 + 'selectors' => [
3016 + '{{WRAPPER}} .king-addons-grid-item-above-content' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3017 + '{{WRAPPER}} .king-addons-grid-item-below-content' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3018 + ],
3019 + 'condition' => [
3020 + 'grid_item_border_type!' => 'none',
3021 + ],
3022 + 'render_type' => 'template'
3023 + ]
3024 + );
3025 +
3026 + $this->add_responsive_control(
3027 + 'grid_item_padding',
3028 + [
3029 + 'label' => esc_html__('Padding', 'king-addons'),
3030 + 'type' => Controls_Manager::DIMENSIONS,
3031 + 'size_units' => ['px', '%'],
3032 + 'default' => [
3033 + 'top' => 10,
3034 + 'right' => 10,
3035 + 'bottom' => 10,
3036 + 'left' => 10,
3037 + ],
3038 + 'selectors' => [
3039 + '{{WRAPPER}} .king-addons-grid-item-above-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3040 + '{{WRAPPER}} .king-addons-grid-item-below-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3041 + ],
3042 + 'render_type' => 'template'
3043 + ]
3044 + );
3045 +
3046 + $this->add_control(
3047 + 'grid_item_radius',
3048 + [
3049 + 'label' => esc_html__('Border Radius', 'king-addons'),
3050 + 'type' => Controls_Manager::DIMENSIONS,
3051 + 'size_units' => ['px', '%'],
3052 + 'default' => [
3053 + 'top' => 0,
3054 + 'right' => 0,
3055 + 'bottom' => 0,
3056 + 'left' => 0,
3057 + ],
3058 + 'selectors' => [
3059 + '{{WRAPPER}} .king-addons-grid-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3060 + '{{WRAPPER}} .king-addons-grid-item-above-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3061 + '{{WRAPPER}} .king-addons-grid-item-below-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3062 + ],
3063 + 'separator' => 'before',
3064 + ]
3065 + );
3066 +
3067 + $this->add_group_control(
3068 + Group_Control_Box_Shadow::get_type(),
3069 + [
3070 + 'name' => 'grid_item_shadow',
3071 + 'selector' => '{{WRAPPER}} .king-addons-grid-item',
3072 + ]
3073 + );
3074 +
3075 + $this->end_controls_section();
3076 +
3077 +
3078 + $this->start_controls_section(
3079 + 'section_style_grid_media',
3080 + [
3081 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Grid Media', 'king-addons'),
3082 + 'tab' => Controls_Manager::TAB_STYLE,
3083 + 'show_label' => false,
3084 + ]
3085 + );
3086 +
3087 + $this->add_control(
3088 + 'grid_media_border_color',
3089 + [
3090 + 'label' => esc_html__('Border Color', 'king-addons'),
3091 + 'type' => Controls_Manager::COLOR,
3092 + 'default' => '#E8E8E8',
3093 + 'selectors' => [
3094 + '{{WRAPPER}} .king-addons-grid-image-wrap' => 'border-color: {{VALUE}}',
3095 + ],
3096 + ]
3097 + );
3098 +
3099 + $this->add_control(
3100 + 'grid_media_border_type',
3101 + [
3102 + 'label' => esc_html__('Border Type', 'king-addons'),
3103 + 'type' => Controls_Manager::SELECT,
3104 + 'options' => [
3105 + 'none' => esc_html__('None', 'king-addons'),
3106 + 'solid' => esc_html__('Solid', 'king-addons'),
3107 + 'double' => esc_html__('Double', 'king-addons'),
3108 + 'dotted' => esc_html__('Dotted', 'king-addons'),
3109 + 'dashed' => esc_html__('Dashed', 'king-addons'),
3110 + 'groove' => esc_html__('Groove', 'king-addons'),
3111 + ],
3112 + 'default' => 'none',
3113 + 'selectors' => [
3114 + '{{WRAPPER}} .king-addons-grid-image-wrap' => 'border-style: {{VALUE}};',
3115 + ],
3116 + ]
3117 + );
3118 +
3119 + $this->add_control(
3120 + 'grid_media_border_width',
3121 + [
3122 + 'label' => esc_html__('Border Width', 'king-addons'),
3123 + 'type' => Controls_Manager::DIMENSIONS,
3124 + 'size_units' => ['px'],
3125 + 'default' => [
3126 + 'top' => 1,
3127 + 'right' => 1,
3128 + 'bottom' => 1,
3129 + 'left' => 1,
3130 + ],
3131 + 'selectors' => [
3132 + '{{WRAPPER}} .king-addons-grid-image-wrap' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3133 + ],
3134 + 'condition' => [
3135 + 'grid_media_border_type!' => 'none',
3136 + ],
3137 + ]
3138 + );
3139 +
3140 + $this->add_control(
3141 + 'grid_media_radius',
3142 + [
3143 + 'label' => esc_html__('Border Radius', 'king-addons'),
3144 + 'type' => Controls_Manager::DIMENSIONS,
3145 + 'size_units' => ['px', '%'],
3146 + 'default' => [
3147 + 'top' => 0,
3148 + 'right' => 0,
3149 + 'bottom' => 0,
3150 + 'left' => 0,
3151 + ],
3152 + 'selectors' => [
3153 + '{{WRAPPER}} .king-addons-grid-image-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3154 + ],
3155 + 'separator' => 'before',
3156 + ]
3157 + );
3158 +
3159 + $this->end_controls_section();
3160 +
3161 +
3162 + $this->start_controls_section(
3163 + 'section_style_overlay',
3164 + [
3165 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Media Overlay', 'king-addons'),
3166 + 'tab' => Controls_Manager::TAB_STYLE,
3167 + 'show_label' => false,
3168 + ]
3169 + );
3170 +
3171 + $this->add_control_overlay_color();
3172 +
3173 + $this->add_control_overlay_blend_mode();
3174 +
3175 + $this->add_control_overlay_border_color();
3176 +
3177 + $this->add_control_overlay_border_type();
3178 +
3179 + $this->add_control_overlay_border_width();
3180 +
3181 + $this->add_control(
3182 + 'overlay_radius',
3183 + [
3184 + 'label' => esc_html__('Border Radius', 'king-addons'),
3185 + 'type' => Controls_Manager::DIMENSIONS,
3186 + 'size_units' => ['px', '%'],
3187 + 'default' => [
3188 + 'top' => 0,
3189 + 'right' => 0,
3190 + 'bottom' => 0,
3191 + 'left' => 0,
3192 + ],
3193 + 'selectors' => [
3194 + '{{WRAPPER}} .king-addons-grid-media-hover-bg' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3195 + ],
3196 + 'separator' => 'before',
3197 + ]
3198 + );
3199 +
3200 + $this->end_controls_section();
3201 +
3202 +
3203 + $this->start_controls_section(
3204 + 'section_style_title',
3205 + [
3206 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Title', 'king-addons'),
3207 + 'tab' => Controls_Manager::TAB_STYLE,
3208 + 'show_label' => false,
3209 + ]
3210 + );
3211 +
3212 + $this->start_controls_tabs('tabs_grid_title_style');
3213 +
3214 + $this->start_controls_tab(
3215 + 'tab_grid_title_normal',
3216 + [
3217 + 'label' => esc_html__('Normal', 'king-addons'),
3218 + ]
3219 + );
3220 +
3221 + $this->add_control(
3222 + 'title_color',
3223 + [
3224 + 'label' => esc_html__('Color', 'king-addons'),
3225 + 'type' => Controls_Manager::COLOR,
3226 + 'default' => '#ffffff',
3227 + 'selectors' => [
3228 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'color: {{VALUE}}',
3229 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'color: {{VALUE}}'
3230 + ],
3231 + ]
3232 + );
3233 +
3234 + $this->add_control(
3235 + 'title_bg_color',
3236 + [
3237 + 'label' => esc_html__('Background Color', 'king-addons'),
3238 + 'type' => Controls_Manager::COLOR,
3239 + 'selectors' => [
3240 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'background-color: {{VALUE}}',
3241 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'background-color: {{VALUE}}'
3242 + ]
3243 + ]
3244 + );
3245 +
3246 + $this->add_control(
3247 + 'title_border_color',
3248 + [
3249 + 'label' => esc_html__('Border Color', 'king-addons'),
3250 + 'type' => Controls_Manager::COLOR,
3251 + 'default' => '#E8E8E8',
3252 + 'selectors' => [
3253 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'border-color: {{VALUE}}',
3254 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'border-color: {{VALUE}}',
3255 + ],
3256 + 'separator' => 'after',
3257 + ]
3258 + );
3259 +
3260 + $this->end_controls_tab();
3261 +
3262 + $this->start_controls_tab(
3263 + 'tab_grid_title_hover',
3264 + [
3265 + 'label' => esc_html__('Hover', 'king-addons'),
3266 + ]
3267 + );
3268 +
3269 + $this->add_control(
3270 + 'title_color_hr',
3271 + [
3272 + 'label' => esc_html__('Color', 'king-addons'),
3273 + 'type' => Controls_Manager::COLOR,
3274 + 'default' => '#ffffff',
3275 + 'selectors' => [
3276 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a:hover' => 'color: {{VALUE}}',
3277 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span:hover' => 'color: {{VALUE}}'
3278 + ],
3279 + ]
3280 + );
3281 +
3282 + $this->add_control(
3283 + 'title_bg_color_hr',
3284 + [
3285 + 'label' => esc_html__('Background Color', 'king-addons'),
3286 + 'type' => Controls_Manager::COLOR,
3287 + 'selectors' => [
3288 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a:hover' => 'background-color: {{VALUE}}',
3289 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span:hover' => 'background-color: {{VALUE}}'
3290 + ]
3291 + ]
3292 + );
3293 +
3294 + $this->add_control(
3295 + 'title_border_color_hr',
3296 + [
3297 + 'label' => esc_html__('Border Color', 'king-addons'),
3298 + 'type' => Controls_Manager::COLOR,
3299 + 'default' => '#E8E8E8',
3300 + 'selectors' => [
3301 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a:hover' => 'border-color: {{VALUE}}',
3302 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span:hover' => 'border-color: {{VALUE}}'
3303 + ],
3304 + ]
3305 + );
3306 +
3307 + $this->add_control_title_pointer_color_hr();
3308 +
3309 + $this->end_controls_tab();
3310 +
3311 + $this->end_controls_tabs();
3312 +
3313 + $this->add_control_title_pointer();
3314 +
3315 + $this->add_control_title_pointer_height();
3316 +
3317 + $this->add_control_title_pointer_animation();
3318 +
3319 + $this->add_control(
3320 + 'title_transition_duration',
3321 + [
3322 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
3323 + 'type' => Controls_Manager::NUMBER,
3324 + 'default' => 0.3,
3325 + 'min' => 0,
3326 + 'max' => 5,
3327 + 'step' => 0.1,
3328 + 'selectors' => [
3329 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'transition-duration: {{VALUE}}s',
3330 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'transition-duration: {{VALUE}}s',
3331 + '{{WRAPPER}} .king-addons-grid-item-title .king-addons-pointer-item:before' => 'transition-duration: {{VALUE}}s',
3332 + '{{WRAPPER}} .king-addons-grid-item-title .king-addons-pointer-item:after' => 'transition-duration: {{VALUE}}s',
3333 + ],
3334 + 'separator' => 'after',
3335 + ]
3336 + );
3337 +
3338 + $this->add_group_control(
3339 + Group_Control_Typography::get_type(),
3340 + [
3341 + 'name' => 'title_typography',
3342 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-title a, {{WRAPPER}} .king-addons-grid-item-title span'
3343 + ]
3344 + );
3345 +
3346 + $this->add_control(
3347 + 'title_border_type',
3348 + [
3349 + 'label' => esc_html__('Border Type', 'king-addons'),
3350 + 'type' => Controls_Manager::SELECT,
3351 + 'options' => [
3352 + 'none' => esc_html__('None', 'king-addons'),
3353 + 'solid' => esc_html__('Solid', 'king-addons'),
3354 + 'double' => esc_html__('Double', 'king-addons'),
3355 + 'dotted' => esc_html__('Dotted', 'king-addons'),
3356 + 'dashed' => esc_html__('Dashed', 'king-addons'),
3357 + 'groove' => esc_html__('Groove', 'king-addons'),
3358 + ],
3359 + 'default' => 'none',
3360 + 'selectors' => [
3361 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'border-style: {{VALUE}};',
3362 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'border-style: {{VALUE}};'
3363 + ],
3364 + 'render_type' => 'template',
3365 + 'separator' => 'before',
3366 + ]
3367 + );
3368 +
3369 + $this->add_control(
3370 + 'title_border_width',
3371 + [
3372 + 'label' => esc_html__('Border Width', 'king-addons'),
3373 + 'type' => Controls_Manager::DIMENSIONS,
3374 + 'size_units' => ['px'],
3375 + 'default' => [
3376 + 'top' => 1,
3377 + 'right' => 1,
3378 + 'bottom' => 1,
3379 + 'left' => 1,
3380 + ],
3381 + 'selectors' => [
3382 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3383 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
3384 + ],
3385 + 'render_type' => 'template',
3386 + 'condition' => [
3387 + 'title_border_type!' => 'none',
3388 + ],
3389 + ]
3390 + );
3391 +
3392 + $this->add_responsive_control(
3393 + 'title_padding',
3394 + [
3395 + 'label' => esc_html__('Padding', 'king-addons'),
3396 + 'type' => Controls_Manager::DIMENSIONS,
3397 + 'size_units' => ['px', '%'],
3398 + 'default' => [
3399 + 'top' => 0,
3400 + 'right' => 0,
3401 + 'bottom' => 0,
3402 + 'left' => 0,
3403 + ],
3404 + 'selectors' => [
3405 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3406 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
3407 + ],
3408 + 'render_type' => 'template',
3409 + 'separator' => 'before',
3410 + ]
3411 + );
3412 +
3413 + $this->add_responsive_control(
3414 + 'title_margin',
3415 + [
3416 + 'label' => esc_html__('Margin', 'king-addons'),
3417 + 'type' => Controls_Manager::DIMENSIONS,
3418 + 'size_units' => ['px', '%'],
3419 + 'default' => [
3420 + 'top' => 0,
3421 + 'right' => 0,
3422 + 'bottom' => 0,
3423 + 'left' => 0,
3424 + ],
3425 + 'selectors' => [
3426 + '{{WRAPPER}} .king-addons-grid-item-title .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3427 + ],
3428 + 'render_type' => 'template',
3429 + ]
3430 + );
3431 +
3432 + $this->end_controls_section();
3433 +
3434 +
3435 + $this->start_controls_section(
3436 + 'section_style_caption',
3437 + [
3438 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Caption', 'king-addons'),
3439 + 'tab' => Controls_Manager::TAB_STYLE,
3440 + 'show_label' => false,
3441 + ]
3442 + );
3443 +
3444 + $this->add_control(
3445 + 'caption_color',
3446 + [
3447 + 'label' => esc_html__('Color', 'king-addons'),
3448 + 'type' => Controls_Manager::COLOR,
3449 + 'default' => '#ffffff',
3450 + 'selectors' => [
3451 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block p' => 'color: {{VALUE}}',
3452 + ],
3453 + ]
3454 + );
3455 +
3456 + $this->add_control(
3457 + 'caption_bg_color',
3458 + [
3459 + 'label' => esc_html__('Background Color', 'king-addons'),
3460 + 'type' => Controls_Manager::COLOR,
3461 + 'selectors' => [
3462 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => 'background-color: {{VALUE}}',
3463 + ]
3464 + ]
3465 + );
3466 +
3467 + $this->add_control(
3468 + 'caption_border_color',
3469 + [
3470 + 'label' => esc_html__('Border Color', 'king-addons'),
3471 + 'type' => Controls_Manager::COLOR,
3472 + 'default' => '#E8E8E8',
3473 + 'selectors' => [
3474 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => 'border-color: {{VALUE}}',
3475 + ],
3476 + 'separator' => 'after',
3477 + ]
3478 + );
3479 +
3480 + $this->add_group_control(
3481 + Group_Control_Typography::get_type(),
3482 + [
3483 + 'name' => 'caption_typography',
3484 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-caption'
3485 + ]
3486 + );
3487 +
3488 + $this->add_group_control(
3489 + Group_Control_Typography::get_type(),
3490 + [
3491 + 'name' => 'caption_dropcap_typography',
3492 + 'label' => esc_html__('Drop Cap Typography', 'king-addons'),
3493 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-caption.king-addons-enable-dropcap p:first-child:first-letter'
3494 + ]
3495 + );
3496 +
3497 + $this->add_responsive_control(
3498 + 'caption_justify',
3499 + [
3500 + 'label' => esc_html__('Justify Text', 'king-addons'),
3501 + 'type' => Controls_Manager::SWITCHER,
3502 + 'default' => '',
3503 + 'widescreen_default' => '',
3504 + 'laptop_default' => '',
3505 + 'tablet_extra_default' => '',
3506 + 'tablet_default' => '',
3507 + 'mobile_extra_default' => '',
3508 + 'mobile_default' => '',
3509 + 'selectors_dictionary' => [
3510 + '' => '',
3511 + 'yes' => 'text-align: justify;'
3512 + ],
3513 + 'selectors' => [
3514 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => '{{VALUE}}',
3515 + ],
3516 + 'render_type' => 'template',
3517 + ]
3518 + );
3519 +
3520 + $this->add_control(
3521 + 'caption_border_type',
3522 + [
3523 + 'label' => esc_html__('Border Type', 'king-addons'),
3524 + 'type' => Controls_Manager::SELECT,
3525 + 'options' => [
3526 + 'none' => esc_html__('None', 'king-addons'),
3527 + 'solid' => esc_html__('Solid', 'king-addons'),
3528 + 'double' => esc_html__('Double', 'king-addons'),
3529 + 'dotted' => esc_html__('Dotted', 'king-addons'),
3530 + 'dashed' => esc_html__('Dashed', 'king-addons'),
3531 + 'groove' => esc_html__('Groove', 'king-addons'),
3532 + ],
3533 + 'default' => 'none',
3534 + 'selectors' => [
3535 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => 'border-style: {{VALUE}};',
3536 + ],
3537 + 'render_type' => 'template',
3538 + 'separator' => 'before',
3539 + ]
3540 + );
3541 +
3542 + $this->add_control(
3543 + 'caption_border_width',
3544 + [
3545 + 'label' => esc_html__('Border Width', 'king-addons'),
3546 + 'type' => Controls_Manager::DIMENSIONS,
3547 + 'size_units' => ['px'],
3548 + 'default' => [
3549 + 'top' => 1,
3550 + 'right' => 1,
3551 + 'bottom' => 1,
3552 + 'left' => 1,
3553 + ],
3554 + 'selectors' => [
3555 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3556 + ],
3557 + 'render_type' => 'template',
3558 + 'condition' => [
3559 + 'caption_border_type!' => 'none',
3560 + ],
3561 + ]
3562 + );
3563 +
3564 + $this->add_responsive_control(
3565 + 'caption_padding',
3566 + [
3567 + 'label' => esc_html__('Padding', 'king-addons'),
3568 + 'type' => Controls_Manager::DIMENSIONS,
3569 + 'size_units' => ['px', '%'],
3570 + 'default' => [
3571 + 'top' => 0,
3572 + 'right' => 0,
3573 + 'bottom' => 0,
3574 + 'left' => 0,
3575 + ],
3576 + 'selectors' => [
3577 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3578 + ],
3579 + 'render_type' => 'template',
3580 + 'separator' => 'before',
3581 + ]
3582 + );
3583 +
3584 + $this->add_responsive_control(
3585 + 'caption_margin',
3586 + [
3587 + 'label' => esc_html__('Margin', 'king-addons'),
3588 + 'type' => Controls_Manager::DIMENSIONS,
3589 + 'size_units' => ['px', '%'],
3590 + 'default' => [
3591 + 'top' => 0,
3592 + 'right' => 0,
3593 + 'bottom' => 0,
3594 + 'left' => 0,
3595 + ],
3596 + 'render_type' => 'template',
3597 + 'selectors' => [
3598 + '{{WRAPPER}} .king-addons-grid-item-caption .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3599 + ],
3600 + ]
3601 + );
3602 +
3603 + $this->end_controls_section();
3604 +
3605 +
3606 + $this->start_controls_section(
3607 + 'section_style_date',
3608 + [
3609 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Date', 'king-addons'),
3610 + 'tab' => Controls_Manager::TAB_STYLE,
3611 + 'show_label' => false,
3612 + ]
3613 + );
3614 +
3615 + $this->add_control(
3616 + 'date_color',
3617 + [
3618 + 'label' => esc_html__('Color', 'king-addons'),
3619 + 'type' => Controls_Manager::COLOR,
3620 + 'default' => '#ffffff',
3621 + 'selectors' => [
3622 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block' => 'color: {{VALUE}}',
3623 + ],
3624 + ]
3625 + );
3626 +
3627 + $this->add_control(
3628 + 'date_bg_color',
3629 + [
3630 + 'label' => esc_html__('Background Color', 'king-addons'),
3631 + 'type' => Controls_Manager::COLOR,
3632 + 'selectors' => [
3633 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block > span' => 'background-color: {{VALUE}}',
3634 + ]
3635 + ]
3636 + );
3637 +
3638 + $this->add_control(
3639 + 'date_border_color',
3640 + [
3641 + 'label' => esc_html__('Border Color', 'king-addons'),
3642 + 'type' => Controls_Manager::COLOR,
3643 + 'default' => '#E8E8E8',
3644 + 'selectors' => [
3645 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block > span' => 'border-color: {{VALUE}}',
3646 + ]
3647 + ]
3648 + );
3649 +
3650 + $this->add_control(
3651 + 'date_extra_text_color',
3652 + [
3653 + 'label' => esc_html__('Extra Text Color', 'king-addons'),
3654 + 'type' => Controls_Manager::COLOR,
3655 + 'default' => '#9C9C9C',
3656 + 'selectors' => [
3657 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block span[class*="king-addons-grid-extra-text"]' => 'color: {{VALUE}}',
3658 + ],
3659 + ]
3660 + );
3661 +
3662 + $this->add_control(
3663 + 'date_extra_icon_color',
3664 + [
3665 + 'label' => esc_html__('Extra Icon Color', 'king-addons'),
3666 + 'type' => Controls_Manager::COLOR,
3667 + 'default' => '#9C9C9C',
3668 + 'selectors' => [
3669 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block [class*="king-addons-grid-extra-icon"] i' => 'color: {{VALUE}}',
3670 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block [class*="king-addons-grid-extra-icon"] svg' => 'fill: {{VALUE}}'
3671 + ],
3672 + 'separator' => 'after',
3673 + ]
3674 + );
3675 +
3676 + $this->add_group_control(
3677 + Group_Control_Typography::get_type(),
3678 + [
3679 + 'name' => 'date_typography',
3680 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-date'
3681 + ]
3682 + );
3683 +
3684 + $this->add_control(
3685 + 'date_border_type',
3686 + [
3687 + 'label' => esc_html__('Border Type', 'king-addons'),
3688 + 'type' => Controls_Manager::SELECT,
3689 + 'options' => [
3690 + 'none' => esc_html__('None', 'king-addons'),
3691 + 'solid' => esc_html__('Solid', 'king-addons'),
3692 + 'double' => esc_html__('Double', 'king-addons'),
3693 + 'dotted' => esc_html__('Dotted', 'king-addons'),
3694 + 'dashed' => esc_html__('Dashed', 'king-addons'),
3695 + 'groove' => esc_html__('Groove', 'king-addons'),
3696 + ],
3697 + 'default' => 'none',
3698 + 'selectors' => [
3699 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block > span' => 'border-style: {{VALUE}};',
3700 + ],
3701 + 'render_type' => 'template',
3702 + 'separator' => 'before',
3703 + ]
3704 + );
3705 +
3706 + $this->add_control(
3707 + 'date_border_width',
3708 + [
3709 + 'label' => esc_html__('Border Width', 'king-addons'),
3710 + 'type' => Controls_Manager::DIMENSIONS,
3711 + 'size_units' => ['px'],
3712 + 'default' => [
3713 + 'top' => 1,
3714 + 'right' => 1,
3715 + 'bottom' => 1,
3716 + 'left' => 1,
3717 + ],
3718 + 'selectors' => [
3719 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3720 + ],
3721 + 'render_type' => 'template',
3722 + 'condition' => [
3723 + 'date_border_type!' => 'none',
3724 + ],
3725 + ]
3726 + );
3727 +
3728 + $this->add_control(
3729 + 'date_text_spacing',
3730 + [
3731 + 'label' => esc_html__('Extra Text Spacing', 'king-addons'),
3732 + 'type' => Controls_Manager::SLIDER,
3733 + 'size_units' => ['px'],
3734 + 'range' => [
3735 + 'px' => [
3736 + 'min' => 0,
3737 + 'max' => 25,
3738 + ],
3739 + ],
3740 + 'default' => [
3741 + 'unit' => 'px',
3742 + 'size' => 5,
3743 + ],
3744 + 'selectors' => [
3745 + '{{WRAPPER}} .king-addons-grid-item-date .king-addons-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};',
3746 + '{{WRAPPER}} .king-addons-grid-item-date .king-addons-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};',
3747 + ],
3748 + 'separator' => 'before',
3749 + ]
3750 + );
3751 +
3752 + $this->add_control(
3753 + 'date_icon_spacing',
3754 + [
3755 + 'label' => esc_html__('Extra Icon Spacing', 'king-addons'),
3756 + 'type' => Controls_Manager::SLIDER,
3757 + 'size_units' => ['px'],
3758 + 'range' => [
3759 + 'px' => [
3760 + 'min' => 0,
3761 + 'max' => 25,
3762 + ],
3763 + ],
3764 + 'default' => [
3765 + 'unit' => 'px',
3766 + 'size' => 5,
3767 + ],
3768 + 'selectors' => [
3769 + '{{WRAPPER}} .king-addons-grid-item-date .king-addons-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};',
3770 + '{{WRAPPER}} .king-addons-grid-item-date .king-addons-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};',
3771 + ],
3772 + ]
3773 + );
3774 +
3775 + $this->add_responsive_control(
3776 + 'date_padding',
3777 + [
3778 + 'label' => esc_html__('Padding', 'king-addons'),
3779 + 'type' => Controls_Manager::DIMENSIONS,
3780 + 'size_units' => ['px', '%'],
3781 + 'default' => [
3782 + 'top' => 0,
3783 + 'right' => 0,
3784 + 'bottom' => 0,
3785 + 'left' => 0,
3786 + ],
3787 + 'selectors' => [
3788 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3789 + ],
3790 + 'render_type' => 'template',
3791 + 'separator' => 'before',
3792 + ]
3793 + );
3794 +
3795 + $this->add_responsive_control(
3796 + 'date_margin',
3797 + [
3798 + 'label' => esc_html__('Margin', 'king-addons'),
3799 + 'type' => Controls_Manager::DIMENSIONS,
3800 + 'size_units' => ['px', '%'],
3801 + 'default' => [
3802 + 'top' => 0,
3803 + 'right' => 0,
3804 + 'bottom' => 0,
3805 + 'left' => 0,
3806 + ],
3807 + 'render_type' => 'template',
3808 + 'selectors' => [
3809 + '{{WRAPPER}} .king-addons-grid-item-date .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3810 + ],
3811 + ]
3812 + );
3813 +
3814 + $this->end_controls_section();
3815 +
3816 +
3817 + $this->start_controls_section(
3818 + 'section_style_time',
3819 + [
3820 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Time', 'king-addons'),
3821 + 'tab' => Controls_Manager::TAB_STYLE,
3822 + 'show_label' => false,
3823 + ]
3824 + );
3825 +
3826 + $this->add_control(
3827 + 'time_color',
3828 + [
3829 + 'label' => esc_html__('Color', 'king-addons'),
3830 + 'type' => Controls_Manager::COLOR,
3831 + 'default' => '#ffffff',
3832 + 'selectors' => [
3833 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block' => 'color: {{VALUE}}',
3834 + ],
3835 + ]
3836 + );
3837 +
3838 + $this->add_control(
3839 + 'time_bg_color',
3840 + [
3841 + 'label' => esc_html__('Background Color', 'king-addons'),
3842 + 'type' => Controls_Manager::COLOR,
3843 + 'selectors' => [
3844 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block > span' => 'background-color: {{VALUE}}',
3845 + ]
3846 + ]
3847 + );
3848 +
3849 + $this->add_control(
3850 + 'time_border_color',
3851 + [
3852 + 'label' => esc_html__('Border Color', 'king-addons'),
3853 + 'type' => Controls_Manager::COLOR,
3854 + 'default' => '#E8E8E8',
3855 + 'selectors' => [
3856 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block > span' => 'border-color: {{VALUE}}',
3857 + ],
3858 + ]
3859 + );
3860 +
3861 + $this->add_control(
3862 + 'time_extra_text_color',
3863 + [
3864 + 'label' => esc_html__('Extra Text Color', 'king-addons'),
3865 + 'type' => Controls_Manager::COLOR,
3866 + 'default' => '#9C9C9C',
3867 + 'selectors' => [
3868 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block span[class*="king-addons-grid-extra-text"]' => 'color: {{VALUE}}',
3869 + ],
3870 + ]
3871 + );
3872 +
3873 + $this->add_control(
3874 + 'time_extra_icon_color',
3875 + [
3876 + 'label' => esc_html__('Extra Icon Color', 'king-addons'),
3877 + 'type' => Controls_Manager::COLOR,
3878 + 'default' => '#9C9C9C',
3879 + 'selectors' => [
3880 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block [class*="king-addons-grid-extra-icon"] i' => 'color: {{VALUE}}',
3881 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block [class*="king-addons-grid-extra-icon"] svg' => 'fill: {{VALUE}}'
3882 + ],
3883 + 'separator' => 'after',
3884 + ]
3885 + );
3886 +
3887 + $this->add_group_control(
3888 + Group_Control_Typography::get_type(),
3889 + [
3890 + 'name' => 'time_typography',
3891 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-time'
3892 + ]
3893 + );
3894 +
3895 + $this->add_control(
3896 + 'time_border_type',
3897 + [
3898 + 'label' => esc_html__('Border Type', 'king-addons'),
3899 + 'type' => Controls_Manager::SELECT,
3900 + 'options' => [
3901 + 'none' => esc_html__('None', 'king-addons'),
3902 + 'solid' => esc_html__('Solid', 'king-addons'),
3903 + 'double' => esc_html__('Double', 'king-addons'),
3904 + 'dotted' => esc_html__('Dotted', 'king-addons'),
3905 + 'dashed' => esc_html__('Dashed', 'king-addons'),
3906 + 'groove' => esc_html__('Groove', 'king-addons'),
3907 + ],
3908 + 'default' => 'none',
3909 + 'selectors' => [
3910 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block > span' => 'border-style: {{VALUE}};',
3911 + ],
3912 + 'render_type' => 'template',
3913 + 'separator' => 'before',
3914 + ]
3915 + );
3916 +
3917 + $this->add_control(
3918 + 'time_border_width',
3919 + [
3920 + 'label' => esc_html__('Border Width', 'king-addons'),
3921 + 'type' => Controls_Manager::DIMENSIONS,
3922 + 'size_units' => ['px'],
3923 + 'default' => [
3924 + 'top' => 1,
3925 + 'right' => 1,
3926 + 'bottom' => 1,
3927 + 'left' => 1,
3928 + ],
3929 + 'selectors' => [
3930 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3931 + ],
3932 + 'render_type' => 'template',
3933 + 'condition' => [
3934 + 'time_border_type!' => 'none',
3935 + ],
3936 + ]
3937 + );
3938 +
3939 + $this->add_control(
3940 + 'time_text_spacing',
3941 + [
3942 + 'label' => esc_html__('Extra Text Spacing', 'king-addons'),
3943 + 'type' => Controls_Manager::SLIDER,
3944 + 'size_units' => ['px'],
3945 + 'range' => [
3946 + 'px' => [
3947 + 'min' => 0,
3948 + 'max' => 25,
3949 + ],
3950 + ],
3951 + 'default' => [
3952 + 'unit' => 'px',
3953 + 'size' => 5,
3954 + ],
3955 + 'selectors' => [
3956 + '{{WRAPPER}} .king-addons-grid-item-time .king-addons-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};',
3957 + '{{WRAPPER}} .king-addons-grid-item-time .king-addons-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};',
3958 + ],
3959 + 'separator' => 'before',
3960 + ]
3961 + );
3962 +
3963 + $this->add_control(
3964 + 'time_icon_spacing',
3965 + [
3966 + 'label' => esc_html__('Extra Icon Spacing', 'king-addons'),
3967 + 'type' => Controls_Manager::SLIDER,
3968 + 'size_units' => ['px'],
3969 + 'range' => [
3970 + 'px' => [
3971 + 'min' => 0,
3972 + 'max' => 25,
3973 + ],
3974 + ],
3975 + 'default' => [
3976 + 'unit' => 'px',
3977 + 'size' => 5,
3978 + ],
3979 + 'selectors' => [
3980 + '{{WRAPPER}} .king-addons-grid-item-time .king-addons-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};',
3981 + '{{WRAPPER}} .king-addons-grid-item-time .king-addons-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};',
3982 + ],
3983 + ]
3984 + );
3985 +
3986 + $this->add_responsive_control(
3987 + 'time_padding',
3988 + [
3989 + 'label' => esc_html__('Padding', 'king-addons'),
3990 + 'type' => Controls_Manager::DIMENSIONS,
3991 + 'size_units' => ['px', '%'],
3992 + 'default' => [
3993 + 'top' => 0,
3994 + 'right' => 0,
3995 + 'bottom' => 0,
3996 + 'left' => 0,
3997 + ],
3998 + 'selectors' => [
3999 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4000 + ],
4001 + 'render_type' => 'template',
4002 + 'separator' => 'before',
4003 + ]
4004 + );
4005 +
4006 + $this->add_responsive_control(
4007 + 'time_margin',
4008 + [
4009 + 'label' => esc_html__('Margin', 'king-addons'),
4010 + 'type' => Controls_Manager::DIMENSIONS,
4011 + 'size_units' => ['px', '%'],
4012 + 'default' => [
4013 + 'top' => 0,
4014 + 'right' => 0,
4015 + 'bottom' => 0,
4016 + 'left' => 0,
4017 + ],
4018 + 'selectors' => [
4019 + '{{WRAPPER}} .king-addons-grid-item-time .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4020 + ],
4021 + 'render_type' => 'template',
4022 + ]
4023 + );
4024 +
4025 + $this->end_controls_section();
4026 +
4027 +
4028 + $this->start_controls_section(
4029 + 'section_style_author',
4030 + [
4031 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Author', 'king-addons'),
4032 + 'tab' => Controls_Manager::TAB_STYLE,
4033 + 'show_label' => false,
4034 + ]
4035 + );
4036 +
4037 + $this->start_controls_tabs('tabs_grid_author_style');
4038 +
4039 + $this->start_controls_tab(
4040 + 'tab_grid_author_normal',
4041 + [
4042 + 'label' => esc_html__('Normal', 'king-addons'),
4043 + ]
4044 + );
4045 +
4046 + $this->add_control(
4047 + 'author_color',
4048 + [
4049 + 'label' => esc_html__('Color', 'king-addons'),
4050 + 'type' => Controls_Manager::COLOR,
4051 + 'default' => '#ffffff',
4052 + 'selectors' => [
4053 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'color: {{VALUE}}',
4054 + ],
4055 + ]
4056 + );
4057 +
4058 + $this->add_control(
4059 + 'author_bg_color',
4060 + [
4061 + 'label' => esc_html__('Background Color', 'king-addons'),
4062 + 'type' => Controls_Manager::COLOR,
4063 + 'selectors' => [
4064 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'background-color: {{VALUE}}',
4065 + ]
4066 + ]
4067 + );
4068 +
4069 + $this->add_control(
4070 + 'author_border_color',
4071 + [
4072 + 'label' => esc_html__('Border Color', 'king-addons'),
4073 + 'type' => Controls_Manager::COLOR,
4074 + 'default' => '#E8E8E8',
4075 + 'selectors' => [
4076 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'border-color: {{VALUE}}',
4077 + ],
4078 + ]
4079 + );
4080 +
4081 + $this->add_control(
4082 + 'author_extra_text_color',
4083 + [
4084 + 'label' => esc_html__('Extra Text Color', 'king-addons'),
4085 + 'type' => Controls_Manager::COLOR,
4086 + 'default' => '#9C9C9C',
4087 + 'selectors' => [
4088 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block span[class*="king-addons-grid-extra-text"]' => 'color: {{VALUE}}',
4089 + ],
4090 + 'separator' => 'after',
4091 + ]
4092 + );
4093 +
4094 + $this->end_controls_tab();
4095 +
4096 + $this->start_controls_tab(
4097 + 'tab_grid_author_hover',
4098 + [
4099 + 'label' => esc_html__('Hover', 'king-addons'),
4100 + ]
4101 + );
4102 +
4103 + $this->add_control(
4104 + 'author_color_hr',
4105 + [
4106 + 'label' => esc_html__('Color', 'king-addons'),
4107 + 'type' => Controls_Manager::COLOR,
4108 + 'default' => '#5B03FF',
4109 + 'selectors' => [
4110 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a:hover' => 'color: {{VALUE}}',
4111 + ],
4112 + ]
4113 + );
4114 +
4115 + $this->add_control(
4116 + 'author_bg_color_hr',
4117 + [
4118 + 'label' => esc_html__('Background Color', 'king-addons'),
4119 + 'type' => Controls_Manager::COLOR,
4120 + 'selectors' => [
4121 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a:hover' => 'background-color: {{VALUE}}',
4122 + ]
4123 + ]
4124 + );
4125 +
4126 + $this->add_control(
4127 + 'author_border_color_hr',
4128 + [
4129 + 'label' => esc_html__('Border Color', 'king-addons'),
4130 + 'type' => Controls_Manager::COLOR,
4131 + 'default' => '#E8E8E8',
4132 + 'selectors' => [
4133 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a:hover' => 'border-color: {{VALUE}}',
4134 + ],
4135 + 'separator' => 'after',
4136 + ]
4137 + );
4138 +
4139 + $this->end_controls_tab();
4140 +
4141 + $this->end_controls_tabs();
4142 +
4143 + $this->add_control(
4144 + 'author_transition_duration',
4145 + [
4146 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
4147 + 'type' => Controls_Manager::NUMBER,
4148 + 'default' => 0.1,
4149 + 'min' => 0,
4150 + 'max' => 5,
4151 + 'step' => 0.1,
4152 + 'selectors' => [
4153 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'transition-duration: {{VALUE}}s',
4154 + ],
4155 + 'separator' => 'after',
4156 + ]
4157 + );
4158 +
4159 + $this->add_group_control(
4160 + Group_Control_Typography::get_type(),
4161 + [
4162 + 'name' => 'author_typography',
4163 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-author'
4164 + ]
4165 + );
4166 +
4167 + $this->add_control(
4168 + 'author_border_type',
4169 + [
4170 + 'label' => esc_html__('Border Type', 'king-addons'),
4171 + 'type' => Controls_Manager::SELECT,
4172 + 'options' => [
4173 + 'none' => esc_html__('None', 'king-addons'),
4174 + 'solid' => esc_html__('Solid', 'king-addons'),
4175 + 'double' => esc_html__('Double', 'king-addons'),
4176 + 'dotted' => esc_html__('Dotted', 'king-addons'),
4177 + 'dashed' => esc_html__('Dashed', 'king-addons'),
4178 + 'groove' => esc_html__('Groove', 'king-addons'),
4179 + ],
4180 + 'default' => 'none',
4181 + 'selectors' => [
4182 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'border-style: {{VALUE}};',
4183 + ],
4184 + 'render_type' => 'template',
4185 + 'separator' => 'before',
4186 + ]
4187 + );
4188 +
4189 + $this->add_control(
4190 + 'author_border_width',
4191 + [
4192 + 'label' => esc_html__('Border Width', 'king-addons'),
4193 + 'type' => Controls_Manager::DIMENSIONS,
4194 + 'size_units' => ['px'],
4195 + 'default' => [
4196 + 'top' => 1,
4197 + 'right' => 1,
4198 + 'bottom' => 1,
4199 + 'left' => 1,
4200 + ],
4201 + 'selectors' => [
4202 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4203 + ],
4204 + 'render_type' => 'template',
4205 + 'condition' => [
4206 + 'author_border_type!' => 'none',
4207 + ],
4208 + ]
4209 + );
4210 +
4211 + $this->add_control(
4212 + 'author_border_radius',
4213 + [
4214 + 'label' => esc_html__('Border Radius', 'king-addons'),
4215 + 'type' => Controls_Manager::DIMENSIONS,
4216 + 'size_units' => ['px'],
4217 + 'default' => [
4218 + 'top' => 0,
4219 + 'right' => 0,
4220 + 'bottom' => 0,
4221 + 'left' => 0,
4222 + ],
4223 + 'selectors' => [
4224 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4225 + ]
4226 + ]
4227 + );
4228 +
4229 + $this->add_control(
4230 + 'author_text_spacing',
4231 + [
4232 + 'label' => esc_html__('Extra Text Spacing', 'king-addons'),
4233 + 'type' => Controls_Manager::SLIDER,
4234 + 'size_units' => ['px'],
4235 + 'range' => [
4236 + 'px' => [
4237 + 'min' => 0,
4238 + 'max' => 25,
4239 + ],
4240 + ],
4241 + 'default' => [
4242 + 'unit' => 'px',
4243 + 'size' => 5,
4244 + ],
4245 + 'selectors' => [
4246 + '{{WRAPPER}} .king-addons-grid-item-author .king-addons-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};',
4247 + '{{WRAPPER}} .king-addons-grid-item-author .king-addons-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};',
4248 + ],
4249 + 'separator' => 'before',
4250 + ]
4251 + );
4252 +
4253 + $this->add_control(
4254 + 'author_icon_spacing',
4255 + [
4256 + 'label' => esc_html__('Extra Icon Spacing', 'king-addons'),
4257 + 'type' => Controls_Manager::SLIDER,
4258 + 'size_units' => ['px'],
4259 + 'range' => [
4260 + 'px' => [
4261 + 'min' => 0,
4262 + 'max' => 25,
4263 + ],
4264 + ],
4265 + 'default' => [
4266 + 'unit' => 'px',
4267 + 'size' => 5,
4268 + ],
4269 + 'selectors' => [
4270 + '{{WRAPPER}} .king-addons-grid-item-author .king-addons-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};',
4271 + '{{WRAPPER}} .king-addons-grid-item-author .king-addons-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};',
4272 + ],
4273 + ]
4274 + );
4275 +
4276 + $this->add_control(
4277 + 'author_avatar_spacing',
4278 + [
4279 + 'label' => esc_html__('Avatar Spacing', 'king-addons'),
4280 + 'type' => Controls_Manager::SLIDER,
4281 + 'size_units' => ['px'],
4282 + 'range' => [
4283 + 'px' => [
4284 + 'min' => 0,
4285 + 'max' => 25,
4286 + ],
4287 + ],
4288 + 'default' => [
4289 + 'unit' => 'px',
4290 + 'size' => 5,
4291 + ],
4292 + 'selectors' => [
4293 + '{{WRAPPER}} .king-addons-grid-item-author img' => 'margin-right: {{SIZE}}{{UNIT}};',
4294 + ],
4295 + ]
4296 + );
4297 +
4298 + $this->add_responsive_control(
4299 + 'author_padding',
4300 + [
4301 + 'label' => esc_html__('Padding', 'king-addons'),
4302 + 'type' => Controls_Manager::DIMENSIONS,
4303 + 'size_units' => ['px', '%'],
4304 + 'default' => [
4305 + 'top' => 0,
4306 + 'right' => 0,
4307 + 'bottom' => 0,
4308 + 'left' => 0,
4309 + ],
4310 + 'selectors' => [
4311 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4312 + ],
4313 + 'render_type' => 'template',
4314 + 'separator' => 'before',
4315 + ]
4316 + );
4317 +
4318 + $this->add_responsive_control(
4319 + 'author_margin',
4320 + [
4321 + 'label' => esc_html__('Margin', 'king-addons'),
4322 + 'type' => Controls_Manager::DIMENSIONS,
4323 + 'size_units' => ['px', '%'],
4324 + 'default' => [
4325 + 'top' => 0,
4326 + 'right' => 0,
4327 + 'bottom' => 0,
4328 + 'left' => 0,
4329 + ],
4330 + 'render_type' => 'template',
4331 + 'selectors' => [
4332 + '{{WRAPPER}} .king-addons-grid-item-author .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4333 + ],
4334 + ]
4335 + );
4336 +
4337 + $this->end_controls_section();
4338 +
4339 +
4340 + $this->add_section_style_likes();
4341 +
4342 +
4343 + $this->add_section_style_sharing();
4344 +
4345 +
4346 + $this->start_controls_section(
4347 + 'section_style_lightbox',
4348 + [
4349 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Lightbox', 'king-addons'),
4350 + 'tab' => Controls_Manager::TAB_STYLE,
4351 + 'show_label' => false,
4352 + ]
4353 + );
4354 +
4355 + $this->start_controls_tabs('tabs_grid_lightbox_style');
4356 +
4357 + $this->start_controls_tab(
4358 + 'tab_grid_lightbox_normal',
4359 + [
4360 + 'label' => esc_html__('Normal', 'king-addons'),
4361 + ]
4362 + );
4363 +
4364 + $this->add_control(
4365 + 'lightbox_color',
4366 + [
4367 + 'label' => esc_html__('Text Color', 'king-addons'),
4368 + 'type' => Controls_Manager::COLOR,
4369 + 'default' => '#ffffff',
4370 + 'selectors' => [
4371 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span, {{WRAPPER}} .king-addons-grid-item-title .inner-block a' => 'color: {{VALUE}}',
4372 + ],
4373 + ]
4374 + );
4375 +
4376 + $this->add_control(
4377 + 'lightbox_bg_color',
4378 + [
4379 + 'label' => esc_html__('Background Color', 'king-addons'),
4380 + 'type' => Controls_Manager::COLOR,
4381 + 'selectors' => [
4382 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'background-color: {{VALUE}}',
4383 + ]
4384 + ]
4385 + );
4386 +
4387 + $this->add_control(
4388 + 'lightbox_border_color',
4389 + [
4390 + 'label' => esc_html__('Border Color', 'king-addons'),
4391 + 'type' => Controls_Manager::COLOR,
4392 + 'default' => '#E8E8E8',
4393 + 'selectors' => [
4394 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'border-color: {{VALUE}}',
4395 + ],
4396 + ]
4397 + );
4398 +
4399 + $this->add_group_control(
4400 + Group_Control_Text_Shadow::get_type(),
4401 + [
4402 + 'name' => 'lightbox_shadow',
4403 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-lightbox i',
4404 + ]
4405 + );
4406 +
4407 + $this->end_controls_tab();
4408 +
4409 + $this->start_controls_tab(
4410 + 'tab_grid_lightbox_hover',
4411 + [
4412 + 'label' => esc_html__('Hover', 'king-addons'),
4413 + ]
4414 + );
4415 +
4416 + $this->add_control(
4417 + 'lightbox_color_hr',
4418 + [
4419 + 'label' => esc_html__('Text Color', 'king-addons'),
4420 + 'type' => Controls_Manager::COLOR,
4421 + 'default' => '#ffffff',
4422 + 'selectors' => [
4423 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span:hover, {{WRAPPER}} .king-addons-grid-item-title .inner-block a:hover' => 'color: {{VALUE}} !important;',
4424 + ],
4425 + ]
4426 + );
4427 +
4428 + $this->add_control(
4429 + 'lightbox_bg_color_hr',
4430 + [
4431 + 'label' => esc_html__('Background Color', 'king-addons'),
4432 + 'type' => Controls_Manager::COLOR,
4433 + 'selectors' => [
4434 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span:hover' => 'background-color: {{VALUE}}',
4435 + ]
4436 + ]
4437 + );
4438 +
4439 + $this->add_control(
4440 + 'lightbox_border_color_hr',
4441 + [
4442 + 'label' => esc_html__('Border Color', 'king-addons'),
4443 + 'type' => Controls_Manager::COLOR,
4444 + 'default' => '#E8E8E8',
4445 + 'selectors' => [
4446 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span:hover' => 'border-color: {{VALUE}}',
4447 + ],
4448 + 'separator' => 'after',
4449 + ]
4450 + );
4451 +
4452 + $this->end_controls_tab();
4453 +
4454 + $this->end_controls_tabs();
4455 +
4456 + $this->add_control(
4457 + 'lightbox_shadow_divider',
4458 + [
4459 + 'type' => Controls_Manager::DIVIDER,
4460 + 'style' => 'thick',
4461 + ]
4462 + );
4463 +
4464 + $this->add_control(
4465 + 'lightbox_transition_duration',
4466 + [
4467 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
4468 + 'type' => Controls_Manager::NUMBER,
4469 + 'default' => 0.1,
4470 + 'min' => 0,
4471 + 'max' => 5,
4472 + 'step' => 0.1,
4473 + 'selectors' => [
4474 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'transition-duration: {{VALUE}}s',
4475 + ],
4476 + 'separator' => 'after',
4477 + ]
4478 + );
4479 +
4480 + // Icon Size Control - separate from typography
4481 + $this->add_responsive_control(
4482 + 'lightbox_icon_size',
4483 + [
4484 + 'label' => esc_html__('Icon Size', 'king-addons'),
4485 + 'type' => Controls_Manager::SLIDER,
4486 + 'size_units' => ['px', 'em', 'rem'],
4487 + 'range' => [
4488 + 'px' => [
4489 + 'min' => 5,
4490 + 'max' => 100,
4491 + 'step' => 1,
4492 + ],
4493 + 'em' => [
4494 + 'min' => 0.5,
4495 + 'max' => 5,
4496 + 'step' => 0.1,
4497 + ],
4498 + 'rem' => [
4499 + 'min' => 0.5,
4500 + 'max' => 5,
4501 + 'step' => 0.1,
4502 + ],
4503 + ],
4504 + 'default' => [
4505 + 'unit' => 'px',
4506 + 'size' => 16,
4507 + ],
4508 + 'selectors' => [
4509 + '{{WRAPPER}} .king-addons-grid-item-lightbox i' => 'font-size: {{SIZE}}{{UNIT}};',
4510 + '{{WRAPPER}} .king-addons-grid-item-lightbox svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
4511 + ],
4512 + 'separator' => 'before',
4513 + ]
4514 + );
4515 +
4516 + // Icon Color Control - separate from text color
4517 + $this->add_responsive_control(
4518 + 'lightbox_icon_color',
4519 + [
4520 + 'label' => esc_html__('Icon Color', 'king-addons'),
4521 + 'type' => Controls_Manager::COLOR,
4522 + 'default' => '#ffffff',
4523 + 'selectors' => [
4524 + '{{WRAPPER}} .king-addons-grid-item-lightbox i' => 'color: {{VALUE}};',
4525 + '{{WRAPPER}} .king-addons-grid-item-lightbox svg' => 'fill: {{VALUE}};',
4526 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span i' => 'color: {{VALUE}};',
4527 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span svg' => 'fill: {{VALUE}};',
4528 + ],
4529 + ]
4530 + );
4531 +
4532 + // Icon Hover Color Control
4533 + $this->add_responsive_control(
4534 + 'lightbox_icon_color_hover',
4535 + [
4536 + 'label' => esc_html__('Icon Color (Hover)', 'king-addons'),
4537 + 'type' => Controls_Manager::COLOR,
4538 + 'selectors' => [
4539 + '{{WRAPPER}} .king-addons-grid-item-lightbox span:hover i' => 'color: {{VALUE}} !important;',
4540 + '{{WRAPPER}} .king-addons-grid-item-lightbox span:hover svg' => 'fill: {{VALUE}} !important;',
4541 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span:hover i' => 'color: {{VALUE}} !important;',
4542 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span:hover svg' => 'fill: {{VALUE}} !important;',
4543 + ],
4544 + ]
4545 + );
4546 +
4547 + $this->add_group_control(
4548 + Group_Control_Typography::get_type(),
4549 + [
4550 + 'name' => 'lightbox_typography',
4551 + 'selector' => '{{WRAPPER}} .king-addons-grid-item-lightbox, {{WRAPPER}} .king-addons-grid-item-title .inner-block a',
4552 + ]
4553 + );
4554 +
4555 + $this->add_control(
4556 + 'lightbox_border_type',
4557 + [
4558 + 'label' => esc_html__('Border Type', 'king-addons'),
4559 + 'type' => Controls_Manager::SELECT,
4560 + 'options' => [
4561 + 'none' => esc_html__('None', 'king-addons'),
4562 + 'solid' => esc_html__('Solid', 'king-addons'),
4563 + 'double' => esc_html__('Double', 'king-addons'),
4564 + 'dotted' => esc_html__('Dotted', 'king-addons'),
4565 + 'dashed' => esc_html__('Dashed', 'king-addons'),
4566 + 'groove' => esc_html__('Groove', 'king-addons'),
4567 + ],
4568 + 'default' => 'none',
4569 + 'selectors' => [
4570 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'border-style: {{VALUE}};',
4571 + ],
4572 + 'render_type' => 'template',
4573 + 'separator' => 'before',
4574 + ]
4575 + );
4576 +
4577 + $this->add_control(
4578 + 'lightbox_border_width',
4579 + [
4580 + 'label' => esc_html__('Border Width', 'king-addons'),
4581 + 'type' => Controls_Manager::DIMENSIONS,
4582 + 'size_units' => ['px'],
4583 + 'default' => [
4584 + 'top' => 1,
4585 + 'right' => 1,
4586 + 'bottom' => 1,
4587 + 'left' => 1,
4588 + ],
4589 + 'selectors' => [
4590 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4591 + ],
4592 + 'render_type' => 'template',
4593 + 'condition' => [
4594 + 'lightbox_border_type!' => 'none',
4595 + ],
4596 + ]
4597 + );
4598 +
4599 + $this->add_control(
4600 + 'lightbox_text_spacing',
4601 + [
4602 + 'label' => esc_html__('Extra Text Spacing', 'king-addons'),
4603 + 'type' => Controls_Manager::SLIDER,
4604 + 'size_units' => ['px'],
4605 + 'range' => [
4606 + 'px' => [
4607 + 'min' => 0,
4608 + 'max' => 25,
4609 + ],
4610 + ],
4611 + 'default' => [
4612 + 'unit' => 'px',
4613 + 'size' => 5,
4614 + ],
4615 + 'selectors' => [
4616 + '{{WRAPPER}} .king-addons-grid-item-lightbox .king-addons-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};',
4617 + '{{WRAPPER}} .king-addons-grid-item-lightbox .king-addons-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};',
4618 + ],
4619 + 'separator' => 'before'
4620 + ]
4621 + );
4622 +
4623 + $this->add_responsive_control(
4624 + 'lightbox_padding',
4625 + [
4626 + 'label' => esc_html__('Padding', 'king-addons'),
4627 + 'type' => Controls_Manager::DIMENSIONS,
4628 + 'size_units' => ['px', '%'],
4629 + 'default' => [
4630 + 'top' => 0,
4631 + 'right' => 0,
4632 + 'bottom' => 0,
4633 + 'left' => 0,
4634 + ],
4635 + 'selectors' => [
4636 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4637 + ],
4638 + 'render_type' => 'template',
4639 + 'separator' => 'before',
4640 + ]
4641 + );
4642 +
4643 + $this->add_responsive_control(
4644 + 'lightbox_margin',
4645 + [
4646 + 'label' => esc_html__('Margin', 'king-addons'),
4647 + 'type' => Controls_Manager::DIMENSIONS,
4648 + 'size_units' => ['px', '%'],
4649 + 'default' => [
4650 + 'top' => 0,
4651 + 'right' => 0,
4652 + 'bottom' => 10,
4653 + 'left' => 0,
4654 + ],
4655 + 'render_type' => 'template',
4656 + 'selectors' => [
4657 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4658 + ],
4659 + ]
4660 + );
4661 +
4662 + $this->add_control(
4663 + 'lightbox_radius',
4664 + [
4665 + 'label' => esc_html__('Border Radius', 'king-addons'),
4666 + 'type' => Controls_Manager::DIMENSIONS,
4667 + 'size_units' => ['px', '%'],
4668 + 'default' => [
4669 + 'top' => 2,
4670 + 'right' => 2,
4671 + 'bottom' => 2,
4672 + 'left' => 2,
4673 + ],
4674 + 'selectors' => [
4675 + '{{WRAPPER}} .king-addons-grid-item-lightbox .inner-block > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4676 + ],
4677 + 'separator' => 'before',
4678 + ]
4679 + );
4680 +
4681 + $this->end_controls_section();
4682 +
4683 +
4684 + $this->start_controls_section(
4685 + 'section_style_separator1',
4686 + [
4687 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Separator Style 1', 'king-addons'),
4688 + 'tab' => Controls_Manager::TAB_STYLE,
4689 + 'show_label' => false,
4690 + ]
4691 + );
4692 +
4693 + $this->add_control(
4694 + 'separator1_color',
4695 + [
4696 + 'label' => esc_html__('Color', 'king-addons'),
4697 + 'type' => Controls_Manager::COLOR,
4698 + 'default' => '#E8E8E8',
4699 + 'selectors' => [
4700 + '{{WRAPPER}} .king-addons-grid-sep-style-1 .inner-block > span' => 'border-bottom-color: {{VALUE}}',
4701 + ],
4702 + ]
4703 + );
4704 +
4705 + $this->add_control(
4706 + 'separator1_width',
4707 + [
4708 + 'label' => esc_html__('Width', 'king-addons'),
4709 + 'type' => Controls_Manager::SLIDER,
4710 + 'size_units' => ['px', '%'],
4711 + 'range' => [
4712 + 'px' => [
4713 + 'min' => 0,
4714 + 'max' => 300,
4715 + ],
4716 + '%' => [
4717 + 'min' => 0,
4718 + 'max' => 100,
4719 + ],
4720 + ],
4721 + 'default' => [
4722 + 'unit' => '%',
4723 + 'size' => 100,
4724 + ],
4725 + 'selectors' => [
4726 + '{{WRAPPER}} .king-addons-grid-sep-style-1:not(.king-addons-grid-item-display-inline) .inner-block > span' => 'width: {{SIZE}}{{UNIT}};',
4727 + '{{WRAPPER}} .king-addons-grid-sep-style-1.king-addons-grid-item-display-inline' => 'width: {{SIZE}}{{UNIT}};',
4728 + ],
4729 + 'render_type' => 'template',
4730 + 'separator' => 'before',
4731 + ]
4732 + );
4733 +
4734 + $this->add_control(
4735 + 'separator1_height',
4736 + [
4737 + 'label' => esc_html__('Height', 'king-addons'),
4738 + 'type' => Controls_Manager::SLIDER,
4739 + 'size_units' => ['px'],
4740 + 'range' => [
4741 + 'px' => [
4742 + 'min' => 1,
4743 + 'max' => 100,
4744 + ],
4745 + ],
4746 + 'default' => [
4747 + 'unit' => 'px',
4748 + 'size' => 2,
4749 + ],
4750 + 'render_type' => 'template',
4751 + 'selectors' => [
4752 + '{{WRAPPER}} .king-addons-grid-sep-style-1 .inner-block > span' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
4753 + ],
4754 + ]
4755 + );
4756 +
4757 + $this->add_control(
4758 + 'separator1_border_type',
4759 + [
4760 + 'label' => esc_html__('Type', 'king-addons'),
4761 + 'type' => Controls_Manager::SELECT,
4762 + 'options' => [
4763 + 'solid' => esc_html__('Solid', 'king-addons'),
4764 + 'double' => esc_html__('Double', 'king-addons'),
4765 + 'dotted' => esc_html__('Dotted', 'king-addons'),
4766 + 'dashed' => esc_html__('Dashed', 'king-addons'),
4767 + 'groove' => esc_html__('Groove', 'king-addons'),
4768 + ],
4769 + 'default' => 'solid',
4770 + 'selectors' => [
4771 + '{{WRAPPER}} .king-addons-grid-sep-style-1 .inner-block > span' => 'border-bottom-style: {{VALUE}};',
4772 + ],
4773 + 'separator' => 'before',
4774 + ]
4775 + );
4776 +
4777 + $this->add_responsive_control(
4778 + 'separator1_margin',
4779 + [
4780 + 'label' => esc_html__('Margin', 'king-addons'),
4781 + 'type' => Controls_Manager::DIMENSIONS,
4782 + 'size_units' => ['px', '%'],
4783 + 'default' => [
4784 + 'top' => 0,
4785 + 'right' => 0,
4786 + 'bottom' => 0,
4787 + 'left' => 0,
4788 + ],
4789 + 'render_type' => 'template',
4790 + 'selectors' => [
4791 + '{{WRAPPER}} .king-addons-grid-sep-style-1 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4792 + ],
4793 + ]
4794 + );
4795 +
4796 + $this->add_control(
4797 + 'separator1_radius',
4798 + [
4799 + 'label' => esc_html__('Border Radius', 'king-addons'),
4800 + 'type' => Controls_Manager::DIMENSIONS,
4801 + 'size_units' => ['px', '%'],
4802 + 'default' => [
4803 + 'top' => 0,
4804 + 'right' => 0,
4805 + 'bottom' => 0,
4806 + 'left' => 0,
4807 + ],
4808 + 'selectors' => [
4809 + '{{WRAPPER}} .king-addons-grid-sep-style-1 .inner-block > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4810 + ],
4811 + 'separator' => 'before',
4812 + ]
4813 + );
4814 +
4815 + $this->end_controls_section();
4816 +
4817 +
4818 + $this->start_controls_section(
4819 + 'section_style_separator2',
4820 + [
4821 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Separator Style 2', 'king-addons'),
4822 + 'tab' => Controls_Manager::TAB_STYLE,
4823 + 'show_label' => false,
4824 + ]
4825 + );
4826 +
4827 + $this->add_control(
4828 + 'separator2_color',
4829 + [
4830 + 'label' => esc_html__('Color', 'king-addons'),
4831 + 'type' => Controls_Manager::COLOR,
4832 + 'default' => '#5B03FF',
4833 + 'selectors' => [
4834 + '{{WRAPPER}} .king-addons-grid-sep-style-2 .inner-block > span' => 'border-bottom-color: {{VALUE}}',
4835 + ],
4836 + ]
4837 + );
4838 +
4839 + $this->add_control(
4840 + 'separator2_width',
4841 + [
4842 + 'label' => esc_html__('Width', 'king-addons'),
4843 + 'type' => Controls_Manager::SLIDER,
4844 + 'size_units' => ['px', '%'],
4845 + 'range' => [
4846 + 'px' => [
4847 + 'min' => 0,
4848 + 'max' => 300,
4849 + ],
4850 + '%' => [
4851 + 'min' => 0,
4852 + 'max' => 100,
4853 + ],
4854 + ],
4855 + 'default' => [
4856 + 'unit' => '%',
4857 + 'size' => 20,
4858 + ],
4859 + 'selectors' => [
4860 + '{{WRAPPER}} .king-addons-grid-sep-style-2:not(.king-addons-grid-item-display-inline) .inner-block > span' => 'width: {{SIZE}}{{UNIT}};',
4861 + '{{WRAPPER}} .king-addons-grid-sep-style-2.king-addons-grid-item-display-inline' => 'width: {{SIZE}}{{UNIT}};',
4862 + ],
4863 + 'render_type' => 'template',
4864 + 'separator' => 'before',
4865 + ]
4866 + );
4867 +
4868 + $this->add_control(
4869 + 'separator2_height',
4870 + [
4871 + 'label' => esc_html__('Height', 'king-addons'),
4872 + 'type' => Controls_Manager::SLIDER,
4873 + 'size_units' => ['px'],
4874 + 'range' => [
4875 + 'px' => [
4876 + 'min' => 0,
4877 + 'max' => 100,
4878 + ],
4879 + ],
4880 + 'default' => [
4881 + 'unit' => 'px',
4882 + 'size' => 2,
4883 + ],
4884 + 'selectors' => [
4885 + '{{WRAPPER}} .king-addons-grid-sep-style-2 .inner-block > span' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
4886 + ],
4887 + 'render_type' => 'template',
4888 + ]
4889 + );
4890 +
4891 + $this->add_control(
4892 + 'separator2_border_type',
4893 + [
4894 + 'label' => esc_html__('Type', 'king-addons'),
4895 + 'type' => Controls_Manager::SELECT,
4896 + 'options' => [
4897 + 'solid' => esc_html__('Solid', 'king-addons'),
4898 + 'double' => esc_html__('Double', 'king-addons'),
4899 + 'dotted' => esc_html__('Dotted', 'king-addons'),
4900 + 'dashed' => esc_html__('Dashed', 'king-addons'),
4901 + 'groove' => esc_html__('Groove', 'king-addons'),
4902 + ],
4903 + 'default' => 'solid',
4904 + 'selectors' => [
4905 + '{{WRAPPER}} .king-addons-grid-sep-style-2 .inner-block > span' => 'border-bottom-style: {{VALUE}};',
4906 + ],
4907 + 'separator' => 'before',
4908 + ]
4909 + );
4910 +
4911 + $this->add_responsive_control(
4912 + 'separator2_margin',
4913 + [
4914 + 'label' => esc_html__('Margin', 'king-addons'),
4915 + 'type' => Controls_Manager::DIMENSIONS,
4916 + 'size_units' => ['px', '%'],
4917 + 'default' => [
4918 + 'top' => 0,
4919 + 'right' => 0,
4920 + 'bottom' => 0,
4921 + 'left' => 0,
4922 + ],
4923 + 'selectors' => [
4924 + '{{WRAPPER}} .king-addons-grid-sep-style-2 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4925 + ],
4926 + 'render_type' => 'template',
4927 + ]
4928 + );
4929 +
4930 + $this->add_control(
4931 + 'separator2_radius',
4932 + [
4933 + 'label' => esc_html__('Border Radius', 'king-addons'),
4934 + 'type' => Controls_Manager::DIMENSIONS,
4935 + 'size_units' => ['px', '%'],
4936 + 'default' => [
4937 + 'top' => 0,
4938 + 'right' => 0,
4939 + 'bottom' => 0,
4940 + 'left' => 0,
4941 + ],
4942 + 'selectors' => [
4943 + '{{WRAPPER}} .king-addons-grid-sep-style-2 .inner-block > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
4944 + ],
4945 + 'separator' => 'before',
4946 + ]
4947 + );
4948 +
4949 + $this->end_controls_section();
4950 +
4951 +
4952 + $this->start_controls_section(
4953 + 'section_style_tax1',
4954 + [
4955 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Taxonomy Style 1', 'king-addons'),
4956 + 'tab' => Controls_Manager::TAB_STYLE,
4957 + 'show_label' => false,
4958 + ]
4959 + );
4960 +
4961 + $this->start_controls_tabs('tabs_grid_tax1_style');
4962 +
4963 + $this->start_controls_tab(
4964 + 'tab_grid_tax1_normal',
4965 + [
4966 + 'label' => esc_html__('Normal', 'king-addons'),
4967 + ]
4968 + );
4969 +
4970 + $this->add_control(
4971 + 'tax1_color',
4972 + [
4973 + 'label' => esc_html__('Color', 'king-addons'),
4974 + 'type' => Controls_Manager::COLOR,
4975 + 'default' => '#ffffff',
4976 + 'selectors' => [
4977 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'color: {{VALUE}}',
4978 + ],
4979 + ]
4980 + );
4981 +
4982 + $this->add_control(
4983 + 'tax1_bg_color',
4984 + [
4985 + 'label' => esc_html__('Background Color', 'king-addons'),
4986 + 'type' => Controls_Manager::COLOR,
4987 + 'selectors' => [
4988 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'background-color: {{VALUE}}',
4989 + ]
4990 + ]
4991 + );
4992 +
4993 + $this->add_control(
4994 + 'tax1_border_color',
4995 + [
4996 + 'label' => esc_html__('Border Color', 'king-addons'),
4997 + 'type' => Controls_Manager::COLOR,
4998 + 'default' => '#E8E8E8',
4999 + 'selectors' => [
5000 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'border-color: {{VALUE}}',
5001 + ],
5002 + ]
5003 + );
5004 +
5005 + $this->add_control(
5006 + 'tax1_extra_text_color',
5007 + [
5008 + 'label' => esc_html__('Extra Text Color', 'king-addons'),
5009 + 'type' => Controls_Manager::COLOR,
5010 + 'default' => '#9C9C9C',
5011 + 'selectors' => [
5012 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block span[class*="king-addons-grid-extra-text"]' => 'color: {{VALUE}}',
5013 + ],
5014 + ]
5015 + );
5016 +
5017 + $this->add_control(
5018 + 'tax1_extra_icon_color',
5019 + [
5020 + 'label' => esc_html__('Extra Icon Color', 'king-addons'),
5021 + 'type' => Controls_Manager::COLOR,
5022 + 'default' => '#9C9C9C',
5023 + 'selectors' => [
5024 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block [class*="king-addons-grid-extra-icon"] i' => 'color: {{VALUE}}',
5025 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block [class*="king-addons-grid-extra-icon"] svg' => 'fill: {{VALUE}}'
5026 + ],
5027 + 'separator' => 'after',
5028 + ]
5029 + );
5030 +
5031 + $this->end_controls_tab();
5032 +
5033 + $this->start_controls_tab(
5034 + 'tab_grid_tax1_hover',
5035 + [
5036 + 'label' => esc_html__('Hover', 'king-addons'),
5037 + ]
5038 + );
5039 +
5040 + $this->add_control(
5041 + 'tax1_color_hr',
5042 + [
5043 + 'label' => esc_html__('Color', 'king-addons'),
5044 + 'type' => Controls_Manager::COLOR,
5045 + 'default' => '#5B03FF',
5046 + 'selectors' => [
5047 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a:hover' => 'color: {{VALUE}}',
5048 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-pointer-item:before' => 'background-color: {{VALUE}}',
5049 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-pointer-item:after' => 'background-color: {{VALUE}}',
5050 + ],
5051 + ]
5052 + );
5053 +
5054 + $this->add_control(
5055 + 'tax1_bg_color_hr',
5056 + [
5057 + 'label' => esc_html__('Background Color', 'king-addons'),
5058 + 'type' => Controls_Manager::COLOR,
5059 + 'selectors' => [
5060 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a:hover' => 'background-color: {{VALUE}}',
5061 + ]
5062 + ]
5063 + );
5064 +
5065 + $this->add_control(
5066 + 'tax1_border_color_hr',
5067 + [
5068 + 'label' => esc_html__('Border Color', 'king-addons'),
5069 + 'type' => Controls_Manager::COLOR,
5070 + 'default' => '#E8E8E8',
5071 + 'selectors' => [
5072 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a:hover' => 'border-color: {{VALUE}}',
5073 + ],
5074 + ]
5075 + );
5076 +
5077 + $this->add_control_tax1_pointer_color_hr();
5078 +
5079 + $this->end_controls_tab();
5080 +
5081 + $this->end_controls_tabs();
5082 +
5083 + $this->add_control_tax1_pointer();
5084 +
5085 + $this->add_control_tax1_pointer_height();
5086 +
5087 + $this->add_control_tax1_pointer_animation();
5088 +
5089 + $this->add_control(
5090 + 'tax1_transition_duration',
5091 + [
5092 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
5093 + 'type' => Controls_Manager::NUMBER,
5094 + 'default' => 0.1,
5095 + 'min' => 0,
5096 + 'max' => 5,
5097 + 'step' => 0.1,
5098 + 'selectors' => [
5099 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'transition-duration: {{VALUE}}s',
5100 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-pointer-item:before' => 'transition-duration: {{VALUE}}s',
5101 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-pointer-item:after' => 'transition-duration: {{VALUE}}s',
5102 + ],
5103 + 'separator' => 'after',
5104 + ]
5105 + );
5106 +
5107 + $this->add_group_control(
5108 + Group_Control_Typography::get_type(),
5109 + [
5110 + 'name' => 'tax1_typography',
5111 + 'selector' => '{{WRAPPER}} .king-addons-grid-tax-style-1'
5112 + ]
5113 + );
5114 +
5115 + $this->add_control(
5116 + 'tax1_border_type',
5117 + [
5118 + 'label' => esc_html__('Border Type', 'king-addons'),
5119 + 'type' => Controls_Manager::SELECT,
5120 + 'options' => [
5121 + 'none' => esc_html__('None', 'king-addons'),
5122 + 'solid' => esc_html__('Solid', 'king-addons'),
5123 + 'double' => esc_html__('Double', 'king-addons'),
5124 + 'dotted' => esc_html__('Dotted', 'king-addons'),
5125 + 'dashed' => esc_html__('Dashed', 'king-addons'),
5126 + 'groove' => esc_html__('Groove', 'king-addons'),
5127 + ],
5128 + 'default' => 'none',
5129 + 'selectors' => [
5130 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'border-style: {{VALUE}};',
5131 + ],
5132 + 'render_type' => 'template',
5133 + 'separator' => 'before',
5134 + ]
5135 + );
5136 +
5137 + $this->add_control(
5138 + 'tax1_border_width',
5139 + [
5140 + 'label' => esc_html__('Border Width', 'king-addons'),
5141 + 'type' => Controls_Manager::DIMENSIONS,
5142 + 'size_units' => ['px'],
5143 + 'default' => [
5144 + 'top' => 1,
5145 + 'right' => 1,
5146 + 'bottom' => 1,
5147 + 'left' => 1,
5148 + ],
5149 + 'selectors' => [
5150 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5151 + ],
5152 + 'render_type' => 'template',
5153 + 'condition' => [
5154 + 'tax1_border_type!' => 'none',
5155 + ],
5156 + ]
5157 + );
5158 +
5159 + $this->add_control(
5160 + 'tax1_text_spacing',
5161 + [
5162 + 'label' => esc_html__('Extra Text Spacing', 'king-addons'),
5163 + 'type' => Controls_Manager::SLIDER,
5164 + 'size_units' => ['px'],
5165 + 'range' => [
5166 + 'px' => [
5167 + 'min' => 0,
5168 + 'max' => 25,
5169 + ],
5170 + ],
5171 + 'default' => [
5172 + 'unit' => 'px',
5173 + 'size' => 5,
5174 + ],
5175 + 'selectors' => [
5176 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};',
5177 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};',
5178 + ],
5179 + 'render_type' => 'template',
5180 + 'separator' => 'before',
5181 + ]
5182 + );
5183 +
5184 + $this->add_control(
5185 + 'tax1_icon_spacing',
5186 + [
5187 + 'label' => esc_html__('Extra Icon Spacing', 'king-addons'),
5188 + 'type' => Controls_Manager::SLIDER,
5189 + 'size_units' => ['px'],
5190 + 'range' => [
5191 + 'px' => [
5192 + 'min' => 0,
5193 + 'max' => 25,
5194 + ],
5195 + ],
5196 + 'default' => [
5197 + 'unit' => 'px',
5198 + 'size' => 5,
5199 + ],
5200 + 'selectors' => [
5201 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};',
5202 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .king-addons-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};',
5203 + ],
5204 + ]
5205 + );
5206 +
5207 + $this->add_control(
5208 + 'tax1_gutter',
5209 + [
5210 + 'label' => esc_html__('Gutter', 'king-addons'),
5211 + 'type' => Controls_Manager::SLIDER,
5212 + 'size_units' => ['px'],
5213 + 'range' => [
5214 + 'px' => [
5215 + 'min' => 0,
5216 + 'max' => 20,
5217 + ],
5218 + ],
5219 + 'default' => [
5220 + 'unit' => 'px',
5221 + 'size' => 3,
5222 + ],
5223 + 'selectors' => [
5224 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'margin-right: {{SIZE}}{{UNIT}};',
5225 + ],
5226 + 'render_type' => 'template',
5227 + 'separator' => 'before',
5228 + ]
5229 + );
5230 +
5231 + $this->add_responsive_control(
5232 + 'tax1_padding',
5233 + [
5234 + 'label' => esc_html__('Padding', 'king-addons'),
5235 + 'type' => Controls_Manager::DIMENSIONS,
5236 + 'size_units' => ['px', '%'],
5237 + 'default' => [
5238 + 'top' => 0,
5239 + 'right' => 0,
5240 + 'bottom' => 0,
5241 + 'left' => 0,
5242 + ],
5243 + 'selectors' => [
5244 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5245 + ],
5246 + 'render_type' => 'template',
5247 + ]
5248 + );
5249 +
5250 + $this->add_responsive_control(
5251 + 'tax1_margin',
5252 + [
5253 + 'label' => esc_html__('Margin', 'king-addons'),
5254 + 'type' => Controls_Manager::DIMENSIONS,
5255 + 'size_units' => ['px', '%'],
5256 + 'default' => [
5257 + 'top' => 0,
5258 + 'right' => 0,
5259 + 'bottom' => 0,
5260 + 'left' => 0,
5261 + ],
5262 + 'selectors' => [
5263 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5264 + ],
5265 + 'render_type' => 'template',
5266 + ]
5267 + );
5268 +
5269 + $this->add_control(
5270 + 'tax1_radius',
5271 + [
5272 + 'label' => esc_html__('Border Radius', 'king-addons'),
5273 + 'type' => Controls_Manager::DIMENSIONS,
5274 + 'size_units' => ['px', '%'],
5275 + 'default' => [
5276 + 'top' => 2,
5277 + 'right' => 2,
5278 + 'bottom' => 2,
5279 + 'left' => 2,
5280 + ],
5281 + 'selectors' => [
5282 + '{{WRAPPER}} .king-addons-grid-tax-style-1 .inner-block a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5283 + ],
5284 + 'separator' => 'before',
5285 + ]
5286 + );
5287 +
5288 + $this->end_controls_section();
5289 +
5290 +
5291 + $this->start_controls_section(
5292 + 'section_style_tax2',
5293 + [
5294 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Taxonomy Style 2', 'king-addons'),
5295 + 'tab' => Controls_Manager::TAB_STYLE,
5296 + 'show_label' => false,
5297 + ]
5298 + );
5299 +
5300 + $this->start_controls_tabs('tabs_grid_tax2_style');
5301 +
5302 + $this->start_controls_tab(
5303 + 'tab_grid_tax2_normal',
5304 + [
5305 + 'label' => esc_html__('Normal', 'king-addons'),
5306 + ]
5307 + );
5308 +
5309 + $this->add_control(
5310 + 'tax2_color',
5311 + [
5312 + 'label' => esc_html__('Color', 'king-addons'),
5313 + 'type' => Controls_Manager::COLOR,
5314 + 'default' => '#ffffff',
5315 + 'selectors' => [
5316 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'color: {{VALUE}}',
5317 + ],
5318 + ]
5319 + );
5320 +
5321 + $this->add_control(
5322 + 'tax2_bg_color',
5323 + [
5324 + 'label' => esc_html__('Background Color', 'king-addons'),
5325 + 'type' => Controls_Manager::COLOR,
5326 + 'default' => '#5B03FF',
5327 + 'selectors' => [
5328 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'background-color: {{VALUE}}',
5329 + ]
5330 + ]
5331 + );
5332 +
5333 + $this->add_control(
5334 + 'tax2_border_color',
5335 + [
5336 + 'label' => esc_html__('Border Color', 'king-addons'),
5337 + 'type' => Controls_Manager::COLOR,
5338 + 'default' => '#E8E8E8',
5339 + 'selectors' => [
5340 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'border-color: {{VALUE}}',
5341 + ],
5342 + 'separator' => 'after',
5343 + ]
5344 + );
5345 +
5346 + $this->end_controls_tab();
5347 +
5348 + $this->start_controls_tab(
5349 + 'tab_grid_tax2_hover',
5350 + [
5351 + 'label' => esc_html__('Hover', 'king-addons'),
5352 + ]
5353 + );
5354 +
5355 + $this->add_control(
5356 + 'tax2_color_hr',
5357 + [
5358 + 'label' => esc_html__('Color', 'king-addons'),
5359 + 'type' => Controls_Manager::COLOR,
5360 + 'default' => '#ffffff',
5361 + 'selectors' => [
5362 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a:hover' => 'color: {{VALUE}}',
5363 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-pointer-item:before' => 'background-color: {{VALUE}}',
5364 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-pointer-item:after' => 'background-color: {{VALUE}}',
5365 + ],
5366 + ]
5367 + );
5368 +
5369 + $this->add_control(
5370 + 'tax2_bg_color_hr',
5371 + [
5372 + 'label' => esc_html__('Background Color', 'king-addons'),
5373 + 'type' => Controls_Manager::COLOR,
5374 + 'default' => '#4D02D8',
5375 + 'selectors' => [
5376 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a:hover' => 'background-color: {{VALUE}}',
5377 + ]
5378 + ]
5379 + );
5380 +
5381 + $this->add_control(
5382 + 'tax2_border_color_hr',
5383 + [
5384 + 'label' => esc_html__('Border Color', 'king-addons'),
5385 + 'type' => Controls_Manager::COLOR,
5386 + 'default' => '#E8E8E8',
5387 + 'selectors' => [
5388 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a:hover' => 'border-color: {{VALUE}}',
5389 + ],
5390 + ]
5391 + );
5392 +
5393 + $this->add_control_tax2_pointer_color_hr();
5394 +
5395 + $this->end_controls_tab();
5396 +
5397 + $this->end_controls_tabs();
5398 +
5399 + $this->add_control_tax2_pointer();
5400 +
5401 + $this->add_control_tax2_pointer_height();
5402 +
5403 + $this->add_control_tax2_pointer_animation();
5404 +
5405 + $this->add_control(
5406 + 'tax2_transition_duration',
5407 + [
5408 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
5409 + 'type' => Controls_Manager::NUMBER,
5410 + 'default' => 0.1,
5411 + 'min' => 0,
5412 + 'max' => 5,
5413 + 'step' => 0.1,
5414 + 'selectors' => [
5415 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'transition-duration: {{VALUE}}s',
5416 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-pointer-item:before' => 'transition-duration: {{VALUE}}s',
5417 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-pointer-item:after' => 'transition-duration: {{VALUE}}s',
5418 + ],
5419 + 'separator' => 'after',
5420 + ]
5421 + );
5422 +
5423 + $this->add_group_control(
5424 + Group_Control_Typography::get_type(),
5425 + [
5426 + 'name' => 'tax2_typography',
5427 + 'selector' => '{{WRAPPER}} .king-addons-grid-tax-style-2'
5428 + ]
5429 + );
5430 +
5431 + $this->add_control(
5432 + 'tax2_border_type',
5433 + [
5434 + 'label' => esc_html__('Border Type', 'king-addons'),
5435 + 'type' => Controls_Manager::SELECT,
5436 + 'options' => [
5437 + 'none' => esc_html__('None', 'king-addons'),
5438 + 'solid' => esc_html__('Solid', 'king-addons'),
5439 + 'double' => esc_html__('Double', 'king-addons'),
5440 + 'dotted' => esc_html__('Dotted', 'king-addons'),
5441 + 'dashed' => esc_html__('Dashed', 'king-addons'),
5442 + 'groove' => esc_html__('Groove', 'king-addons'),
5443 + ],
5444 + 'default' => 'none',
5445 + 'selectors' => [
5446 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'border-style: {{VALUE}};',
5447 + ],
5448 + 'render_type' => 'template',
5449 + 'separator' => 'before',
5450 + ]
5451 + );
5452 +
5453 + $this->add_control(
5454 + 'tax2_border_width',
5455 + [
5456 + 'label' => esc_html__('Border Width', 'king-addons'),
5457 + 'type' => Controls_Manager::DIMENSIONS,
5458 + 'size_units' => ['px'],
5459 + 'default' => [
5460 + 'top' => 1,
5461 + 'right' => 1,
5462 + 'bottom' => 1,
5463 + 'left' => 1,
5464 + ],
5465 + 'selectors' => [
5466 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5467 + ],
5468 + 'render_type' => 'template',
5469 + 'condition' => [
5470 + 'tax2_border_type!' => 'none',
5471 + ],
5472 + ]
5473 + );
5474 +
5475 + $this->add_control(
5476 + 'tax2_text_spacing',
5477 + [
5478 + 'label' => esc_html__('Extra Text Spacing', 'king-addons'),
5479 + 'type' => Controls_Manager::SLIDER,
5480 + 'size_units' => ['px'],
5481 + 'range' => [
5482 + 'px' => [
5483 + 'min' => 0,
5484 + 'max' => 25,
5485 + ],
5486 + ],
5487 + 'default' => [
5488 + 'unit' => 'px',
5489 + 'size' => 5,
5490 + ],
5491 + 'selectors' => [
5492 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-grid-extra-text-left' => 'padding-right: {{SIZE}}{{UNIT}};',
5493 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-grid-extra-text-right' => 'padding-left: {{SIZE}}{{UNIT}};',
5494 + ],
5495 + 'separator' => 'before',
5496 + ]
5497 + );
5498 +
5499 + $this->add_control(
5500 + 'tax2_icon_spacing',
5501 + [
5502 + 'label' => esc_html__('Extra Icon Spacing', 'king-addons'),
5503 + 'type' => Controls_Manager::SLIDER,
5504 + 'size_units' => ['px'],
5505 + 'range' => [
5506 + 'px' => [
5507 + 'min' => 0,
5508 + 'max' => 25,
5509 + ],
5510 + ],
5511 + 'default' => [
5512 + 'unit' => 'px',
5513 + 'size' => 5,
5514 + ],
5515 + 'selectors' => [
5516 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-grid-extra-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};',
5517 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .king-addons-grid-extra-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};',
5518 + ],
5519 + ]
5520 + );
5521 +
5522 + $this->add_control(
5523 + 'tax2_gutter',
5524 + [
5525 + 'label' => esc_html__('Gutter', 'king-addons'),
5526 + 'type' => Controls_Manager::SLIDER,
5527 + 'size_units' => ['px'],
5528 + 'range' => [
5529 + 'px' => [
5530 + 'min' => 0,
5531 + 'max' => 20,
5532 + ],
5533 + ],
5534 + 'default' => [
5535 + 'unit' => 'px',
5536 + 'size' => 3,
5537 + ],
5538 + 'selectors' => [
5539 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'margin-right: {{SIZE}}{{UNIT}};',
5540 + ],
5541 + 'render_type' => 'template',
5542 + 'separator' => 'before',
5543 + ]
5544 + );
5545 +
5546 + $this->add_responsive_control(
5547 + 'tax2_padding',
5548 + [
5549 + 'label' => esc_html__('Padding', 'king-addons'),
5550 + 'type' => Controls_Manager::DIMENSIONS,
5551 + 'size_units' => ['px', '%'],
5552 + 'default' => [
5553 + 'top' => 0,
5554 + 'right' => 10,
5555 + 'bottom' => 0,
5556 + 'left' => 10,
5557 + ],
5558 + 'selectors' => [
5559 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5560 + ],
5561 + 'render_type' => 'template',
5562 + ]
5563 + );
5564 +
5565 + $this->add_responsive_control(
5566 + 'tax2_margin',
5567 + [
5568 + 'label' => esc_html__('Margin', 'king-addons'),
5569 + 'type' => Controls_Manager::DIMENSIONS,
5570 + 'size_units' => ['px', '%'],
5571 + 'default' => [
5572 + 'top' => 0,
5573 + 'right' => 0,
5574 + 'bottom' => 0,
5575 + 'left' => 0,
5576 + ],
5577 + 'selectors' => [
5578 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5579 + ],
5580 + 'render_type' => 'template',
5581 + ]
5582 + );
5583 +
5584 + $this->add_control(
5585 + 'tax2_radius',
5586 + [
5587 + 'label' => esc_html__('Border Radius', 'king-addons'),
5588 + 'type' => Controls_Manager::DIMENSIONS,
5589 + 'size_units' => ['px', '%'],
5590 + 'default' => [
5591 + 'top' => 3,
5592 + 'right' => 3,
5593 + 'bottom' => 3,
5594 + 'left' => 3,
5595 + ],
5596 + 'selectors' => [
5597 + '{{WRAPPER}} .king-addons-grid-tax-style-2 .inner-block a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5598 + ],
5599 + 'separator' => 'before',
5600 + ]
5601 + );
5602 +
5603 + $this->end_controls_section();
5604 +
5605 +
5606 + $this->start_controls_section(
5607 + 'settings_section_style_grid_slider_nav',
5608 + [
5609 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Slider Navigation', 'king-addons'),
5610 + 'tab' => Controls_Manager::TAB_STYLE,
5611 + 'condition' => [
5612 + 'layout_select' => 'slider',
5613 + ],
5614 + ]
5615 + );
5616 +
5617 + $this->start_controls_tabs('tabs_grid_slider_nav_style');
5618 +
5619 + $this->start_controls_tab(
5620 + 'tab_grid_slider_nav_normal',
5621 + [
5622 + 'label' => esc_html__('Normal', 'king-addons'),
5623 + ]
5624 + );
5625 +
5626 + $this->add_control(
5627 + 'grid_slider_nav_color',
5628 + [
5629 + 'label' => esc_html__('Color', 'king-addons'),
5630 + 'type' => Controls_Manager::COLOR,
5631 + 'default' => 'rgba(255,255,255,0.8)',
5632 + 'selectors' => [
5633 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'color: {{VALUE}};',
5634 + '{{WRAPPER}} .king-addons-grid-slider-arrow svg' => 'fill: {{VALUE}};',
5635 + ],
5636 + ]
5637 + );
5638 +
5639 + $this->add_control(
5640 + 'grid_slider_nav_bg_color',
5641 + [
5642 + 'label' => esc_html__('Background Color', 'king-addons'),
5643 + 'type' => Controls_Manager::COLOR,
5644 + 'selectors' => [
5645 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'background-color: {{VALUE}};',
5646 + ],
5647 + ]
5648 + );
5649 +
5650 + $this->add_control(
5651 + 'grid_slider_nav_border_color',
5652 + [
5653 + 'label' => esc_html__('Border Color', 'king-addons'),
5654 + 'type' => Controls_Manager::COLOR,
5655 + 'default' => '#E8E8E8',
5656 + 'selectors' => [
5657 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'border-color: {{VALUE}};',
5658 + ],
5659 + ]
5660 + );
5661 +
5662 + $this->end_controls_tab();
5663 +
5664 + $this->start_controls_tab(
5665 + 'tab_grid_slider_nav_hover',
5666 + [
5667 + 'label' => esc_html__('Hover', 'king-addons'),
5668 + ]
5669 + );
5670 +
5671 + $this->add_control(
5672 + 'grid_slider_nav_hover_color',
5673 + [
5674 + 'label' => esc_html__('Color', 'king-addons'),
5675 + 'type' => Controls_Manager::COLOR,
5676 + 'default' => '#ffffff',
5677 + 'selectors' => [
5678 + '{{WRAPPER}} .king-addons-grid-slider-arrow:hover' => 'color: {{VALUE}};',
5679 + '{{WRAPPER}} .king-addons-grid-slider-arrow:hover svg' => 'fill: {{VALUE}};',
5680 + ],
5681 + ]
5682 + );
5683 +
5684 + $this->add_control(
5685 + 'grid_slider_nav_hover_bg_color',
5686 + [
5687 + 'label' => esc_html__('Background Color', 'king-addons'),
5688 + 'type' => Controls_Manager::COLOR,
5689 + 'selectors' => [
5690 + '{{WRAPPER}} .king-addons-grid-slider-arrow:hover' => 'background-color: {{VALUE}};',
5691 + ],
5692 + ]
5693 + );
5694 +
5695 + $this->add_control(
5696 + 'grid_slider_nav_hover_border_color',
5697 + [
5698 + 'label' => esc_html__('Border Color', 'king-addons'),
5699 + 'type' => Controls_Manager::COLOR,
5700 + 'default' => '#E8E8E8',
5701 + 'selectors' => [
5702 + '{{WRAPPER}} .king-addons-grid-slider-arrow:hover' => 'border-color: {{VALUE}};',
5703 + ],
5704 + ]
5705 + );
5706 +
5707 + $this->end_controls_tab();
5708 +
5709 + $this->end_controls_tabs();
5710 +
5711 + $this->add_control(
5712 + 'grid_slider_nav_transition_duration',
5713 + [
5714 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
5715 + 'type' => Controls_Manager::NUMBER,
5716 + 'default' => 0.1,
5717 + 'min' => 0,
5718 + 'max' => 5,
5719 + 'step' => 0.1,
5720 + 'selectors' => [
5721 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'transition-duration: {{VALUE}}s',
5722 + '{{WRAPPER}} .king-addons-grid-slider-arrow svg' => 'transition-duration: {{VALUE}}s',
5723 + ],
5724 + 'separator' => 'before',
5725 + ]
5726 + );
5727 +
5728 + $this->add_responsive_control(
5729 + 'grid_slider_nav_font_size',
5730 + [
5731 + 'label' => esc_html__('Font Size', 'king-addons'),
5732 + 'type' => Controls_Manager::SLIDER,
5733 + 'size_units' => ['px',],
5734 + 'range' => [
5735 + 'px' => [
5736 + 'min' => 10,
5737 + 'max' => 200,
5738 + ],
5739 + ],
5740 + 'default' => [
5741 + 'unit' => 'px',
5742 + 'size' => 25,
5743 + ],
5744 + 'selectors' => [
5745 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'font-size: {{SIZE}}{{UNIT}};',
5746 + '{{WRAPPER}} .king-addons-grid-slider-arrow svg' => 'width: {{SIZE}}{{UNIT}};',
5747 + ],
5748 + 'separator' => 'before',
5749 + ]
5750 + );
5751 +
5752 + $this->add_responsive_control(
5753 + 'grid_slider_nav_size',
5754 + [
5755 + 'label' => esc_html__('Box Size', 'king-addons'),
5756 + 'type' => Controls_Manager::SLIDER,
5757 + 'size_units' => ['px',],
5758 + 'range' => [
5759 + 'px' => [
5760 + 'min' => 10,
5761 + 'max' => 200,
5762 + ],
5763 + ],
5764 + 'default' => [
5765 + 'unit' => 'px',
5766 + 'size' => 60,
5767 + ],
5768 + 'selectors' => [
5769 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
5770 + ],
5771 + 'separator' => 'after',
5772 + ]
5773 + );
5774 +
5775 + $this->add_control(
5776 + 'grid_slider_nav_border_type',
5777 + [
5778 + 'label' => esc_html__('Border Type', 'king-addons'),
5779 + 'type' => Controls_Manager::SELECT,
5780 + 'options' => [
5781 + 'none' => esc_html__('None', 'king-addons'),
5782 + 'solid' => esc_html__('Solid', 'king-addons'),
5783 + 'double' => esc_html__('Double', 'king-addons'),
5784 + 'dotted' => esc_html__('Dotted', 'king-addons'),
5785 + 'dashed' => esc_html__('Dashed', 'king-addons'),
5786 + 'groove' => esc_html__('Groove', 'king-addons'),
5787 + ],
5788 + 'default' => 'none',
5789 + 'selectors' => [
5790 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'border-style: {{VALUE}};',
5791 + ],
5792 + ]
5793 + );
5794 +
5795 + $this->add_control(
5796 + 'grid_slider_nav_border_width',
5797 + [
5798 + 'label' => esc_html__('Border Width', 'king-addons'),
5799 + 'type' => Controls_Manager::DIMENSIONS,
5800 + 'size_units' => ['px'],
5801 + 'default' => [
5802 + 'top' => 2,
5803 + 'right' => 2,
5804 + 'bottom' => 0,
5805 + 'left' => 2,
5806 + ],
5807 + 'selectors' => [
5808 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5809 + ],
5810 + 'condition' => [
5811 + 'grid_slider_nav_border_type!' => 'none',
5812 + ],
5813 + ]
5814 + );
5815 +
5816 + $this->add_control(
5817 + 'grid_slider_nav_border_radius',
5818 + [
5819 + 'label' => esc_html__('Border Radius', 'king-addons'),
5820 + 'type' => Controls_Manager::DIMENSIONS,
5821 + 'size_units' => ['px', '%'],
5822 + 'selectors' => [
5823 + '{{WRAPPER}} .king-addons-grid-slider-arrow' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5824 + ],
5825 + 'separator' => 'after',
5826 + ]
5827 + );
5828 +
5829 + $this->add_control_stack_grid_slider_nav_position();
5830 +
5831 + $this->end_controls_section();
5832 +
5833 +
5834 + $this->start_controls_section(
5835 + 'settings_section_style_grid_slider_dots',
5836 + [
5837 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Slider Pagination', 'king-addons'),
5838 + 'tab' => Controls_Manager::TAB_STYLE,
5839 + 'condition' => [
5840 + 'layout_select' => 'slider',
5841 + ],
5842 + ]
5843 + );
5844 +
5845 + $this->start_controls_tabs('tabs_grid_slider_dots');
5846 +
5847 + $this->start_controls_tab(
5848 + 'tab_grid_slider_dots_normal',
5849 + [
5850 + 'label' => esc_html__('Normal', 'king-addons'),
5851 + ]
5852 + );
5853 +
5854 + $this->add_control(
5855 + 'grid_slider_dots_bg_color',
5856 + [
5857 + 'label' => esc_html__('Background Color', 'king-addons'),
5858 + 'type' => Controls_Manager::COLOR,
5859 + 'default' => 'rgba(0,0,0,0.35)',
5860 + 'selectors' => [
5861 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'background-color: {{VALUE}};',
5862 + ],
5863 + ]
5864 + );
5865 +
5866 + $this->add_control(
5867 + 'grid_slider_dots_border_color',
5868 + [
5869 + 'label' => esc_html__('Border Color', 'king-addons'),
5870 + 'type' => Controls_Manager::COLOR,
5871 + 'default' => '#E8E8E8',
5872 + 'selectors' => [
5873 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'border-color: {{VALUE}}',
5874 + ],
5875 + ]
5876 + );
5877 +
5878 + $this->end_controls_tab();
5879 +
5880 + $this->start_controls_tab(
5881 + 'tab_grid_slider_dots_active',
5882 + [
5883 + 'label' => esc_html__('Active', 'king-addons'),
5884 + ]
5885 + );
5886 +
5887 + $this->add_control(
5888 + 'grid_slider_dots_active_bg_color',
5889 + [
5890 + 'label' => esc_html__('Background Color', 'king-addons'),
5891 + 'type' => Controls_Manager::COLOR,
5892 + 'default' => '#222222',
5893 + 'selectors' => [
5894 + '{{WRAPPER}} .king-addons-grid-slider-dots .slick-active .king-addons-grid-slider-dot' => 'background-color: {{VALUE}}',
5895 + ],
5896 + ]
5897 + );
5898 +
5899 + $this->add_control(
5900 + 'grid_slider_dots_active_border_color',
5901 + [
5902 + 'label' => esc_html__('Border Color', 'king-addons'),
5903 + 'type' => Controls_Manager::COLOR,
5904 + 'default' => '#E8E8E8',
5905 + 'selectors' => [
5906 + '{{WRAPPER}} .king-addons-grid-slider-dots .slick-active .king-addons-grid-slider-dot' => 'border-color: {{VALUE}}',
5907 + ],
5908 + ]
5909 + );
5910 +
5911 + $this->end_controls_tab();
5912 +
5913 + $this->end_controls_tabs();
5914 +
5915 + $this->add_responsive_control(
5916 + 'grid_slider_dots_width',
5917 + [
5918 + 'label' => esc_html__('Box Width', 'king-addons'),
5919 + 'type' => Controls_Manager::SLIDER,
5920 + 'size_units' => ['px',],
5921 + 'range' => [
5922 + 'px' => [
5923 + 'min' => 1,
5924 + 'max' => 100,
5925 + ],
5926 + ],
5927 + 'default' => [
5928 + 'unit' => 'px',
5929 + 'size' => 8,
5930 + ],
5931 + 'selectors' => [
5932 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'width: {{SIZE}}{{UNIT}};',
5933 + ],
5934 + 'separator' => 'before',
5935 + 'render_type' => 'template'
5936 + ]
5937 + );
5938 +
5939 + $this->add_responsive_control(
5940 + 'grid_slider_dots_height',
5941 + [
5942 + 'label' => esc_html__('Box Height', 'king-addons'),
5943 + 'type' => Controls_Manager::SLIDER,
5944 + 'size_units' => ['px',],
5945 + 'range' => [
5946 + 'px' => [
5947 + 'min' => 1,
5948 + 'max' => 100,
5949 + ],
5950 + ],
5951 + 'default' => [
5952 + 'unit' => 'px',
5953 + 'size' => 8,
5954 + ],
5955 + 'selectors' => [
5956 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'height: {{SIZE}}{{UNIT}};',
5957 + ],
5958 + 'render_type' => 'template'
5959 + ]
5960 + );
5961 +
5962 + $this->add_control(
5963 + 'grid_slider_dots_border_type',
5964 + [
5965 + 'label' => esc_html__('Border Type', 'king-addons'),
5966 + 'type' => Controls_Manager::SELECT,
5967 + 'options' => [
5968 + 'none' => esc_html__('None', 'king-addons'),
5969 + 'solid' => esc_html__('Solid', 'king-addons'),
5970 + 'double' => esc_html__('Double', 'king-addons'),
5971 + 'dotted' => esc_html__('Dotted', 'king-addons'),
5972 + 'dashed' => esc_html__('Dashed', 'king-addons'),
5973 + 'groove' => esc_html__('Groove', 'king-addons'),
5974 + ],
5975 + 'default' => 'none',
5976 + 'selectors' => [
5977 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'border-style: {{VALUE}};',
5978 + ],
5979 + 'render_type' => 'template',
5980 + 'separator' => 'before',
5981 + ]
5982 + );
5983 +
5984 + $this->add_control(
5985 + 'grid_slider_dots_border_width',
5986 + [
5987 + 'label' => esc_html__('Border Width', 'king-addons'),
5988 + 'type' => Controls_Manager::DIMENSIONS,
5989 + 'size_units' => ['px'],
5990 + 'default' => [
5991 + 'top' => 1,
5992 + 'right' => 1,
5993 + 'bottom' => 1,
5994 + 'left' => 1,
5995 + ],
5996 + 'selectors' => [
5997 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
5998 + ],
5999 + 'render_type' => 'template',
6000 + 'condition' => [
6001 + 'grid_slider_dots_border_type!' => 'none',
6002 + ],
6003 + ]
6004 + );
6005 +
6006 + $this->add_control(
6007 + 'grid_slider_dots_border_radius',
6008 + [
6009 + 'label' => esc_html__('Border Radius', 'king-addons'),
6010 + 'type' => Controls_Manager::DIMENSIONS,
6011 + 'default' => [
6012 + 'top' => 50,
6013 + 'right' => 50,
6014 + 'bottom' => 50,
6015 + 'left' => 50,
6016 + 'unit' => '%',
6017 + ],
6018 + 'size_units' => ['px', '%'],
6019 + 'selectors' => [
6020 + '{{WRAPPER}} .king-addons-grid-slider-dot' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6021 + ],
6022 + 'separator' => 'before',
6023 + ]
6024 + );
6025 +
6026 + $this->add_responsive_control(
6027 + 'grid_slider_dots_gutter',
6028 + [
6029 + 'type' => Controls_Manager::SLIDER,
6030 + 'label' => esc_html__('Gutter', 'king-addons'),
6031 + 'size_units' => ['px'],
6032 + 'range' => [
6033 + 'px' => [
6034 + 'min' => 0,
6035 + 'max' => 100,
6036 + ],
6037 + ],
6038 + 'default' => [
6039 + 'unit' => 'px',
6040 + 'size' => 7,
6041 + ],
6042 + 'selectors' => [
6043 + '{{WRAPPER}}.king-addons-grid-slider-dots-horizontal .king-addons-grid-slider-dot' => 'margin-right: {{SIZE}}{{UNIT}};',
6044 + '{{WRAPPER}}.king-addons-grid-slider-dots-vertical .king-addons-grid-slider-dot' => 'margin-bottom: {{SIZE}}{{UNIT}};',
6045 + ],
6046 + 'render_type' => 'template',
6047 + 'separator' => 'before',
6048 + ]
6049 + );
6050 +
6051 + $this->add_control_grid_slider_dots_hr();
6052 +
6053 + $this->add_responsive_control(
6054 + 'grid_slider_dots_vr',
6055 + [
6056 + 'type' => Controls_Manager::SLIDER,
6057 + 'label' => esc_html__('Vertical Position', 'king-addons'),
6058 + 'size_units' => ['%', 'px'],
6059 + 'range' => [
6060 + '%' => [
6061 + 'min' => -20,
6062 + 'max' => 120,
6063 + ],
6064 + 'px' => [
6065 + 'min' => -200,
6066 + 'max' => 2000,
6067 + ],
6068 + ],
6069 + 'default' => [
6070 + 'unit' => '%',
6071 + 'size' => 96,
6072 + ],
6073 + 'selectors' => [
6074 + '{{WRAPPER}} .king-addons-grid-slider-dots' => 'top: {{SIZE}}{{UNIT}};',
6075 + ],
6076 + ]
6077 + );
6078 +
6079 + $this->end_controls_section();
6080 +
6081 +
6082 + $this->start_controls_section(
6083 + 'section_style_filters',
6084 + [
6085 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Filters', 'king-addons'),
6086 + 'tab' => Controls_Manager::TAB_STYLE,
6087 + 'show_label' => false,
6088 + 'condition' => [
6089 + 'layout_select!' => 'slider',
6090 + 'layout_filters' => 'yes',
6091 + ],
6092 + ]
6093 + );
6094 +
6095 + $this->add_control(
6096 + 'active_styles_notice',
6097 + [
6098 + 'type' => Controls_Manager::RAW_HTML,
6099 + 'raw' => esc_html__('Apply active filter styles from the hover tab.', 'king-addons'),
6100 + 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info'
6101 + ]
6102 + );
6103 +
6104 + $this->start_controls_tabs('tabs_grid_filters_style');
6105 +
6106 + $this->start_controls_tab(
6107 + 'tab_grid_filters_normal',
6108 + [
6109 + 'label' => esc_html__('Normal', 'king-addons'),
6110 + ]
6111 + );
6112 +
6113 + $this->add_control(
6114 + 'filters_color',
6115 + [
6116 + 'label' => esc_html__('Color', 'king-addons'),
6117 + 'type' => Controls_Manager::COLOR,
6118 + 'default' => '#7A7A7A',
6119 + 'selectors' => [
6120 + '{{WRAPPER}} .king-addons-grid-filters li' => 'color: {{VALUE}}',
6121 + '{{WRAPPER}} .king-addons-grid-filters li a' => 'color: {{VALUE}}',
6122 + ],
6123 + ]
6124 + );
6125 +
6126 + $this->add_control(
6127 + 'filters_bg_color',
6128 + [
6129 + 'label' => esc_html__('Background Color', 'king-addons'),
6130 + 'type' => Controls_Manager::COLOR,
6131 + 'selectors' => [
6132 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'background-color: {{VALUE}}',
6133 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'background-color: {{VALUE}}',
6134 + ]
6135 + ]
6136 + );
6137 +
6138 + $this->add_control(
6139 + 'filters_border_color',
6140 + [
6141 + 'label' => esc_html__('Border Color', 'king-addons'),
6142 + 'type' => Controls_Manager::COLOR,
6143 + 'default' => '#E8E8E8',
6144 + 'selectors' => [
6145 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'border-color: {{VALUE}}',
6146 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'border-color: {{VALUE}}',
6147 + ],
6148 + ]
6149 + );
6150 +
6151 + $this->add_group_control(
6152 + Group_Control_Box_Shadow::get_type(),
6153 + [
6154 + 'name' => 'filters_box_shadow',
6155 + 'selector' => '{{WRAPPER}} .king-addons-grid-filters li > a, {{WRAPPER}} .king-addons-grid-filters li > span',
6156 + ]
6157 + );
6158 +
6159 + $this->add_control(
6160 + 'filters_wrapper_color',
6161 + [
6162 + 'label' => esc_html__('Wrapper Color', 'king-addons'),
6163 + 'type' => Controls_Manager::COLOR,
6164 + 'selectors' => [
6165 + '{{WRAPPER}} .king-addons-grid-filters' => 'background-color: {{VALUE}}',
6166 + ],
6167 + 'separator' => 'after',
6168 + ]
6169 + );
6170 +
6171 + $this->end_controls_tab();
6172 +
6173 + $this->start_controls_tab(
6174 + 'tab_grid_filters_hover',
6175 + [
6176 + 'label' => esc_html__('Hover', 'king-addons'),
6177 + ]
6178 + );
6179 +
6180 + $this->add_control(
6181 + 'filters_color_hr',
6182 + [
6183 + 'label' => esc_html__('Color', 'king-addons'),
6184 + 'type' => Controls_Manager::COLOR,
6185 + 'default' => '#ffffff',
6186 + 'selectors' => [
6187 + '{{WRAPPER}} .king-addons-grid-filters li > a:hover' => 'color: {{VALUE}}',
6188 + '{{WRAPPER}} .king-addons-grid-filters li > span:hover' => 'color: {{VALUE}}',
6189 + '{{WRAPPER}} .king-addons-grid-filters li > .king-addons-active-filter' => 'color: {{VALUE}}',
6190 + ],
6191 + ]
6192 + );
6193 +
6194 + $this->add_control(
6195 + 'filters_bg_color_hr',
6196 + [
6197 + 'label' => esc_html__('Background Color', 'king-addons'),
6198 + 'type' => Controls_Manager::COLOR,
6199 + 'default' => '#5B03FF',
6200 + 'selectors' => [
6201 + '{{WRAPPER}} .king-addons-grid-filters li > a:hover' => 'background-color: {{VALUE}}',
6202 + '{{WRAPPER}} .king-addons-grid-filters li > span:hover' => 'background-color: {{VALUE}}',
6203 + '{{WRAPPER}} .king-addons-grid-filters li > .king-addons-active-filter' => 'background-color: {{VALUE}}',
6204 + ]
6205 + ]
6206 + );
6207 +
6208 + $this->add_control(
6209 + 'filters_border_color_hr',
6210 + [
6211 + 'label' => esc_html__('Border Color', 'king-addons'),
6212 + 'type' => Controls_Manager::COLOR,
6213 + 'default' => '#E8E8E8',
6214 + 'selectors' => [
6215 + '{{WRAPPER}} .king-addons-grid-filters li > a:hover' => 'border-color: {{VALUE}}',
6216 + '{{WRAPPER}} .king-addons-grid-filters li > span:hover' => 'border-color: {{VALUE}}',
6217 + '{{WRAPPER}} .king-addons-grid-filters li > .king-addons-active-filter' => 'border-color: {{VALUE}}',
6218 + ]
6219 + ]
6220 + );
6221 +
6222 + $this->add_control_filters_pointer_color_hr();
6223 +
6224 + $this->add_group_control(
6225 + Group_Control_Box_Shadow::get_type(),
6226 + [
6227 + 'name' => 'filters_box_shadow_hr',
6228 + 'selector' => '{{WRAPPER}} .king-addons-grid-filters li > a:hover, {{WRAPPER}} .king-addons-grid-filters li > span:hover',
6229 + 'separator' => 'after',
6230 + ]
6231 + );
6232 +
6233 + $this->end_controls_tab();
6234 +
6235 + $this->end_controls_tabs();
6236 +
6237 + $this->add_control_filters_pointer();
6238 +
6239 + $this->add_control_filters_pointer_height();
6240 +
6241 + $this->add_control_filters_pointer_animation();
6242 +
6243 + $this->add_control(
6244 + 'filters_transition_duration',
6245 + [
6246 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
6247 + 'type' => Controls_Manager::NUMBER,
6248 + 'default' => 0.1,
6249 + 'min' => 0,
6250 + 'max' => 5,
6251 + 'step' => 0.1,
6252 + 'selectors' => [
6253 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'transition-duration: {{VALUE}}s',
6254 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'transition-duration: {{VALUE}}s',
6255 + '{{WRAPPER}} .king-addons-pointer-item:before' => 'transition-duration: {{VALUE}}s',
6256 + '{{WRAPPER}} .king-addons-pointer-item:after' => 'transition-duration: {{VALUE}}s',
6257 + ],
6258 + 'separator' => 'after',
6259 + ]
6260 + );
6261 +
6262 + $this->add_group_control(
6263 + Group_Control_Typography::get_type(),
6264 + [
6265 + 'name' => 'filters_typography',
6266 + 'selector' => '{{WRAPPER}} .king-addons-grid-filters li'
6267 + ]
6268 + );
6269 +
6270 + $this->add_control(
6271 + 'filters_border_type',
6272 + [
6273 + 'label' => esc_html__('Border Type', 'king-addons'),
6274 + 'type' => Controls_Manager::SELECT,
6275 + 'options' => [
6276 + 'none' => esc_html__('None', 'king-addons'),
6277 + 'solid' => esc_html__('Solid', 'king-addons'),
6278 + 'double' => esc_html__('Double', 'king-addons'),
6279 + 'dotted' => esc_html__('Dotted', 'king-addons'),
6280 + 'dashed' => esc_html__('Dashed', 'king-addons'),
6281 + 'groove' => esc_html__('Groove', 'king-addons'),
6282 + ],
6283 + 'default' => 'none',
6284 + 'selectors' => [
6285 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'border-style: {{VALUE}};',
6286 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'border-style: {{VALUE}};',
6287 + ],
6288 + 'separator' => 'before',
6289 + ]
6290 + );
6291 +
6292 + $this->add_control(
6293 + 'filters_border_width',
6294 + [
6295 + 'label' => esc_html__('Border Width', 'king-addons'),
6296 + 'type' => Controls_Manager::DIMENSIONS,
6297 + 'size_units' => ['px'],
6298 + 'default' => [
6299 + 'top' => 1,
6300 + 'right' => 1,
6301 + 'bottom' => 1,
6302 + 'left' => 1,
6303 + ],
6304 + 'selectors' => [
6305 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6306 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6307 + ],
6308 + 'condition' => [
6309 + 'filters_border_type!' => 'none',
6310 + ],
6311 + ]
6312 + );
6313 +
6314 + $this->add_responsive_control(
6315 + 'filters_distance_from_grid',
6316 + [
6317 + 'label' => esc_html__('Distance From Grid', 'king-addons'),
6318 + 'type' => Controls_Manager::SLIDER,
6319 + 'size_units' => ['px'],
6320 + 'range' => [
6321 + 'px' => [
6322 + 'min' => 0,
6323 + 'max' => 100,
6324 + ],
6325 + ],
6326 + 'default' => [
6327 + 'unit' => 'px',
6328 + 'size' => 25,
6329 + ],
6330 + 'selectors' => [
6331 + '{{WRAPPER}} .king-addons-grid-filters' => 'margin-bottom: {{SIZE}}{{UNIT}};',
6332 + ],
6333 + 'separator' => 'before'
6334 + ]
6335 + );
6336 +
6337 + $this->add_control(
6338 + 'filters_icon_spacing',
6339 + [
6340 + 'label' => esc_html__('Extra Icon Spacing', 'king-addons'),
6341 + 'type' => Controls_Manager::SLIDER,
6342 + 'size_units' => ['px'],
6343 + 'range' => [
6344 + 'px' => [
6345 + 'min' => 0,
6346 + 'max' => 25,
6347 + ],
6348 + ],
6349 + 'default' => [
6350 + 'unit' => 'px',
6351 + 'size' => 0,
6352 + ],
6353 + 'selectors' => [
6354 + '{{WRAPPER}} .king-addons-grid-filters-icon-left' => 'padding-right: {{SIZE}}{{UNIT}};',
6355 + '{{WRAPPER}} .king-addons-grid-filters-icon-right' => 'padding-left: {{SIZE}}{{UNIT}};',
6356 + ],
6357 + ]
6358 + );
6359 +
6360 + $this->add_responsive_control(
6361 + 'filters_margin',
6362 + [
6363 + 'label' => esc_html__('Margin', 'king-addons'),
6364 + 'type' => Controls_Manager::DIMENSIONS,
6365 + 'size_units' => ['px'],
6366 + 'default' => [
6367 + 'top' => 0,
6368 + 'right' => 5,
6369 + 'bottom' => 0,
6370 + 'left' => 0,
6371 + ],
6372 + 'selectors' => [
6373 + '{{WRAPPER}} .king-addons-grid-filters li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6374 + ],
6375 + ]
6376 + );
6377 +
6378 + $this->add_responsive_control(
6379 + 'filters_padding',
6380 + [
6381 + 'label' => esc_html__('Padding', 'king-addons'),
6382 + 'type' => Controls_Manager::DIMENSIONS,
6383 + 'size_units' => ['px',],
6384 + 'default' => [
6385 + 'top' => 3,
6386 + 'right' => 15,
6387 + 'bottom' => 3,
6388 + 'left' => 15,
6389 + ],
6390 + 'selectors' => [
6391 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6392 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6393 + ],
6394 + ]
6395 + );
6396 +
6397 + $this->add_responsive_control(
6398 + 'filters_wrapper_padding',
6399 + [
6400 + 'label' => esc_html__('Wrapper Padding', 'king-addons'),
6401 + 'type' => Controls_Manager::DIMENSIONS,
6402 + 'size_units' => ['px',],
6403 + 'default' => [
6404 + 'top' => 0,
6405 + 'right' => 0,
6406 + 'bottom' => 0,
6407 + 'left' => 0,
6408 + ],
6409 + 'selectors' => [
6410 + '{{WRAPPER}} .king-addons-grid-filters' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6411 + ],
6412 + ]
6413 + );
6414 +
6415 + $this->add_control(
6416 + 'filters_radius',
6417 + [
6418 + 'label' => esc_html__('Border Radius', 'king-addons'),
6419 + 'type' => Controls_Manager::DIMENSIONS,
6420 + 'size_units' => ['px', '%'],
6421 + 'default' => [
6422 + 'top' => 3,
6423 + 'right' => 3,
6424 + 'bottom' => 3,
6425 + 'left' => 3,
6426 + ],
6427 + 'selectors' => [
6428 + '{{WRAPPER}} .king-addons-grid-filters li > a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6429 + '{{WRAPPER}} .king-addons-grid-filters li > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6430 + ],
6431 + 'separator' => 'before',
6432 + ]
6433 + );
6434 +
6435 + $this->end_controls_section();
6436 +
6437 +
6438 + $this->start_controls_section(
6439 + 'section_style_pagination',
6440 + [
6441 + 'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Pagination', 'king-addons'),
6442 + 'tab' => Controls_Manager::TAB_STYLE,
6443 + 'show_label' => false,
6444 + 'condition' => [
6445 + 'layout_select!' => 'slider',
6446 + 'layout_pagination' => 'yes',
6447 + ],
6448 + ]
6449 + );
6450 +
6451 + $this->start_controls_tabs('tabs_grid_pagination_style');
6452 +
6453 + $this->start_controls_tab(
6454 + 'tab_grid_pagination_normal',
6455 + [
6456 + 'label' => esc_html__('Normal', 'king-addons'),
6457 + ]
6458 + );
6459 +
6460 + $this->add_control(
6461 + 'pagination_color',
6462 + [
6463 + 'label' => esc_html__('Color', 'king-addons'),
6464 + 'type' => Controls_Manager::COLOR,
6465 + 'default' => '#ffffff',
6466 + 'selectors' => [
6467 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'color: {{VALUE}}',
6468 + '{{WRAPPER}} .king-addons-grid-pagination svg' => 'fill: {{VALUE}}',
6469 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'color: {{VALUE}}',
6470 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'color: {{VALUE}}',
6471 + ],
6472 + ]
6473 + );
6474 +
6475 + $this->add_control(
6476 + 'pagination_bg_color',
6477 + [
6478 + 'label' => esc_html__('Background Color', 'king-addons'),
6479 + 'type' => Controls_Manager::COLOR,
6480 + 'default' => '#5B03FF',
6481 + 'selectors' => [
6482 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'background-color: {{VALUE}}',
6483 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'background-color: {{VALUE}}',
6484 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'background-color: {{VALUE}}',
6485 + '{{WRAPPER}} .king-addons-pagination-finish' => 'color: {{VALUE}}',
6486 + ]
6487 + ]
6488 + );
6489 +
6490 + $this->add_control(
6491 + 'pagination_border_color',
6492 + [
6493 + 'label' => esc_html__('Border Color', 'king-addons'),
6494 + 'type' => Controls_Manager::COLOR,
6495 + 'default' => '#E8E8E8',
6496 + 'selectors' => [
6497 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'border-color: {{VALUE}}',
6498 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'border-color: {{VALUE}}',
6499 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'border-color: {{VALUE}}',
6500 + ],
6501 + ]
6502 + );
6503 +
6504 + $this->add_group_control(
6505 + Group_Control_Box_Shadow::get_type(),
6506 + [
6507 + 'name' => 'pagination_box_shadow',
6508 + 'selector' => '{{WRAPPER}} .king-addons-grid-pagination a, {{WRAPPER}} .king-addons-grid-pagination > div > span',
6509 + ]
6510 + );
6511 +
6512 + $this->add_control(
6513 + 'pagination_loader_color',
6514 + [
6515 + 'label' => esc_html__('Loader Color', 'king-addons'),
6516 + 'type' => Controls_Manager::COLOR,
6517 + 'default' => '#5B03FF',
6518 + 'selectors' => [
6519 + '{{WRAPPER}} .king-addons-double-bounce .king-addons-child' => 'background-color: {{VALUE}}',
6520 + '{{WRAPPER}} .king-addons-wave .king-addons-rect' => 'background-color: {{VALUE}}',
6521 + '{{WRAPPER}} .king-addons-spinner-pulse' => 'background-color: {{VALUE}}',
6522 + '{{WRAPPER}} .king-addons-chasing-dots .king-addons-child' => 'background-color: {{VALUE}}',
6523 + '{{WRAPPER}} .king-addons-three-bounce .king-addons-child' => 'background-color: {{VALUE}}',
6524 + '{{WRAPPER}} .king-addons-fading-circle .king-addons-circle:before' => 'background-color: {{VALUE}}',
6525 + ],
6526 + 'condition' => [
6527 + 'pagination_type' => ['load-more', 'infinite-scroll']
6528 + ]
6529 + ]
6530 + );
6531 +
6532 + $this->add_control(
6533 + 'pagination_wrapper_color',
6534 + [
6535 + 'label' => esc_html__('Wrapper Color', 'king-addons'),
6536 + 'type' => Controls_Manager::COLOR,
6537 + 'selectors' => [
6538 + '{{WRAPPER}} .king-addons-grid-pagination' => 'background-color: {{VALUE}}',
6539 + ],
6540 + 'separator' => 'after',
6541 + ]
6542 + );
6543 +
6544 + $this->end_controls_tab();
6545 +
6546 + $this->start_controls_tab(
6547 + 'tab_grid_pagination_hover',
6548 + [
6549 + 'label' => esc_html__('Hover', 'king-addons'),
6550 + ]
6551 + );
6552 +
6553 + $this->add_control(
6554 + 'pagination_color_hr',
6555 + [
6556 + 'label' => esc_html__('Color', 'king-addons'),
6557 + 'type' => Controls_Manager::COLOR,
6558 + 'default' => '#ffffff',
6559 + 'selectors' => [
6560 + '{{WRAPPER}} .king-addons-grid-pagination a:hover' => 'color: {{VALUE}}',
6561 + '{{WRAPPER}} .king-addons-grid-pagination a:hover svg' => 'fill: {{VALUE}}',
6562 + '{{WRAPPER}} .king-addons-grid-pagination > div > span:not(.king-addons-disabled-arrow):hover' => 'color: {{VALUE}}',
6563 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'color: {{VALUE}}',
6564 + ],
6565 + ]
6566 + );
6567 +
6568 + $this->add_control(
6569 + 'pagination_bg_color_hr',
6570 + [
6571 + 'label' => esc_html__('Background Color', 'king-addons'),
6572 + 'type' => Controls_Manager::COLOR,
6573 + 'default' => '#4D02D8',
6574 + 'selectors' => [
6575 + '{{WRAPPER}} .king-addons-grid-pagination a:hover' => 'background-color: {{VALUE}}',
6576 + '{{WRAPPER}} .king-addons-grid-pagination > div > span:not(.king-addons-disabled-arrow):hover' => 'background-color: {{VALUE}}',
6577 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'background-color: {{VALUE}}',
6578 + ]
6579 + ]
6580 + );
6581 +
6582 + $this->add_control(
6583 + 'pagination_border_color_hr',
6584 + [
6585 + 'label' => esc_html__('Border Color', 'king-addons'),
6586 + 'type' => Controls_Manager::COLOR,
6587 + 'default' => '#E8E8E8',
6588 + 'selectors' => [
6589 + '{{WRAPPER}} .king-addons-grid-pagination a:hover' => 'border-color: {{VALUE}}',
6590 + '{{WRAPPER}} .king-addons-grid-pagination > div > span:not(.king-addons-disabled-arrow):hover' => 'border-color: {{VALUE}}',
6591 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'border-color: {{VALUE}}',
6592 + ]
6593 + ]
6594 + );
6595 +
6596 + $this->add_group_control(
6597 + Group_Control_Box_Shadow::get_type(),
6598 + [
6599 + 'name' => 'pagination_box_shadow_hr',
6600 + 'selector' => '{{WRAPPER}} .king-addons-grid-pagination a:hover, {{WRAPPER}} .king-addons-grid-pagination > div > span:not(.king-addons-disabled-arrow):hover',
6601 + 'separator' => 'after',
6602 + ]
6603 + );
6604 +
6605 + $this->end_controls_tab();
6606 +
6607 + $this->end_controls_tabs();
6608 +
6609 + $this->add_control(
6610 + 'pagination_transition_duration',
6611 + [
6612 + 'label' => esc_html__('Transition Duration (seconds)', 'king-addons'),
6613 + 'type' => Controls_Manager::NUMBER,
6614 + 'default' => 0.1,
6615 + 'min' => 0,
6616 + 'max' => 5,
6617 + 'step' => 0.1,
6618 + 'selectors' => [
6619 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'transition-duration: {{VALUE}}s',
6620 + '{{WRAPPER}} .king-addons-grid-pagination svg' => 'transition-duration: {{VALUE}}s',
6621 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'transition-duration: {{VALUE}}s',
6622 + ],
6623 + 'separator' => 'after',
6624 + ]
6625 + );
6626 +
6627 + $this->add_group_control(
6628 + Group_Control_Typography::get_type(),
6629 + [
6630 + 'name' => 'pagination_typography',
6631 + 'selector' => '{{WRAPPER}} .king-addons-grid-pagination'
6632 + ]
6633 + );
6634 +
6635 + $this->add_responsive_control(
6636 + 'pagination_icon_size',
6637 + [
6638 + 'label' => esc_html__('Icon Size', 'king-addons'),
6639 + 'type' => Controls_Manager::SLIDER,
6640 + 'size_units' => ['px'],
6641 + 'range' => [
6642 + 'px' => [
6643 + 'min' => 5,
6644 + 'max' => 30,
6645 + ],
6646 + ],
6647 + 'default' => [
6648 + 'unit' => 'px',
6649 + 'size' => 15,
6650 + ],
6651 + 'selectors' => [
6652 + '{{WRAPPER}} .king-addons-grid-pagination i' => 'font-size: {{SIZE}}{{UNIT}};',
6653 + '{{WRAPPER}} .king-addons-grid-pagination svg' => 'width: {{SIZE}}{{UNIT}};',
6654 + ],
6655 + ]
6656 + );
6657 +
6658 + $this->add_control(
6659 + 'pagination_border_type',
6660 + [
6661 + 'label' => esc_html__('Border Type', 'king-addons'),
6662 + 'type' => Controls_Manager::SELECT,
6663 + 'options' => [
6664 + 'none' => esc_html__('None', 'king-addons'),
6665 + 'solid' => esc_html__('Solid', 'king-addons'),
6666 + 'double' => esc_html__('Double', 'king-addons'),
6667 + 'dotted' => esc_html__('Dotted', 'king-addons'),
6668 + 'dashed' => esc_html__('Dashed', 'king-addons'),
6669 + 'groove' => esc_html__('Groove', 'king-addons'),
6670 + ],
6671 + 'default' => 'none',
6672 + 'selectors' => [
6673 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'border-style: {{VALUE}};',
6674 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'border-style: {{VALUE}};',
6675 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'border-style: {{VALUE}};',
6676 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'border-style: {{VALUE}};',
6677 + ],
6678 + 'separator' => 'before',
6679 + ]
6680 + );
6681 +
6682 + $this->add_control(
6683 + 'pagination_border_width',
6684 + [
6685 + 'label' => esc_html__('Border Width', 'king-addons'),
6686 + 'type' => Controls_Manager::DIMENSIONS,
6687 + 'size_units' => ['px'],
6688 + 'default' => [
6689 + 'top' => 1,
6690 + 'right' => 1,
6691 + 'bottom' => 1,
6692 + 'left' => 1,
6693 + ],
6694 + 'selectors' => [
6695 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6696 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6697 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6698 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6699 + ],
6700 + 'condition' => [
6701 + 'pagination_border_type!' => 'none',
6702 + ],
6703 + ]
6704 + );
6705 +
6706 + $this->add_responsive_control(
6707 + 'pagination_distance_from_grid',
6708 + [
6709 + 'label' => esc_html__('Distance From Grid', 'king-addons'),
6710 + 'type' => Controls_Manager::SLIDER,
6711 + 'size_units' => ['px'],
6712 + 'range' => [
6713 + 'px' => [
6714 + 'min' => 0,
6715 + 'max' => 100,
6716 + ],
6717 + ],
6718 + 'default' => [
6719 + 'unit' => 'px',
6720 + 'size' => 35,
6721 + ],
6722 + 'selectors' => [
6723 + '{{WRAPPER}} .king-addons-grid-pagination' => 'margin-top: {{SIZE}}{{UNIT}};',
6724 + ],
6725 + 'separator' => 'before'
6726 + ]
6727 + );
6728 +
6729 + $this->add_control(
6730 + 'pagination_gutter',
6731 + [
6732 + 'label' => esc_html__('Gutter', 'king-addons'),
6733 + 'type' => Controls_Manager::SLIDER,
6734 + 'size_units' => ['px'],
6735 + 'range' => [
6736 + 'px' => [
6737 + 'min' => 0,
6738 + 'max' => 25,
6739 + ],
6740 + ],
6741 + 'default' => [
6742 + 'unit' => 'px',
6743 + 'size' => 10,
6744 + ],
6745 + 'selectors' => [
6746 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'margin-right: {{SIZE}}{{UNIT}};',
6747 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'margin-right: {{SIZE}}{{UNIT}};',
6748 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'margin-right: {{SIZE}}{{UNIT}};',
6749 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'margin-right: {{SIZE}}{{UNIT}};',
6750 + ],
6751 + ]
6752 + );
6753 +
6754 + $this->add_control(
6755 + 'pagination_icon_spacing',
6756 + [
6757 + 'label' => esc_html__('Icon Spacing', 'king-addons'),
6758 + 'type' => Controls_Manager::SLIDER,
6759 + 'size_units' => ['px'],
6760 + 'range' => [
6761 + 'px' => [
6762 + 'min' => 0,
6763 + 'max' => 25,
6764 + ],
6765 + ],
6766 + 'default' => [
6767 + 'unit' => 'px',
6768 + 'size' => 10,
6769 + ],
6770 + 'selectors' => [
6771 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-prev-post-link i' => 'padding-right: {{SIZE}}{{UNIT}};',
6772 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-next-post-link i' => 'padding-left: {{SIZE}}{{UNIT}};',
6773 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-first-page i' => 'padding-right: {{SIZE}}{{UNIT}};',
6774 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-prev-page i' => 'padding-right: {{SIZE}}{{UNIT}};',
6775 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-next-page i' => 'padding-left: {{SIZE}}{{UNIT}};',
6776 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-last-page i' => 'padding-left: {{SIZE}}{{UNIT}};',
6777 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-prev-post-link svg' => 'margin-right: {{SIZE}}{{UNIT}};',
6778 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-next-post-link svg' => 'margin-left: {{SIZE}}{{UNIT}};',
6779 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-first-page svg' => 'margin-right: {{SIZE}}{{UNIT}};',
6780 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-prev-page svg' => 'margin-right: {{SIZE}}{{UNIT}};',
6781 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-next-page svg' => 'margin-left: {{SIZE}}{{UNIT}};',
6782 + '{{WRAPPER}} .king-addons-grid-pagination .king-addons-last-page svg' => 'margin-left: {{SIZE}}{{UNIT}};',
6783 + ],
6784 + ]
6785 + );
6786 +
6787 + $this->add_responsive_control(
6788 + 'pagination_padding',
6789 + [
6790 + 'label' => esc_html__('Padding', 'king-addons'),
6791 + 'type' => Controls_Manager::DIMENSIONS,
6792 + 'size_units' => ['px'],
6793 + 'default' => [
6794 + 'top' => 8,
6795 + 'right' => 15,
6796 + 'bottom' => 8,
6797 + 'left' => 15,
6798 + ],
6799 + 'selectors' => [
6800 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6801 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6802 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-disabled-arrow' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6803 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6804 + ],
6805 + ]
6806 + );
6807 +
6808 + $this->add_responsive_control(
6809 + 'pagination_wrapper_padding',
6810 + [
6811 + 'label' => esc_html__('Wrapper Padding', 'king-addons'),
6812 + 'type' => Controls_Manager::DIMENSIONS,
6813 + 'size_units' => ['px'],
6814 + 'default' => [
6815 + 'top' => 0,
6816 + 'right' => 0,
6817 + 'bottom' => 0,
6818 + 'left' => 0,
6819 + ],
6820 + 'selectors' => [
6821 + '{{WRAPPER}} .king-addons-grid-pagination' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6822 + ],
6823 + ]
6824 + );
6825 +
6826 + $this->add_control(
6827 + 'pagination_radius',
6828 + [
6829 + 'label' => esc_html__('Border Radius', 'king-addons'),
6830 + 'type' => Controls_Manager::DIMENSIONS,
6831 + 'size_units' => ['px', '%'],
6832 + 'default' => [
6833 + 'top' => 3,
6834 + 'right' => 3,
6835 + 'bottom' => 3,
6836 + 'left' => 3,
6837 + ],
6838 + 'selectors' => [
6839 + '{{WRAPPER}} .king-addons-grid-pagination a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6840 + '{{WRAPPER}} .king-addons-grid-pagination > div > span' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6841 + '{{WRAPPER}} .king-addons-grid-pagination span.king-addons-grid-current-page' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
6842 + ],
6843 + 'separator' => 'before',
6844 + ]
6845 + );
6846 +
6847 +
6848 +
6849 +
6850 +$this->end_controls_section();
6851 +
6852 +
6853 +
6854 + }
6855 +
6856 + public function get_related_taxonomies()
6857 + {
6858 + $relations = [];
6859 + foreach (Core::getCustomTypes('post', false) as $slug => $title) {
6860 + $relations[$slug] = get_object_taxonomies($slug);
6861 + }
6862 + return json_encode($relations);
6863 + }
6864 +
6865 + public function get_max_num_pages()
6866 + {
6867 + $settings = $this->get_settings_for_display();
6868 +
6869 + if ('manual' === ($settings['query_selection'] ?? '')) {
6870 + return $this->get_manual_media_max_num_pages($settings);
6871 + }
6872 +
6873 + $query = new WP_Query($this->get_main_query_args());
6874 + $pages = (int) ceil($query->max_num_pages);
6875 + wp_reset_postdata();
6876 +
6877 + return $pages;
6878 + }
6879 +
6880 + /**
6881 + * Returns the total page count for manual media items.
6882 + *
6883 + * @param array|null $settings Widget settings.
6884 + * @return int Total number of pages.
6885 + */
6886 + public function get_manual_media_max_num_pages($settings = null)
6887 + {
6888 + $settings = $settings ?? $this->get_settings_for_display();
6889 + $items = $this->get_manual_media_items($settings);
6890 + $total = count($items);
6891 + $per_page = (int) ($settings['query_posts_per_page'] ?? 10);
6892 +
6893 + if ($per_page <= 0 || 0 === $total) {
6894 + return 1;
6895 + }
6896 +
6897 + $offset = empty($settings['query_offset']) ? 0 : (int) $settings['query_offset'];
6898 + $remaining = max(0, $total - $offset);
6899 +
6900 + return max(1, (int) ceil($remaining / $per_page));
6901 + }
6902 +
6903 + /**
6904 + * Returns manual media items for the current pagination page.
6905 + *
6906 + * @param array $settings Widget settings.
6907 + * @return array<int, array<string, mixed>> Paginated manual media items.
6908 + */
6909 + public function get_paginated_manual_media_items($settings)
6910 + {
6911 + $items = $this->get_manual_media_items($settings);
6912 + $per_page = (int) ($settings['query_posts_per_page'] ?? 10);
6913 +
6914 + if ($per_page <= 0) {
6915 + return $items;
6916 + }
6917 +
6918 + $paged = get_query_var('paged') ? (int) get_query_var('paged') : ((int) get_query_var('page') ?: 1);
6919 + $offset = empty($settings['query_offset']) ? 0 : (int) $settings['query_offset'];
6920 + $slice_offset = $offset + ($paged - 1) * $per_page;
6921 +
6922 + return array_slice($items, $slice_offset, $per_page);
6923 + }
6924 +
6925 + /**
6926 + * Checks whether an attachment is a video file.
6927 + *
6928 + * @param int $attachment_id Attachment post ID.
6929 + * @return bool True when the attachment mime type is video.
6930 + */
6931 + public function is_video_attachment($attachment_id)
6932 + {
6933 + $mime_type = get_post_mime_type($attachment_id);
6934 +
6935 + return is_string($mime_type) && 0 === strpos($mime_type, 'video/');
6936 + }
6937 +
6938 + /**
6939 + * Returns a video mime type based on the file extension.
6940 + *
6941 + * @param string $url Video file URL.
6942 + * @return string Video mime type.
6943 + */
6944 + public function get_video_mime_from_url($url)
6945 + {
6946 + $extension = strtolower((string) pathinfo((string) wp_parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION));
6947 + $map = [
6948 + 'mp4' => 'video/mp4',
6949 + 'webm' => 'video/webm',
6950 + 'ogg' => 'video/ogg',
6951 + 'ogv' => 'video/ogg',
6952 + ];
6953 +
6954 + return $map[$extension] ?? 'video/mp4';
6955 + }
6956 +
6957 + /**
6958 + * Returns a poster image URL for a video attachment when available.
6959 + *
6960 + * @param int $attachment_id Video attachment ID.
6961 + * @return string Poster image URL or an empty string.
6962 + */
6963 + public function get_attachment_video_poster_url($attachment_id)
6964 + {
6965 + $image_src = wp_get_attachment_image_src($attachment_id, 'large');
6966 + if (!empty($image_src[0])) {
6967 + return $image_src[0];
6968 + }
6969 +
6970 + $metadata = wp_get_attachment_metadata($attachment_id);
6971 + if (!empty($metadata['image']['file']) && !empty($metadata['file'])) {
6972 + $upload_dir = wp_upload_dir();
6973 +
6974 + return trailingslashit($upload_dir['baseurl']) . trailingslashit(dirname($metadata['file'])) . $metadata['image']['file'];
6975 + }
6976 +
6977 + return '';
6978 + }
6979 +
6980 + /**
6981 + * Builds manual media items from the repeater or legacy gallery control.
6982 + *
6983 + * @param array $settings Widget settings.
6984 + * @return array<int, array<string, mixed>> Manual media items.
6985 + */
6986 + public function get_manual_media_items($settings)
6987 + {
6988 + $items = [];
6989 +
6990 + if (!empty($settings['query_manual_media'])) {
6991 + foreach ($settings['query_manual_media'] as $index => $row) {
6992 + $item_type = $row['item_type'] ?? 'image';
6993 + $item_image = $row['item_image'] ?? [];
6994 + $item_video = $row['item_video'] ?? [];
6995 +
6996 + if ('video' === $item_type) {
6997 + if (empty($item_video['url'])) {
6998 + continue;
6999 + }
7000 + if (empty($item_image['id']) && empty($item_image['url'])) {
7001 + continue;
7002 + }
7003 + } elseif (empty($item_image['id']) && empty($item_image['url'])) {
7004 + continue;
7005 + }
7006 +
7007 + $items[] = [
7008 + 'key' => 'manual-' . $index,
7009 + 'type' => $item_type,
7010 + 'image' => $item_image,
7011 + 'video' => $item_video,
7012 + ];
7013 + }
7014 +
7015 + return $items;
7016 + }
7017 +
7018 + if (empty($settings['query_manual_attachment'])) {
7019 + return $items;
7020 + }
7021 +
7022 + foreach ($settings['query_manual_attachment'] as $index => $attachment) {
7023 + if (empty($attachment['id'])) {
7024 + continue;
7025 + }
7026 +
7027 + $items[] = [
7028 + 'key' => 'legacy-' . $index,
7029 + 'type' => 'image',
7030 + 'image' => $attachment,
7031 + 'video' => [],
7032 + ];
7033 + }
7034 +
7035 + return $items;
7036 + }
7037 +
7038 + /**
7039 + * Renders the play icon overlay for video gallery items.
7040 + *
7041 + * @param array $settings Widget settings.
7042 + * @return void
7043 + */
7044 + public function render_video_play_icon($settings)
7045 + {
7046 + echo '<span class="king-addons-grid-video-play-icon" aria-hidden="true">';
7047 + Icons_Manager::render_icon($settings['video_play_icon'], ['aria-hidden' => 'true']);
7048 + echo '</span>';
7049 + }
7050 +
7051 + /**
7052 + * Renders a hidden HTML5 video element referenced by the lightbox.
7053 + *
7054 + * @param string $video_url Video file URL.
7055 + * @param string $element_id Hidden container element ID.
7056 + * @return void
7057 + */
7058 + public function render_video_html_element($video_url, $element_id)
7059 + {
7060 + if ('' === $video_url) {
7061 + return;
7062 + }
7063 +
7064 + echo '<div class="king-addons-grid-video-html" id="' . esc_attr($element_id) . '" style="display:none;">';
7065 + echo '<video class="lg-video-object lg-html5" controls preload="none" playsinline>';
7066 + echo '<source src="' . esc_url($video_url) . '" type="' . esc_attr($this->get_video_mime_from_url($video_url)) . '">';
7067 + echo '</video>';
7068 + echo '</div>';
7069 + }
7070 +
7071 + /**
7072 + * Renders a gallery media thumbnail for image or video items.
7073 + *
7074 + * @param array $settings Widget settings.
7075 + * @param string $item_key Unique item key for lightbox video references.
7076 + * @param string $media_type Media type: image or video.
7077 + * @param array $image_data Image or cover attachment data.
7078 + * @param string $video_url Video file URL for video items.
7079 + * @return void
7080 + */
7081 + public function render_media_thumbnail($settings, $item_key, $media_type, $image_data, $video_url = '')
7082 + {
7083 + $image_id = !empty($image_data['id']) ? (int) $image_data['id'] : 0;
7084 + $is_video = ('video' === $media_type && '' !== $video_url);
7085 + $video_html_id = 'king-addons-grid-video-' . $this->get_id() . '-' . $item_key;
7086 +
7087 + if ($image_id) {
7088 + $src = Group_Control_Image_Size::get_attachment_image_src($image_id, 'layout_image_crop', $settings);
7089 + $alt = ('' === wp_get_attachment_caption($image_id)) ? get_the_title($image_id) : wp_get_attachment_caption($image_id);
7090 + $lightbox_src = $is_video ? $src : wp_get_attachment_url($image_id);
7091 + } else {
7092 + $src = $image_data['url'] ?? '';
7093 + $alt = '';
7094 + $lightbox_src = $src;
7095 + }
7096 +
7097 + if ($is_video && '' === $src && $image_id) {
7098 + $src = $this->get_attachment_video_poster_url($image_id);
7099 + }
7100 +
7101 + if ($is_video) {
7102 + $lightbox_src = '' !== $src ? $src : $video_url;
7103 + }
7104 +
7105 + $wrap_classes = 'king-addons-grid-image-wrap';
7106 + if ($is_video) {
7107 + $wrap_classes .= ' king-addons-grid-video-lightbox-item';
7108 + }
7109 +
7110 + echo '<div class="' . esc_attr($wrap_classes) . '" data-src="' . esc_url($lightbox_src) . '"';
7111 + if ($is_video) {
7112 + echo ' data-poster="' . esc_url($lightbox_src) . '"';
7113 + echo ' data-html="#' . esc_attr($video_html_id) . '"';
7114 + echo ' data-kng-video-url="' . esc_url($video_url) . '"';
7115 + }
7116 + echo '>';
7117 +
7118 + if ('' !== $src) {
7119 + echo '<img src="' . esc_url($src) . '" alt="' . esc_attr($alt) . '" class="king-addons-animation-timing-' . esc_attr($settings['image_effects_animation_timing']) . '">';
7120 + } elseif ($is_video) {
7121 + echo '<span class="king-addons-grid-video-cover-placeholder" aria-hidden="true"></span>';
7122 + }
7123 +
7124 + if ($is_video) {
7125 + $this->render_video_play_icon($settings);
7126 + }
7127 +
7128 + echo '</div>';
7129 +
7130 + if ($is_video) {
7131 + $this->render_video_html_element($video_url, $video_html_id);
7132 + }
7133 + }
7134 +
7135 + /**
7136 + * Renders one gallery article for manual media items.
7137 + *
7138 + * @param array $settings Widget settings.
7139 + * @param array $item Manual media item data.
7140 + * @return void
7141 + */
7142 + public function render_manual_grid_item($settings, $item)
7143 + {
7144 + $item_type = $item['type'] ?? 'image';
7145 + $video_url = ('video' === $item_type && !empty($item['video']['url'])) ? $item['video']['url'] : '';
7146 + $post_id = !empty($item['image']['id']) ? (int) $item['image']['id'] : 0;
7147 + $item_classes = ['king-addons-grid-item', 'elementor-clearfix'];
7148 +
7149 + if ('video' === $item_type) {
7150 + $item_classes[] = 'king-addons-grid-item-video';
7151 + }
7152 +
7153 + echo '<article class="' . esc_attr(implode(' ', $item_classes)) . '">';
7154 + echo '<div class="king-addons-grid-item-inner">';
7155 + $this->get_elements_by_location('above', $settings, $post_id);
7156 + echo '<div class="king-addons-grid-media-wrap' . esc_attr($this->get_image_effect_class($settings)) . '">';
7157 + $this->render_media_thumbnail($settings, $item['key'], $item_type, $item['image'] ?? [], $video_url);
7158 + echo '<div class="king-addons-grid-media-hover king-addons-animation-wrap">';
7159 + $this->render_media_overlay($settings, $post_id);
7160 + $this->get_elements_by_location('over', $settings, $post_id);
7161 + echo '</div></div>';
7162 + $this->get_elements_by_location('below', $settings, $post_id);
7163 + echo '</div></article>';
7164 + }
7165 +
7166 + public function get_main_query_args()
7167 + {
7168 + $s = $this->get_settings_for_display();
7169 + $author = !empty($s['query_author']) ? implode(',', $s['query_author']) : '';
7170 + $paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
7171 + $offset = ($paged - 1) * Core::jsNumber($s, 'query_posts_per_page', 10)
7172 + + (empty($s['query_offset']) ? 0 : Core::jsNumber($s, 'query_offset', 0));
7173 +
7174 + // Remove premium-only randomize if not available
7175 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7176 + $s['query_randomize'] = '';
7177 + $s['order_posts'] = 'date';
7178 + }
7179 + $order_by = $s['query_randomize'] !== '' ? $s['query_randomize'] : $s['order_posts'];
7180 + if ('manual' === $s['query_selection']) {
7181 + $order_by = 'post__in';
7182 + }
7183 +
7184 + $include_videos = !empty($s['query_include_videos']);
7185 + $post_mime_type = $include_videos ? ['image', 'video'] : 'image';
7186 +
7187 + $args = [
7188 + 'post_type' => 'attachment',
7189 + 'post_mime_type' => $post_mime_type,
7190 + 'post_status' => 'inherit',
7191 + 'tax_query' => $this->get_tax_query_args(),
7192 + 'post__not_in' => $s['query_exclude_attachment'],
7193 + 'posts_per_page' => $s['query_posts_per_page'],
7194 + 'orderby' => $order_by,
7195 + 'author' => $author,
7196 + 'paged' => $paged,
7197 + 'offset' => $offset
7198 + ];
7199 +
7200 + if ('manual' === $s['query_selection']) {
7201 + $post_ids = [];
7202 +
7203 + if (!empty($s['query_manual_media'])) {
7204 + foreach ($this->get_manual_media_items($s) as $item) {
7205 + if (!empty($item['image']['id'])) {
7206 + $post_ids[] = (int) $item['image']['id'];
7207 + }
7208 + }
7209 + } elseif (!empty($s['query_manual_attachment'])) {
7210 + foreach ($s['query_manual_attachment'] as $attachment) {
7211 + $post_ids[] = $attachment['id'];
7212 + }
7213 + }
7214 +
7215 + if (empty($post_ids)) {
7216 + $post_ids = [0];
7217 + }
7218 +
7219 + $orderby = ('' === $s['query_randomize']) ? 'post__in' : 'rand';
7220 + $args = [
7221 + 'post_type' => 'attachment',
7222 + 'post_mime_type' => $post_mime_type,
7223 + 'post_status' => 'inherit',
7224 + 'post__in' => $post_ids,
7225 + 'orderby' => $orderby,
7226 + 'posts_per_page' => $s['query_posts_per_page'],
7227 + 'paged' => $paged
7228 + ];
7229 + }
7230 + if ('rand' !== $order_by && 'manual' !== $s['query_selection']) {
7231 + $args['order'] = $s['order_direction'];
7232 + }
7233 + return $args;
7234 + }
7235 +
7236 + public function get_tax_query_args()
7237 + {
7238 + $s = $this->get_settings();
7239 + $tax_query = [];
7240 + foreach (get_object_taxonomies('attachment') as $tax) {
7241 + if (!empty($s['query_taxonomy_' . $tax])) {
7242 + $tax_query[] = [
7243 + 'taxonomy' => $tax,
7244 + 'field' => 'id',
7245 + 'terms' => $s['query_taxonomy_' . $tax]
7246 + ];
7247 + }
7248 + }
7249 + return $tax_query;
7250 + }
7251 +
7252 + public function get_animation_class($data, $object)
7253 + {
7254 + $animation = Grid_Ajax_Security::sanitize_animation($data[$object . '_animation'] ?? 'none');
7255 + if ('none' === $animation) {
7256 + return '';
7257 + }
7258 +
7259 + $class = ' king-addons-' . sanitize_html_class((string) $object) . '-' . $animation;
7260 + $class .= ' king-addons-anim-size-' . Grid_Ajax_Security::sanitize_animation_size($data[$object . '_animation_size'] ?? 'large');
7261 + $class .= ' king-addons-animation-timing-' . Grid_Ajax_Security::sanitize_animation_timing($data[$object . '_animation_timing'] ?? 'ease-default');
7262 +
7263 + if ('yes' === Grid_Ajax_Security::sanitize_yes_no_switcher($data[$object . '_animation_tr'] ?? '')) {
7264 + $class .= ' king-addons-anim-transparency';
7265 + }
7266 +
7267 + return $class;
7268 + }
7269 +
7270 + public function get_image_effect_class($s)
7271 + {
7272 + $class = '';
7273 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7274 + if (in_array($s['image_effects'], ['pro-zi', 'pro-zo', 'pro-go', 'pro-bo'])) {
7275 + $s['image_effects'] = 'none';
7276 + }
7277 + }
7278 + if ('none' !== $s['image_effects']) {
7279 + $class .= ' king-addons-' . $s['image_effects'];
7280 + }
7281 + if ('slide' !== $s['image_effects']) {
7282 + $class .= ' king-addons-effect-size-' . $s['image_effects_size'];
7283 + } else {
7284 + $class .= ' king-addons-effect-dir-' . $s['image_effects_direction'];
7285 + }
7286 + return $class;
7287 + }
7288 +
7289 + public function render_post_thumbnail($settings)
7290 + {
7291 + $id = get_the_ID();
7292 + $is_video = $this->is_video_attachment($id);
7293 + $video_url = $is_video ? (string) wp_get_attachment_url($id) : '';
7294 +
7295 + $this->render_media_thumbnail(
7296 + $settings,
7297 + 'attachment-' . $id,
7298 + $is_video ? 'video' : 'image',
7299 + ['id' => $id],
7300 + $video_url
7301 + );
7302 + }
7303 +
7304 + public function render_media_overlay($s, $post_id = 0)
7305 + {
7306 + if (!$post_id) {
7307 + $post_id = get_the_ID();
7308 + }
7309 +
7310 + $overlay_url = $post_id ? get_the_permalink($post_id) : '#';
7311 + echo '<div class="king-addons-grid-media-hover-bg ' . esc_attr($this->get_animation_class($s, 'overlay')) . '" data-url="' . esc_url($overlay_url) . '">';
7312 + if (king_addons_freemius()->can_use_premium_code__premium_only()) {
7313 + if ('' !== $s['overlay_image']['url']) {
7314 + echo '<img src="' . esc_url($s['overlay_image']['url']) . '">';
7315 + }
7316 + }
7317 + echo '</div>';
7318 + }
7319 +
7320 + public function render_post_title($settings, $class)
7321 + {
7322 + $title_pointer = !king_addons_freemius()->can_use_premium_code__premium_only() ? 'none' : $this->get_settings()['title_pointer'];
7323 + $title_pointer_animation = !king_addons_freemius()->can_use_premium_code__premium_only() ? 'fade' : $this->get_settings()['title_pointer_animation'];
7324 + $pointer_item_class = (isset($this->get_settings()['title_pointer']) && 'none' !== $this->get_settings()['title_pointer']) ? 'class="king-addons-pointer-item"' : '';
7325 + $class .= ' king-addons-pointer-' . $title_pointer . ' king-addons-pointer-line-fx king-addons-pointer-fx-' . $title_pointer_animation;
7326 +
7327 + $tags_whitelist = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'span', 'p'];
7328 + $element_title_tag = Core::validateHTMLTags($settings['element_title_tag'], 'h2', $tags_whitelist);
7329 +
7330 + echo '<' . esc_attr($element_title_tag) . ' class="' . esc_attr($class) . '">';
7331 + echo '<div class="inner-block">';
7332 + if ('yes' === $settings['element_disable_link']) {
7333 + echo '<span ' . $pointer_item_class . '>' . esc_html(wp_trim_words(get_the_title(), $settings['element_word_count'])) . '</span>';
7334 + } else {
7335 + echo '<a ' . $pointer_item_class . ' href="' . esc_url(get_the_permalink()) . '">';
7336 + echo esc_html(wp_trim_words(get_the_title(), $settings['element_word_count']));
7337 + echo '</a>';
7338 + }
7339 + echo '</div>';
7340 + echo '</' . esc_attr($element_title_tag) . '>';
7341 + }
7342 +
7343 + public function render_post_excerpt($s, $class)
7344 + {
7345 + $dropcap_class = ('yes' === $s['element_dropcap']) ? ' king-addons-enable-dropcap' : '';
7346 + $class .= $dropcap_class;
7347 + if ('' === get_the_excerpt()) return;
7348 + echo '<div class="' . esc_attr($class) . '"><div class="inner-block">';
7349 + echo '<p>' . esc_html(wp_trim_words(get_the_excerpt(), $s['element_word_count'])) . '</p>';
7350 + echo '</div></div>';
7351 + }
7352 +
7353 + public function render_post_date($s, $class)
7354 + {
7355 + echo '<div class="' . esc_attr($class) . '"><div class="inner-block"><span>';
7356 + if ('before' === $s['element_extra_text_pos']) {
7357 + echo '<span class="king-addons-grid-extra-text-left">' . esc_html($s['element_extra_text']) . '</span>';
7358 + }
7359 + if ('before' === $s['element_extra_icon_pos']) {
7360 + ob_start();
7361 + Icons_Manager::render_icon($s['element_extra_icon'], ['aria-hidden' => 'true']);
7362 + $extra_icon = ob_get_clean();
7363 + echo '<span class="king-addons-grid-extra-icon-left">' . $extra_icon . '</span>';
7364 + }
7365 + echo esc_html(apply_filters('the_date', get_the_date(), get_option('date_format'), '', ''));
7366 + if ('after' === $s['element_extra_icon_pos']) {
7367 + ob_start();
7368 + Icons_Manager::render_icon($s['element_extra_icon'], ['aria-hidden' => 'true']);
7369 + $extra_icon = ob_get_clean();
7370 + echo '<span class="king-addons-grid-extra-icon-right">' . $extra_icon . '</span>';
7371 + }
7372 + if ('after' === $s['element_extra_text_pos']) {
7373 + echo '<span class="king-addons-grid-extra-text-right">' . esc_html($s['element_extra_text']) . '</span>';
7374 + }
7375 + echo '</span></div></div>';
7376 + }
7377 +
7378 + public function render_post_time($s, $class)
7379 + {
7380 + echo '<div class="' . esc_attr($class) . '"><div class="inner-block"><span>';
7381 + if ('before' === $s['element_extra_text_pos']) {
7382 + echo '<span class="king-addons-grid-extra-text-left">' . esc_html($s['element_extra_text']) . '</span>';
7383 + }
7384 + if ('before' === $s['element_extra_icon_pos']) {
7385 + ob_start();
7386 + Icons_Manager::render_icon($s['element_extra_icon'], ['aria-hidden' => 'true']);
7387 + $extra_icon = ob_get_clean();
7388 + echo '<span class="king-addons-grid-extra-icon-left">' . $extra_icon . '</span>';
7389 + }
7390 + echo esc_html(get_the_time());
7391 + if ('after' === $s['element_extra_icon_pos']) {
7392 + ob_start();
7393 + Icons_Manager::render_icon($s['element_extra_icon'], ['aria-hidden' => 'true']);
7394 + $extra_icon = ob_get_clean();
7395 + echo '<span class="king-addons-grid-extra-icon-right">' . $extra_icon . '</span>';
7396 + }
7397 + if ('after' === $s['element_extra_text_pos']) {
7398 + echo '<span class="king-addons-grid-extra-text-right">' . esc_html($s['element_extra_text']) . '</span>';
7399 + }
7400 + echo '</span></div></div>';
7401 + }
7402 +
7403 + public function render_post_author($s, $class)
7404 + {
7405 + $author_id = get_post_field('post_author');
7406 + echo '<div class="' . esc_attr($class) . '"><div class="inner-block">';
7407 + if ('before' === $s['element_extra_text_pos']) {
7408 + echo '<span class="king-addons-grid-extra-text-left">' . esc_html($s['element_extra_text']) . '</span>';
7409 + }
7410 + echo '<a href="' . esc_url(get_author_posts_url($author_id)) . '">';
7411 + if ('before' === $s['element_extra_icon_pos']) {
7412 + ob_start();
7413 + Icons_Manager::render_icon($s['element_extra_icon'], ['aria-hidden' => 'true']);
7414 + $extra_icon = ob_get_clean();
7415 + echo '<span class="king-addons-grid-extra-icon-left">' . $extra_icon . '</span>';
7416 + }
7417 + if ('yes' === $s['element_show_avatar']) {
7418 + echo get_avatar($author_id, $s['element_avatar_size']);
7419 + }
7420 + echo '<span>' . esc_html(get_the_author_meta('display_name', $author_id)) . '</span>';
7421 + if ('after' === $s['element_extra_icon_pos']) {
7422 + ob_start();
7423 + Icons_Manager::render_icon($s['element_extra_icon'], ['aria-hidden' => 'true']);
7424 + $extra_icon = ob_get_clean();
7425 + echo '<span class="king-addons-grid-extra-icon-right">' . $extra_icon . '</span>';
7426 + }
7427 + echo '</a>';
7428 + if ('after' === $s['element_extra_text_pos']) {
7429 + echo '<span class="king-addons-grid-extra-text-right">' . esc_html($s['element_extra_text']) . '</span>';
7430 + }
7431 + echo '</div></div>';
7432 + }
7433 +
7434 + public function render_post_likes($s, $class, $post_id)
7435 + {
7436 + // Intentionally empty in the original
7437 + }
7438 +
7439 + public function render_post_sharing_icons($s, $class)
7440 + {
7441 + // Intentionally empty in the original
7442 + }
7443 +
7444 + public function render_post_lightbox($s, $class, $post_id)
7445 + {
7446 + echo '<div class="' . esc_attr($class) . '"><div class="inner-block">';
7447 + $lightbox_source = get_the_post_thumbnail_url($post_id);
7448 +
7449 + if ($this->is_video_attachment($post_id)) {
7450 + $lightbox_source = $this->get_attachment_video_poster_url($post_id);
7451 + } elseif ('audio' === get_post_format()) {
7452 + if ('meta' === $s['element_lightbox_pfa_select']) {
7453 + $meta_value = get_post_meta($post_id, $s['element_lightbox_pfa_meta'], true);
7454 + if (false === strpos($meta_value, '<iframe ')) {
7455 + add_filter('oembed_result', $media_grid_filter = function ($html) {
7456 + preg_match('/<iframe.*src=\"(.*)\".*><\/iframe>/isU', $html, $m);
7457 + return $m[1] . '&auto_play=true';
7458 + }, 50, 3);
7459 + $track_url = wp_oembed_get($meta_value);
7460 + remove_filter('oembed_result', $media_grid_filter, 50);
7461 + } else {
7462 + $track_url = Core::filterOembedResults($meta_value);
7463 + }
7464 + $lightbox_source = $track_url;
7465 + }
7466 + } elseif ('video' === get_post_format()) {
7467 + if ('meta' === $s['element_lightbox_pfv_select']) {
7468 + $meta_value = get_post_meta($post_id, $s['element_lightbox_pfv_meta'], true);
7469 + if (false === strpos($meta_value, '<iframe ')) {
7470 + $video = Embed::get_video_properties($meta_value);
7471 + } else {
7472 + $video = Embed::get_video_properties(Core::filterOembedResults($meta_value));
7473 + }
7474 + if ('youtube' === $video['provider']) {
7475 + $video_url = 'https://www.youtube.com/embed/' . $video['video_id'] . '?feature=oembed&autoplay=1&controls=1';
7476 + } elseif ('vimeo' === $video['provider']) {
7477 + $video_url = 'https://player.vimeo.com/video/' . $video['video_id'] . '?autoplay=1#t=0';
7478 + }
7479 + if (isset($video_url)) $lightbox_source = $video_url;
7480 + }
7481 + }
7482 + if (!$lightbox_source && !$this->is_video_attachment($post_id)) {
7483 + $lightbox_source = wp_get_attachment_url($post_id);
7484 + }
7485 + echo '<span data-src="' . esc_url($lightbox_source) . '">';
7486 + if ('before' === $s['element_extra_text_pos']) {
7487 + echo '<span class="king-addons-grid-extra-text-left">' . esc_html($s['element_extra_text']) . '</span>';
7488 + }
7489 + echo '<i class="' . esc_attr($s['element_extra_icon']['value']) . '"></i>';
7490 + if ('after' === $s['element_extra_text_pos']) {
7491 + echo '<span class="king-addons-grid-extra-text-right">' . esc_html($s['element_extra_text']) . '</span>';
7492 + }
7493 + echo '</span>';
7494 + if ('yes' === $s['element_lightbox_overlay']) {
7495 + echo '<div class="king-addons-grid-lightbox-overlay"></div>';
7496 + }
7497 + echo '</div></div>';
7498 + }
7499 +
7500 + public function render_post_element_separator($s, $class)
7501 + {
7502 + echo '<div class="' . esc_attr($class . ' ' . $s['element_separator_style']) . '">';
7503 + echo '<div class="inner-block"><span></span></div></div>';
7504 + }
7505 +
7506 + public function render_post_taxonomies($settings, $class, $post_id)
7507 + {
7508 + $terms = wp_get_post_terms($post_id, $settings['element_select']);
7509 + $count = 0;
7510 +
7511 + $tax1_pointer = !king_addons_freemius()->can_use_premium_code__premium_only() ? 'none' : $this->get_settings()['tax1_pointer'];
7512 + $tax1_pointer_animation = !king_addons_freemius()->can_use_premium_code__premium_only() ? 'fade' : $this->get_settings()['tax1_pointer_animation'];
7513 + $tax2_pointer = !king_addons_freemius()->can_use_premium_code__premium_only() ? 'none' : $this->get_settings()['tax2_pointer'];
7514 + $tax2_pointer_animation = !king_addons_freemius()->can_use_premium_code__premium_only() ? 'fade' : $this->get_settings()['tax2_pointer_animation'];
7515 + $pointer_item_class = ('none' !== $tax1_pointer || 'none' !== $tax2_pointer) ? 'class="king-addons-pointer-item"' : '';
7516 +
7517 + if ('king-addons-grid-tax-style-1' === $settings['element_tax_style']) {
7518 + $class .= ' king-addons-pointer-' . $tax1_pointer . ' king-addons-pointer-line-fx king-addons-pointer-fx-' . $tax1_pointer_animation;
7519 + } else {
7520 + $class .= ' king-addons-pointer-' . $tax2_pointer . ' king-addons-pointer-line-fx king-addons-pointer-fx-' . $tax2_pointer_animation;
7521 + }
7522 +
7523 + echo '<div class="' . esc_attr($class . ' ' . $settings['element_tax_style']) . '">';
7524 + echo '<div class="inner-block">';
7525 +
7526 + if ('before' === $settings['element_extra_text_pos']) {
7527 + echo '<span class="king-addons-grid-extra-text-left">' . esc_html($settings['element_extra_text']) . '</span>';
7528 + }
7529 + if ('before' === $settings['element_extra_icon_pos']) {
7530 + ob_start();
7531 + Icons_Manager::render_icon($settings['element_extra_icon'], ['aria-hidden' => 'true']);
7532 + $extra_icon = ob_get_clean();
7533 + echo '<span class="king-addons-grid-extra-icon-left">' . $extra_icon . '</span>';
7534 + }
7535 +
7536 + foreach ($terms as $term) {
7537 + echo '<a ' . $pointer_item_class . ' href="' . esc_url(get_term_link($term->term_id)) . '">' . esc_html($term->name);
7538 + if (++$count !== count($terms)) {
7539 + echo '<span class="tax-sep">' . esc_html($settings['element_tax_sep']) . '</span>';
7540 + }
7541 + echo '</a>';
7542 + }
7543 +
7544 + if ('after' === $settings['element_extra_icon_pos']) {
7545 + ob_start();
7546 + Icons_Manager::render_icon($settings['element_extra_icon'], ['aria-hidden' => 'true']);
7547 + $extra_icon = ob_get_clean();
7548 + echo '<span class="king-addons-grid-extra-icon-right">' . $extra_icon . '</span>';
7549 + }
7550 + if ('after' === $settings['element_extra_text_pos']) {
7551 + echo '<span class="king-addons-grid-extra-text-right">' . esc_html($settings['element_extra_text']) . '</span>';
7552 + }
7553 + echo '</div></div>';
7554 + }
7555 +
7556 + public function get_elements($type, $settings, $class, $post_id)
7557 + {
7558 + if ('pro-lk' === $type || 'pro-shr' === $type) $type = 'title';
7559 + switch ($type) {
7560 + case 'title':
7561 + $this->render_post_title($settings, $class);
7562 + break;
7563 + case 'caption':
7564 + $this->render_post_excerpt($settings, $class);
7565 + break;
7566 + case 'date':
7567 + $this->render_post_date($settings, $class);
7568 + break;
7569 + case 'time':
7570 + $this->render_post_time($settings, $class);
7571 + break;
7572 + case 'author':
7573 + $this->render_post_author($settings, $class);
7574 + break;
7575 + case 'likes':
7576 + $this->render_post_likes($settings, $class, $post_id);
7577 + break;
7578 + case 'sharing':
7579 + $this->render_post_sharing_icons($settings, $class);
7580 + break;
7581 + case 'lightbox':
7582 + $this->render_post_lightbox($settings, $class, $post_id);
7583 + break;
7584 + case 'separator':
7585 + $this->render_post_element_separator($settings, $class);
7586 + break;
7587 + default:
7588 + $this->render_post_taxonomies($settings, $class, $post_id);
7589 + break;
7590 + }
7591 + }
7592 +
7593 + public function get_elements_by_location($location, $settings, $post_id)
7594 + {
7595 + $locations = [];
7596 + foreach ($settings['grid_elements'] as $data) {
7597 + $place = $data['element_location'];
7598 + $alignV = $data['element_align_vr'];
7599 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) $alignV = 'middle';
7600 + if (!isset($locations[$place])) $locations[$place] = [];
7601 + if ('over' === $place) {
7602 + if (!isset($locations[$place][$alignV])) $locations[$place][$alignV] = [];
7603 + $locations[$place][$alignV][] = $data;
7604 + } else {
7605 + $locations[$place][] = $data;
7606 + }
7607 + }
7608 + if (!empty($locations[$location])) {
7609 + if ('over' === $location) {
7610 + foreach ($locations[$location] as $align => $elements) {
7611 + if ('middle' === $align) {
7612 + echo '<div class="king-addons-cv-container"><div class="king-addons-cv-outer"><div class="king-addons-cv-inner">';
7613 + }
7614 + echo '<div class="king-addons-grid-media-hover-' . esc_attr($align) . ' elementor-clearfix">';
7615 + foreach ($elements as $data) {
7616 + $class = 'king-addons-grid-item-' . $data['element_select'] . ' elementor-repeater-item-' . $data['_id'];
7617 + $class .= ' king-addons-grid-item-display-' . $data['element_display'];
7618 + $class .= ' king-addons-grid-item-align-' . $data['element_align_hr'];
7619 + $class .= $this->get_animation_class($data, 'element');
7620 + $this->get_elements($data['element_select'], $data, $class, $post_id);
7621 + }
7622 + echo '</div>';
7623 + if ('middle' === $align) echo '</div></div></div>';
7624 + }
7625 + } else {
7626 + echo '<div class="king-addons-grid-item-' . esc_attr($location) . '-content elementor-clearfix">';
7627 + foreach ($locations[$location] as $data) {
7628 + $class = 'king-addons-grid-item-' . $data['element_select'] . ' elementor-repeater-item-' . $data['_id'];
7629 + $class .= ' king-addons-grid-item-display-' . $data['element_display'];
7630 + $class .= ' king-addons-grid-item-align-' . $data['element_align_hr'];
7631 + $this->get_elements($data['element_select'], $data, $class, $post_id);
7632 + }
7633 + echo '</div>';
7634 + }
7635 + }
7636 + }
7637 +
7638 + public function render_grid_filters($s)
7639 + {
7640 + $taxonomy = $s['filters_select'];
7641 + if ('' === $taxonomy || !isset($s['query_taxonomy_' . $taxonomy])) return;
7642 + $custom_filters = $s['query_taxonomy_' . $taxonomy];
7643 +
7644 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7645 + $s['filters_default_filter'] = '';
7646 + $s['filters_icon_align'] = '';
7647 + $s['filters_count'] = '';
7648 + $s['filters_pointer'] = 'none';
7649 + $s['filters_pointer_animation'] = 'none';
7650 + }
7651 +
7652 + $left_icon = ('left' === $s['filters_icon_align']) ? '<i class="' . esc_attr($s['filters_icon']['value']) . ' king-addons-grid-filters-icon-left"></i>' : '';
7653 + $right_icon = ('right' === $s['filters_icon_align']) ? '<i class="' . esc_attr($s['filters_icon']['value']) . ' king-addons-grid-filters-icon-right"></i>' : '';
7654 + $l_sep = ('left' === $s['filters_separator_align']) ? '<em class="king-addons-grid-filters-sep">' . esc_attr($s['filters_separator']) . '</em>' : '';
7655 + $r_sep = ('right' === $s['filters_separator_align']) ? '<em class="king-addons-grid-filters-sep">' . esc_attr($s['filters_separator']) . '</em>' : '';
7656 + $post_count = ('yes' === $s['filters_count']) ? '<sup data-brackets="' . esc_attr($s['filters_count_brackets']) . '"></sup>' : '';
7657 + $p_class = ' king-addons-pointer-' . $s['filters_pointer'] . ' king-addons-pointer-line-fx king-addons-pointer-fx-' . $s['filters_pointer_animation'];
7658 + $p_item_class = ('none' !== $s['filters_pointer']) ? 'king-addons-pointer-item' : '';
7659 +
7660 + echo '<ul class="king-addons-grid-filters elementor-clearfix king-addons-grid-filters-sep-' . esc_attr($s['filters_separator_align']) . '">';
7661 + if ('yes' === $s['filters_all'] && 'yes' !== $s['filters_linkable']) {
7662 + echo '<li class="' . esc_attr($p_class) . '">';
7663 + echo '<span data-filter="*" class="king-addons-active-filter ' . $p_item_class . '">' . $left_icon . esc_html($s['filters_all_text']) . $right_icon . $post_count . '</span>' . $r_sep;
7664 + echo '</li>';
7665 + }
7666 +
7667 + if ($s['query_selection'] === 'dynamic' && !empty($custom_filters)) {
7668 + $parent_filters = [];
7669 + foreach ($custom_filters as $term_id) {
7670 + $filter = get_term_by('id', $term_id, $taxonomy);
7671 + if (!$filter) continue;
7672 + $dataAttr = ('post_tag' === $taxonomy) ? 'tag-' . $filter->slug : $taxonomy . '-' . $filter->slug;
7673 + if (0 === $filter->parent) {
7674 + $children = get_term_children($filter->term_id, $taxonomy);
7675 + $dataRole = (!empty($children)) ? ' data-role="parent"' : '';
7676 + echo '<li' . $dataRole . ' class="' . esc_attr($p_class) . '">';
7677 + if ('yes' !== $s['filters_linkable']) {
7678 + echo $l_sep . '<span class="' . $p_item_class . '" data-filter=".' . esc_attr(urldecode($dataAttr)) . '">' . $left_icon . esc_html($filter->name) . $right_icon . $post_count . '</span>' . $r_sep;
7679 + } else {
7680 + echo $l_sep . '<a class="' . $p_item_class . '" href="' . esc_url(get_term_link($filter->term_id, $taxonomy)) . '">' . $left_icon . esc_html($filter->name) . $right_icon . $post_count . '</a>' . $r_sep;
7681 + }
7682 + echo '</li>';
7683 + } else {
7684 + $parent_filters[] = $filter->parent;
7685 + }
7686 + }
7687 + } else {
7688 + $all_filters = get_terms($taxonomy);
7689 + $parent_filters = [];
7690 + if (!is_wp_error($all_filters)) {
7691 + foreach ($all_filters as $filter) {
7692 + $dataAttr = ('post_tag' === $taxonomy) ? 'tag-' . $filter->slug : $taxonomy . '-' . $filter->slug;
7693 + if (0 === $filter->parent) {
7694 + $children = get_term_children($filter->term_id, $taxonomy);
7695 + $dataRole = (!empty($children)) ? ' data-role="parent"' : '';
7696 + echo '<li' . $dataRole . ' class="' . esc_attr($p_class) . '">';
7697 + if ('yes' !== $s['filters_linkable']) {
7698 + echo $l_sep . '<span class="' . $p_item_class . '" data-filter=".' . esc_attr(urldecode($dataAttr)) . '">' . $left_icon . esc_html($filter->name) . $right_icon . $post_count . '</span>' . $r_sep;
7699 + } else {
7700 + echo $l_sep . '<a class="' . $p_item_class . '" href="' . esc_url(get_term_link($filter->term_id, $taxonomy)) . '" data-filter=".' . esc_attr(urldecode($dataAttr)) . '">' . $left_icon . esc_html($filter->name) . $right_icon . $post_count . '</a>' . $r_sep;
7701 + }
7702 + echo '</li>';
7703 + } else {
7704 + $parent_filters[] = $filter->parent;
7705 + }
7706 + }
7707 + }
7708 + }
7709 +
7710 + if ('yes' !== $s['filters_linkable']) {
7711 + foreach (array_unique($parent_filters) as $parent_filter) {
7712 + $parent = get_term_by('id', $parent_filter, $taxonomy);
7713 + if (!$parent) continue;
7714 + $children = get_term_children($parent_filter, $taxonomy);
7715 + $dataAttr = ('post_tag' === $taxonomy) ? 'tag-' . $parent->slug : $taxonomy . '-' . $parent->slug;
7716 + echo '<ul data-parent=".' . esc_attr(urldecode($dataAttr)) . '" class="king-addons-sub-filters">';
7717 + echo '<li data-role="back" class="' . esc_attr($p_class) . '">';
7718 + echo '<span class="king-addons-back-filter" data-filter=".' . esc_attr(urldecode($dataAttr)) . '">';
7719 + echo '<i class="fas fa-long-arrow-alt-left"></i>&nbsp;&nbsp;' . esc_html__('Back', 'king-addons') . '</span></li>';
7720 + foreach ($children as $child) {
7721 + $sub_filter = get_term_by('id', $child, $taxonomy);
7722 + if (!$sub_filter) continue;
7723 + $dataAttr = ('post_tag' === $taxonomy) ? 'tag-' . $sub_filter->slug : $taxonomy . '-' . $sub_filter->slug;
7724 + echo '<li data-role="sub" class="' . esc_attr($p_class) . '">';
7725 + echo $l_sep . '<span class="' . $p_item_class . '" data-filter=".' . esc_attr(urldecode($dataAttr)) . '">' . $left_icon . esc_html($sub_filter->name) . $right_icon . $post_count . '</span>' . $r_sep;
7726 + echo '</li>';
7727 + }
7728 + echo '</ul>';
7729 + }
7730 + }
7731 + echo '</ul>';
7732 + }
7733 +
7734 + public function render_grid_pagination($s)
7735 + {
7736 + if ('yes' !== $s['layout_pagination'] || 1 === $this->get_max_num_pages() || 'slider' === $s['layout_select']) return;
7737 + global $paged;
7738 + $pages = $this->get_max_num_pages();
7739 + $paged = empty($paged) ? 1 : $paged;
7740 +
7741 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7742 + if ('pro-is' === $s['pagination_type']) $s['pagination_type'] = 'default';
7743 + }
7744 + echo '<div class="king-addons-grid-pagination elementor-clearfix king-addons-grid-pagination-' . esc_attr($s['pagination_type']) . '">';
7745 +
7746 + if ('default' === $s['pagination_type']) {
7747 + if ($paged < $pages) {
7748 + echo '<a href="' . esc_url(get_pagenum_link($paged + 1)) . '" class="king-addons-prev-post-link">';
7749 + echo Core::getIcon($s['pagination_on_icon'], 'left') . esc_html($s['pagination_older_text']) . '</a>';
7750 + } elseif ('yes' === $s['pagination_disabled_arrows']) {
7751 + echo '<span class="king-addons-prev-post-link king-addons-disabled-arrow">';
7752 + echo Core::getIcon($s['pagination_on_icon'], 'left') . esc_html($s['pagination_older_text']) . '</span>';
7753 + }
7754 + if ($paged > 1) {
7755 + echo '<a href="' . esc_url(get_pagenum_link($paged - 1)) . '" class="king-addons-next-post-link">';
7756 + echo esc_html($s['pagination_newer_text']) . Core::getIcon($s['pagination_on_icon'], 'right') . '</a>';
7757 + } elseif ('yes' === $s['pagination_disabled_arrows']) {
7758 + echo '<span class="king-addons-next-post-link king-addons-disabled-arrow">';
7759 + echo esc_html($s['pagination_newer_text']) . Core::getIcon($s['pagination_on_icon'], 'right') . '</span>';
7760 + }
7761 + } elseif ('numbered' === $s['pagination_type']) {
7762 + $range = $s['pagination_range'];
7763 + $showitems = ($range * 2) + 1;
7764 + if (1 !== $pages) {
7765 + if ('yes' === $s['pagination_prev_next'] || 'yes' === $s['pagination_first_last']) {
7766 + echo '<div class="king-addons-grid-pagination-left-arrows">';
7767 + if ('yes' === $s['pagination_first_last']) {
7768 + if ($paged >= 2) {
7769 + echo '<a href="' . esc_url(get_pagenum_link()) . '" class="king-addons-first-page">';
7770 + echo Core::getIcon($s['pagination_fl_icon'], 'left') . '<span>' . esc_html($s['pagination_first_text']) . '</span></a>';
7771 + } elseif ('yes' === $s['pagination_disabled_arrows']) {
7772 + echo '<span class="king-addons-first-page king-addons-disabled-arrow">';
7773 + echo Core::getIcon($s['pagination_fl_icon'], 'left') . '<span>' . esc_html($s['pagination_first_text']) . '</span></span>';
7774 + }
7775 + }
7776 + if ('yes' === $s['pagination_prev_next']) {
7777 + if ($paged > 1) {
7778 + echo '<a href="' . esc_url(get_pagenum_link($paged - 1)) . '" class="king-addons-prev-page">';
7779 + echo Core::getIcon($s['pagination_pn_icon'], 'left') . '<span>' . esc_html($s['pagination_prev_text']) . '</span></a>';
7780 + } elseif ('yes' === $s['pagination_disabled_arrows']) {
7781 + echo '<span class="king-addons-prev-page king-addons-disabled-arrow">';
7782 + echo Core::getIcon($s['pagination_pn_icon'], 'left') . '<span>' . esc_html($s['pagination_prev_text']) . '</span></span>';
7783 + }
7784 + }
7785 + echo '</div>';
7786 + }
7787 + for ($i = 1; $i <= $pages; $i++) {
7788 + if (1 !== $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) {
7789 + if ($paged === $i) {
7790 + echo '<span class="king-addons-grid-current-page">' . $i . '</span>';
7791 + } else {
7792 + echo '<a href="' . esc_url(get_pagenum_link($i)) . '">' . $i . '</a>';
7793 + }
7794 + }
7795 + }
7796 + if ('yes' === $s['pagination_prev_next'] || 'yes' === $s['pagination_first_last']) {
7797 + echo '<div class="king-addons-grid-pagination-right-arrows">';
7798 + if ('yes' === $s['pagination_prev_next']) {
7799 + if ($paged < $pages) {
7800 + echo '<a href="' . esc_url(get_pagenum_link($paged + 1)) . '" class="king-addons-next-page">';
7801 + echo '<span>' . esc_html($s['pagination_next_text']) . '</span>' . Core::getIcon($s['pagination_pn_icon'], 'right') . '</a>';
7802 + } elseif ('yes' === $s['pagination_disabled_arrows']) {
7803 + echo '<span class="king-addons-next-page king-addons-disabled-arrow">';
7804 + echo '<span>' . esc_html($s['pagination_next_text']) . '</span>' . Core::getIcon($s['pagination_pn_icon'], 'right') . '</span>';
7805 + }
7806 + }
7807 + if ('yes' === $s['pagination_first_last']) {
7808 + if ($paged <= $pages - 1) {
7809 + echo '<a href="' . esc_url(get_pagenum_link($pages)) . '" class="king-addons-last-page">';
7810 + echo '<span>' . esc_html($s['pagination_last_text']) . '</span>' . Core::getIcon($s['pagination_fl_icon'], 'right') . '</a>';
7811 + } elseif ('yes' === $s['pagination_disabled_arrows']) {
7812 + echo '<span class="king-addons-last-page king-addons-disabled-arrow">';
7813 + echo '<span>' . esc_html($s['pagination_last_text']) . '</span>' . Core::getIcon($s['pagination_fl_icon'], 'right') . '</span>';
7814 + }
7815 + }
7816 + echo '</div>';
7817 + }
7818 + }
7819 + } else {
7820 + echo '<a href="' . esc_url(get_pagenum_link($paged + 1)) . '" class="king-addons-load-more-btn" data-e-disable-page-transition>';
7821 + echo esc_html($s['pagination_load_more_text']) . '</a>';
7822 + echo '<div class="king-addons-pagination-loading">';
7823 + switch ($s['pagination_animation']) {
7824 + case 'loader-1':
7825 + echo '<div class="king-addons-double-bounce"><div class="king-addons-child king-addons-double-bounce1"></div><div class="king-addons-child king-addons-double-bounce2"></div></div>';
7826 + break;
7827 + case 'loader-2':
7828 + echo '<div class="king-addons-wave"><div class="king-addons-rect king-addons-rect1"></div><div class="king-addons-rect king-addons-rect2"></div><div class="king-addons-rect king-addons-rect3"></div><div class="king-addons-rect king-addons-rect4"></div><div class="king-addons-rect king-addons-rect5"></div></div>';
7829 + break;
7830 + case 'loader-3':
7831 + echo '<div class="king-addons-spinner king-addons-spinner-pulse"></div>';
7832 + break;
7833 + case 'loader-4':
7834 + echo '<div class="king-addons-chasing-dots"><div class="king-addons-child king-addons-dot1"></div><div class="king-addons-child king-addons-dot2"></div></div>';
7835 + break;
7836 + case 'loader-5':
7837 + echo '<div class="king-addons-three-bounce"><div class="king-addons-child king-addons-bounce1"></div><div class="king-addons-child king-addons-bounce2"></div><div class="king-addons-child king-addons-bounce3"></div></div>';
7838 + break;
7839 + case 'loader-6':
7840 + echo '<div class="king-addons-fading-circle">';
7841 + for ($i = 1; $i <= 12; $i++) {
7842 + echo '<div class="king-addons-circle king-addons-circle' . $i . '"></div>';
7843 + }
7844 + echo '</div>';
7845 + break;
7846 + }
7847 + echo '</div>';
7848 + echo '<p class="king-addons-pagination-finish">' . esc_html($s['pagination_finish_text']) . '</p>';
7849 + }
7850 + echo '</div>';
7851 + }
7852 +
7853 + public function add_grid_settings($s)
7854 + {
7855 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7856 + $s['filters_deeplinking'] = '';
7857 + $s['filters_count'] = '';
7858 + $s['filters_default_filter'] = '';
7859 + if (in_array($s['filters_animation'], ['pro-fd', 'pro-fs'])) {
7860 + $s['filters_animation'] = 'zoom';
7861 + }
7862 + }
7863 + $ghrD = $s['layout_gutter_hr']['size'];
7864 + $ghrM = $s['layout_gutter_hr_mobile']['size'] ?? $ghrD;
7865 + $ghrME = $s['layout_gutter_hr_mobile_extra']['size'] ?? $ghrM;
7866 + $ghrT = $s['layout_gutter_hr_tablet']['size'] ?? $ghrME;
7867 + $ghrTE = $s['layout_gutter_hr_tablet_extra']['size'] ?? $ghrT;
7868 + $ghrL = $s['layout_gutter_hr_laptop']['size'] ?? $ghrD;
7869 + $ghrW = $s['layout_gutter_hr_widescreen']['size'] ?? $ghrD;
7870 +
7871 + $gvrD = $s['layout_gutter_vr']['size'];
7872 + $gvrM = $s['layout_gutter_vr_mobile']['size'] ?? $gvrD;
7873 + $gvrME = $s['layout_gutter_vr_mobile_extra']['size'] ?? $gvrM;
7874 + $gvrT = $s['layout_gutter_vr_tablet']['size'] ?? $gvrME;
7875 + $gvrTE = $s['layout_gutter_vr_tablet_extra']['size'] ?? $gvrT;
7876 + $gvrL = $s['layout_gutter_vr_laptop']['size'] ?? $gvrD;
7877 + $gvrW = $s['layout_gutter_vr_widescreen']['size'] ?? $gvrD;
7878 +
7879 + $layout_settings = [
7880 + 'layout' => $s['layout_select'],
7881 + 'columns_desktop' => $s['layout_columns'],
7882 + 'gutter_hr' => $ghrD, 'gutter_hr_mobile' => $ghrM, 'gutter_hr_mobile_extra' => $ghrME, 'gutter_hr_tablet' => $ghrT, 'gutter_hr_tablet_extra' => $ghrTE, 'gutter_hr_laptop' => $ghrL, 'gutter_hr_widescreen' => $ghrW,
7883 + 'gutter_vr' => $gvrD, 'gutter_vr_mobile' => $gvrM, 'gutter_vr_mobile_extra' => $gvrME, 'gutter_vr_tablet' => $gvrT, 'gutter_vr_tablet_extra' => $gvrTE, 'gutter_vr_laptop' => $gvrL, 'gutter_vr_widescreen' => $gvrW,
7884 + 'animation' => $s['layout_animation'], 'animation_duration' => $s['layout_animation_duration'], 'animation_delay' => $s['layout_animation_delay'],
7885 + 'deeplinking' => $s['filters_deeplinking'],
7886 + 'filters_default_filter' => $s['filters_default_filter'],
7887 + 'filters_linkable' => $s['filters_linkable'],
7888 + 'filters_count' => $s['filters_count'],
7889 + 'filters_hide_empty' => $s['filters_hide_empty'],
7890 + 'filters_animation' => $s['filters_animation'],
7891 + 'filters_animation_duration' => $s['filters_animation_duration'],
7892 + 'filters_animation_delay' => $s['filters_animation_delay'],
7893 + 'pagination_type' => $s['pagination_type'],
7894 + 'pagination_max_pages' => $this->get_max_num_pages(),
7895 + 'lightbox' => [
7896 + 'selector' => '.king-addons-grid-image-wrap',
7897 + 'iframeMaxWidth' => '60%',
7898 + 'hash' => false,
7899 + 'autoplay' => $s['lightbox_popup_autoplay'],
7900 + 'pause' => Core::jsNumber($s, 'lightbox_popup_pause', 5) * 1000,
7901 + 'progressBar' => $s['lightbox_popup_progressbar'],
7902 + 'counter' => $s['lightbox_popup_counter'],
7903 + 'controls' => $s['lightbox_popup_arrows'],
7904 + 'getCaptionFromTitleOrAlt' => false,
7905 + 'thumbnail' => $s['lightbox_popup_thumbnails'],
7906 + 'showThumbByDefault' => $s['lightbox_popup_thumbnails_default'],
7907 + 'share' => $s['lightbox_popup_sharing'],
7908 + 'zoom' => $s['lightbox_popup_zoom'],
7909 + 'fullScreen' => $s['lightbox_popup_fullscreen'],
7910 + 'download' => $s['lightbox_popup_download'],
7911 + ]
7912 + ];
7913 + $this->add_render_attribute('grid-settings', ['data-settings' => wp_json_encode($layout_settings)]);
7914 + }
7915 +
7916 + public function add_slider_settings($s)
7917 + {
7918 + $slider_is_rtl = is_rtl();
7919 + $slider_dir = $slider_is_rtl ? 'rtl' : 'ltr';
7920 + if (!king_addons_freemius()->can_use_premium_code__premium_only()) {
7921 + $s['layout_slider_autoplay'] = '';
7922 + $s['layout_slider_autoplay_duration'] = 0;
7923 + $s['layout_slider_pause_on_hover'] = '';
7924 + }
7925 + if (in_array($s['layout_slider_amount'], ['pro-3', 'pro-4', 'pro-5', 'pro-6'])) {
7926 + $s['layout_slider_amount'] = 2; // fallback for free version
7927 + }
7928 + $slider_options = [
7929 + 'rtl' => $slider_is_rtl,
7930 + 'infinite' => ($s['layout_slider_loop'] === 'yes'),
7931 + 'speed' => absint($s['layout_slider_effect_duration'] * 1000),
7932 + 'arrows' => true,
7933 + 'dots' => true,
7934 + 'autoplay' => ($s['layout_slider_autoplay'] === 'yes'),
7935 + 'autoplaySpeed' => absint($s['layout_slider_autoplay_duration'] * 1000),
7936 + 'pauseOnHover' => $s['layout_slider_pause_on_hover'],
7937 + 'prevArrow' => '#king-addons-grid-slider-prev-' . $this->get_id(),
7938 + 'nextArrow' => '#king-addons-grid-slider-next-' . $this->get_id(),
7939 + 'sliderSlidesToScroll' => +$s['layout_slides_to_scroll'],
7940 + 'sliderRows' => $s['layout_slider_rows'] ?? 1,
7941 + 'lightbox' => [
7942 + 'selector' => 'article:not(.slick-cloned) .king-addons-grid-image-wrap',
7943 + 'iframeMaxWidth' => '60%',
7944 + 'hash' => false,
7945 + 'autoplay' => $s['lightbox_popup_autoplay'],
7946 + 'pause' => $s['lightbox_popup_pause'] * 1000,
7947 + 'progressBar' => $s['lightbox_popup_progressbar'],
7948 + 'counter' => $s['lightbox_popup_counter'],
7949 + 'controls' => $s['lightbox_popup_arrows'],
7950 + 'getCaptionFromTitleOrAlt' => false,
7951 + 'thumbnail' => $s['lightbox_popup_thumbnails'],
7952 + 'showThumbByDefault' => $s['lightbox_popup_thumbnails_default'],
7953 + 'share' => $s['lightbox_popup_sharing'],
7954 + 'zoom' => $s['lightbox_popup_zoom'],
7955 + 'fullScreen' => $s['lightbox_popup_fullscreen'],
7956 + 'download' => $s['lightbox_popup_download']
7957 + ]
7958 + ];
7959 + if ($s['layout_slider_amount'] === 1 && $s['layout_slider_effect'] === 'fade') {
7960 + $slider_options['fade'] = true;
7961 + }
7962 + $this->add_render_attribute('slider-settings', [
7963 + 'dir' => esc_attr($slider_dir),
7964 + 'data-slick' => wp_json_encode($slider_options),
7965 + ]);
7966 + }
7967 +
7968 + protected function render()
7969 + {
7970 + $s = $this->get_settings();
7971 +
7972 + if ('manual' === $s['query_selection']) {
7973 + $manual_items = $this->get_paginated_manual_media_items($s);
7974 +
7975 + if (empty($manual_items)) {
7976 + echo '<h2>' . esc_html($s['query_not_found_text']) . '</h2>';
7977 + return;
7978 + }
7979 +
7980 + if ('slider' !== $s['layout_select']) {
7981 + $this->render_grid_filters($s);
7982 + $this->add_grid_settings($s);
7983 + $render_attribute = $this->get_render_attribute_string('grid-settings');
7984 + } else {
7985 + $this->add_slider_settings($s);
7986 + $render_attribute = $this->get_render_attribute_string('slider-settings');
7987 + }
7988 +
7989 + echo '<section class="king-addons-grid king-addons-media-grid elementor-clearfix" ' . $render_attribute . '>';
7990 + foreach ($manual_items as $item) {
7991 + $this->render_manual_grid_item($s, $item);
7992 + }
7993 + echo '</section>';
7994 +
7995 + if ('slider' === $s['layout_select']) {
7996 + echo '<div class="king-addons-grid-slider-arrow-container">';
7997 + echo '<div class="king-addons-grid-slider-prev-arrow king-addons-grid-slider-arrow" id="king-addons-grid-slider-prev-' . esc_attr($this->get_id()) . '">' . Core::getIcon($s['layout_slider_nav_icon'], '') . '</div>';
7998 + echo '<div class="king-addons-grid-slider-next-arrow king-addons-grid-slider-arrow" id="king-addons-grid-slider-next-' . esc_attr($this->get_id()) . '">' . Core::getIcon($s['layout_slider_nav_icon'], '') . '</div>';
7999 + echo '</div><div class="king-addons-grid-slider-dots"></div>';
8000 + }
8001 +
8002 + $this->render_grid_pagination($s);
8003 + return;
8004 + }
8005 +
8006 + $posts = new WP_Query($this->get_main_query_args());
8007 + if ($posts->have_posts()) {
8008 + if ('slider' !== $s['layout_select']) {
8009 + $this->render_grid_filters($s);
8010 + $this->add_grid_settings($s);
8011 + $render_attribute = $this->get_render_attribute_string('grid-settings');
8012 + } else {
8013 + $this->add_slider_settings($s);
8014 + $render_attribute = $this->get_render_attribute_string('slider-settings');
8015 + }
8016 + echo '<section class="king-addons-grid king-addons-media-grid elementor-clearfix" ' . $render_attribute . '>';
8017 + while ($posts->have_posts()) {
8018 + $posts->the_post();
8019 + $attachment_id = get_the_ID();
8020 +
8021 + if (!wp_attachment_is_image($attachment_id) && !$this->is_video_attachment($attachment_id)) {
8022 + continue;
8023 + }
8024 +
8025 + $post_class = implode(' ', get_post_class('king-addons-grid-item elementor-clearfix', $attachment_id));
8026 + if ($this->is_video_attachment($attachment_id)) {
8027 + $post_class .= ' king-addons-grid-item-video';
8028 + }
8029 +
8030 + echo '<article class="' . esc_attr($post_class) . '">';
8031 + echo '<div class="king-addons-grid-item-inner">';
8032 + $this->get_elements_by_location('above', $s, get_the_ID());
8033 + echo '<div class="king-addons-grid-media-wrap' . $this->get_image_effect_class($s) . ' ">';
8034 + $this->render_post_thumbnail($s);
8035 + echo '<div class="king-addons-grid-media-hover king-addons-animation-wrap">';
8036 + $this->render_media_overlay($s);
8037 + $this->get_elements_by_location('over', $s, get_the_ID());
8038 + echo '</div></div>';
8039 + $this->get_elements_by_location('below', $s, get_the_ID());
8040 + echo '</div></article>';
8041 + }
8042 + wp_reset_postdata();
8043 + echo '</section>';
8044 +
8045 + if ('slider' === $s['layout_select']) {
8046 + echo '<div class="king-addons-grid-slider-arrow-container">';
8047 + echo '<div class="king-addons-grid-slider-prev-arrow king-addons-grid-slider-arrow" id="king-addons-grid-slider-prev-' . esc_attr($this->get_id()) . '">' . Core::getIcon($s['layout_slider_nav_icon'], '') . '</div>';
8048 + echo '<div class="king-addons-grid-slider-next-arrow king-addons-grid-slider-arrow" id="king-addons-grid-slider-next-' . esc_attr($this->get_id()) . '">' . Core::getIcon($s['layout_slider_nav_icon'], '') . '</div>';
8049 + echo '</div><div class="king-addons-grid-slider-dots"></div>';
8050 + }
8051 + $this->render_grid_pagination($s);
8052 + } else {
8053 + echo '<h2>' . esc_html($s['query_not_found_text']) . '</h2>';
8054 + }
8055 + }
8056 +
8057 +
8058 +}