PluginProbe
Qi Blocks / 1.1.1
Qi Blocks v1.1.1
1.5.3 1.5.2 1.5.1 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 All 45 releases
qi-blocks / inc / slider / helper.php

helper.php in Qi Blocks 1.1.1, at inc/slider/helper.php

1,186 lines 34.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly.
4 defined( 'ABSPATH' ) || exit;
5
6 if ( ! function_exists( 'qi_blocks_register_slider_3rd_party_scripts' ) ) {
7 /**
8 * Function that set additional 3rd party scripts
9 */
10 function qi_blocks_register_slider_3rd_party_scripts() {
11
12 // Register swiper scripts
13 wp_register_style( 'swiper', QI_BLOCKS_INC_URL_PATH . '/slider/assets/plugins/swiper.min.css' );
14 wp_register_script( 'swiper', QI_BLOCKS_INC_URL_PATH . '/slider/assets/plugins/swiper.min.js', array( 'jquery' ), false, true );
15 }
16
17 add_action( 'qi_blocks_action_additional_3rd_party_scripts', 'qi_blocks_register_slider_3rd_party_scripts' );
18 }
19
20 if ( ! function_exists( 'qi_blocks_set_slider_style_as_block_style_dependency' ) ) {
21 /**
22 * Function that set additional 3rd party scripts as block style dependency
23 *
24 * @param $style_dependency array
25 *
26 * @return array
27 */
28 function qi_blocks_set_slider_style_as_block_style_dependency( $style_dependency ) {
29
30 if ( is_admin() ) {
31 $style_dependency[] = 'swiper';
32 }
33
34 return $style_dependency;
35 }
36
37 add_filter( 'qi_blocks_filter_block_style_dependency', 'qi_blocks_set_slider_style_as_block_style_dependency', 5 ); // permission 5 is set in order to be before main plugins style
38 }
39
40 if ( ! function_exists( 'qi_blocks_get_block_slider_attributes' ) ) {
41 /**
42 * Function that return block slider attributes
43 *
44 * @param array $excluded_attributes
45 *
46 * @return array
47 */
48 function qi_blocks_get_block_slider_attributes( $excluded_attributes = array() ) {
49 $attributes = array(
50 'sliderDirection' => array(
51 'type' => 'string',
52 'default' => 'horizontal',
53 ),
54 'sliderColumns' => array(
55 'type' => 'number',
56 'default' => 1,
57 ),
58 'sliderColumnsResponsive' => array(
59 'type' => 'string',
60 'default' => 'predefined',
61 ),
62 'sliderColumns1440' => array(
63 'type' => 'number',
64 'default' => '',
65 ),
66 'sliderColumns1366' => array(
67 'type' => 'number',
68 'default' => '',
69 ),
70 'sliderColumns1024' => array(
71 'type' => 'number',
72 'default' => '',
73 ),
74 'sliderColumns768' => array(
75 'type' => 'number',
76 'default' => '',
77 ),
78 'sliderColumns680' => array(
79 'type' => 'number',
80 'default' => '',
81 ),
82 'sliderColumns480' => array(
83 'type' => 'number',
84 'default' => '',
85 ),
86 'sliderSpace' => array(
87 'type' => 'number',
88 'default' => '',
89 ),
90 'sliderSpaceTablet' => array(
91 'type' => 'number',
92 'default' => '',
93 ),
94 'sliderSpaceMobile' => array(
95 'type' => 'number',
96 'default' => '',
97 ),
98 'sliderLoop' => array(
99 'type' => 'string',
100 'default' => 'yes',
101 ),
102 'sliderAutoplay' => array(
103 'type' => 'string',
104 'default' => 'yes',
105 ),
106 'sliderCentered' => array(
107 'type' => 'string',
108 'default' => 'no',
109 ),
110 'sliderZoomCenteredSlide' => array(
111 'type' => 'string',
112 'default' => 'no',
113 ),
114 'sliderPartialColumns' => array(
115 'type' => 'string',
116 'default' => 'no',
117 ),
118 'sliderPartialColumnsValue' => array(
119 'type' => 'number',
120 'default' => 0.1,
121 ),
122 'sliderPartialColumnsResponsiveDisable' => array(
123 'type' => 'string',
124 'default' => '',
125 ),
126 'sliderDragging' => array(
127 'type' => 'string',
128 'default' => 'yes',
129 ),
130 'sliderSpeed' => array(
131 'type' => 'string',
132 'default' => '',
133 ),
134 'sliderSpeedAnimation' => array(
135 'type' => 'string',
136 'default' => '',
137 ),
138 'sliderNavigation' => array(
139 'type' => 'string',
140 'default' => '',
141 ),
142 'sliderNavigationPosition' => array(
143 'type' => 'string',
144 'default' => 'inside',
145 ),
146 'sliderHideNavigation' => array(
147 'type' => 'string',
148 'default' => '',
149 ),
150 'sliderNavigationAlignment' => array(
151 'type' => 'string',
152 'default' => '',
153 ),
154 'sliderNavigationVerticalPosition' => array(
155 'type' => 'string',
156 'default' => 'bottom',
157 ),
158 'sliderPagination' => array(
159 'type' => 'string',
160 'default' => '',
161 ),
162 'sliderPaginationPosition' => array(
163 'type' => 'string',
164 'default' => 'inside',
165 ),
166 'sliderHeight' => array(
167 'type' => 'number',
168 'default' => '',
169 ),
170 'sliderHeightUnit' => array(
171 'type' => 'string',
172 'default' => 'px',
173 ),
174 'sliderHeightDecimal' => array(
175 'type' => 'number',
176 'default' => '',
177 ),
178 'sliderHeightTablet' => array(
179 'type' => 'number',
180 'default' => '',
181 ),
182 'sliderHeightMobile' => array(
183 'type' => 'number',
184 'default' => '',
185 ),
186 'sliderHeightUnitTablet' => array(
187 'type' => 'string',
188 'default' => 'px',
189 ),
190 'sliderHeightUnitMobile' => array(
191 'type' => 'string',
192 'default' => 'px',
193 ),
194 'sliderHeightDecimalTablet' => array(
195 'type' => 'number',
196 'default' => '',
197 ),
198 'sliderHeightDecimalMobile' => array(
199 'type' => 'number',
200 'default' => '',
201 ),
202 );
203
204 if ( ! empty( $excluded_attributes ) ) {
205 foreach ( $excluded_attributes as $excluded_attribute ) {
206 if ( array_key_exists( $excluded_attribute, $attributes ) ) {
207 unset( $attributes[ $excluded_attribute ] );
208 }
209 }
210 }
211
212 return $attributes;
213 }
214 }
215
216 if ( ! function_exists( 'qi_blocks_get_block_slider_navigation_attributes' ) ) {
217 /**
218 * Function that return block slider navigation attributes
219 *
220 * @param array $excluded_attributes
221 *
222 * @return array
223 */
224 function qi_blocks_get_block_slider_navigation_attributes( $excluded_attributes = array() ) {
225 $attributes = array_merge(
226 array(
227 'navigationTogetherHolderBackgroundColor' => array(
228 'type' => 'string',
229 'default' => '',
230 ),
231 'navigationInitialArrowColor' => array(
232 'type' => 'string',
233 'default' => '',
234 ),
235 'navigationInitialArrowBackgroundColor' => array(
236 'type' => 'string',
237 'default' => '',
238 ),
239 'navigationHoverArrowColor' => array(
240 'type' => 'string',
241 'default' => '',
242 ),
243 'navigationHoverArrowBackgroundColor' => array(
244 'type' => 'string',
245 'default' => '',
246 ),
247 'navigationHoverArrowMove' => array(
248 'type' => 'boolean',
249 'default' => true,
250 ),
251 'navigationVerticalOffset' => array(
252 'type' => 'number',
253 'default' => '',
254 ),
255 'navigationVerticalOffsetUnit' => array(
256 'type' => 'string',
257 'default' => 'px',
258 ),
259 'navigationVerticalOffsetDecimal' => array(
260 'type' => 'number',
261 'default' => '',
262 ),
263 'navigationVerticalOffsetTablet' => array(
264 'type' => 'number',
265 'default' => '',
266 ),
267 'navigationVerticalOffsetMobile' => array(
268 'type' => 'number',
269 'default' => '',
270 ),
271 'navigationVerticalOffsetUnitTablet' => array(
272 'type' => 'string',
273 'default' => 'px',
274 ),
275 'navigationVerticalOffsetUnitMobile' => array(
276 'type' => 'string',
277 'default' => 'px',
278 ),
279 'navigationVerticalOffsetDecimalTablet' => array(
280 'type' => 'number',
281 'default' => '',
282 ),
283 'navigationVerticalOffsetDecimalMobile' => array(
284 'type' => 'number',
285 'default' => '',
286 ),
287 'navigationHorizontalOffset' => array(
288 'type' => 'number',
289 'default' => '',
290 ),
291 'navigationHorizontalOffsetUnit' => array(
292 'type' => 'string',
293 'default' => 'px',
294 ),
295 'navigationHorizontalOffsetDecimal' => array(
296 'type' => 'number',
297 'default' => '',
298 ),
299 'navigationHorizontalOffsetTablet' => array(
300 'type' => 'number',
301 'default' => '',
302 ),
303 'navigationHorizontalOffsetMobile' => array(
304 'type' => 'number',
305 'default' => '',
306 ),
307 'navigationHorizontalOffsetUnitTablet' => array(
308 'type' => 'string',
309 'default' => 'px',
310 ),
311 'navigationHorizontalOffsetUnitMobile' => array(
312 'type' => 'string',
313 'default' => 'px',
314 ),
315 'navigationHorizontalOffsetDecimalTablet' => array(
316 'type' => 'number',
317 'default' => '',
318 ),
319 'navigationHorizontalOffsetDecimalMobile' => array(
320 'type' => 'number',
321 'default' => '',
322 ),
323 'navigationTogetherSpaceBetween' => array(
324 'type' => 'number',
325 'default' => '',
326 ),
327 'navigationTogetherSpaceBetweenUnit' => array(
328 'type' => 'string',
329 'default' => 'px',
330 ),
331 'navigationTogetherSpaceBetweenDecimal' => array(
332 'type' => 'number',
333 'default' => '',
334 ),
335 'navigationTogetherSpaceBetweenTablet' => array(
336 'type' => 'number',
337 'default' => '',
338 ),
339 'navigationTogetherSpaceBetweenMobile' => array(
340 'type' => 'number',
341 'default' => '',
342 ),
343 'navigationTogetherSpaceBetweenUnitTablet' => array(
344 'type' => 'string',
345 'default' => 'px',
346 ),
347 'navigationTogetherSpaceBetweenUnitMobile' => array(
348 'type' => 'string',
349 'default' => 'px',
350 ),
351 'navigationTogetherSpaceBetweenDecimalTablet' => array(
352 'type' => 'number',
353 'default' => '',
354 ),
355 'navigationTogetherSpaceBetweenDecimalMobile' => array(
356 'type' => 'number',
357 'default' => '',
358 ),
359 'navigationTogetherMarginTop' => array(
360 'type' => 'number',
361 'default' => '',
362 ),
363 'navigationTogetherMarginTopUnit' => array(
364 'type' => 'string',
365 'default' => 'px',
366 ),
367 'navigationTogetherMarginTopDecimal' => array(
368 'type' => 'number',
369 'default' => '',
370 ),
371 'navigationTogetherMarginTopTablet' => array(
372 'type' => 'number',
373 'default' => '',
374 ),
375 'navigationTogetherMarginTopMobile' => array(
376 'type' => 'number',
377 'default' => '',
378 ),
379 'navigationTogetherMarginTopUnitTablet' => array(
380 'type' => 'string',
381 'default' => 'px',
382 ),
383 'navigationTogetherMarginTopUnitMobile' => array(
384 'type' => 'string',
385 'default' => 'px',
386 ),
387 'navigationTogetherMarginTopDecimalTablet' => array(
388 'type' => 'number',
389 'default' => '',
390 ),
391 'navigationTogetherMarginTopDecimalMobile' => array(
392 'type' => 'number',
393 'default' => '',
394 ),
395 'navigationTogetherHorizontalOffset' => array(
396 'type' => 'number',
397 'default' => '',
398 ),
399 'navigationTogetherHorizontalOffsetUnit' => array(
400 'type' => 'string',
401 'default' => 'px',
402 ),
403 'navigationTogetherHorizontalOffsetDecimal' => array(
404 'type' => 'number',
405 'default' => '',
406 ),
407 'navigationTogetherHorizontalOffsetTablet' => array(
408 'type' => 'number',
409 'default' => '',
410 ),
411 'navigationTogetherHorizontalOffsetMobile' => array(
412 'type' => 'number',
413 'default' => '',
414 ),
415 'navigationTogetherHorizontalOffsetUnitTablet' => array(
416 'type' => 'string',
417 'default' => 'px',
418 ),
419 'navigationTogetherHorizontalOffsetUnitMobile' => array(
420 'type' => 'string',
421 'default' => 'px',
422 ),
423 'navigationTogetherHorizontalOffsetDecimalTablet' => array(
424 'type' => 'number',
425 'default' => '',
426 ),
427 'navigationTogetherHorizontalOffsetDecimalMobile' => array(
428 'type' => 'number',
429 'default' => '',
430 ),
431 'navigationTogetherHolderWidth' => array(
432 'type' => 'number',
433 'default' => '',
434 ),
435 'navigationTogetherHolderWidthUnit' => array(
436 'type' => 'string',
437 'default' => 'px',
438 ),
439 'navigationTogetherHolderWidthDecimal' => array(
440 'type' => 'number',
441 'default' => '',
442 ),
443 'navigationTogetherHolderWidthTablet' => array(
444 'type' => 'number',
445 'default' => '',
446 ),
447 'navigationTogetherHolderWidthMobile' => array(
448 'type' => 'number',
449 'default' => '',
450 ),
451 'navigationTogetherHolderWidthUnitTablet' => array(
452 'type' => 'string',
453 'default' => 'px',
454 ),
455 'navigationTogetherHolderWidthUnitMobile' => array(
456 'type' => 'string',
457 'default' => 'px',
458 ),
459 'navigationTogetherHolderWidthDecimalTablet' => array(
460 'type' => 'number',
461 'default' => '',
462 ),
463 'navigationTogetherHolderWidthDecimalMobile' => array(
464 'type' => 'number',
465 'default' => '',
466 ),
467 'navigationTogetherHolderHeight' => array(
468 'type' => 'number',
469 'default' => '',
470 ),
471 'navigationTogetherHolderHeightUnit' => array(
472 'type' => 'string',
473 'default' => 'px',
474 ),
475 'navigationTogetherHolderHeightDecimal' => array(
476 'type' => 'number',
477 'default' => '',
478 ),
479 'navigationTogetherHolderHeightTablet' => array(
480 'type' => 'number',
481 'default' => '',
482 ),
483 'navigationTogetherHolderHeightMobile' => array(
484 'type' => 'number',
485 'default' => '',
486 ),
487 'navigationTogetherHolderHeightUnitTablet' => array(
488 'type' => 'string',
489 'default' => 'px',
490 ),
491 'navigationTogetherHolderHeightUnitMobile' => array(
492 'type' => 'string',
493 'default' => 'px',
494 ),
495 'navigationTogetherHolderHeightDecimalTablet' => array(
496 'type' => 'number',
497 'default' => '',
498 ),
499 'navigationTogetherHolderHeightDecimalMobile' => array(
500 'type' => 'number',
501 'default' => '',
502 ),
503 'navigationBorderStyle' => array(
504 'type' => 'string',
505 'default' => '',
506 ),
507 'navigationBorderColor' => array(
508 'type' => 'string',
509 'default' => '',
510 ),
511 'navigationBorderWidthTop' => array(
512 'type' => 'number',
513 'default' => '',
514 ),
515 'navigationBorderWidthTopTablet' => array(
516 'type' => 'number',
517 'default' => '',
518 ),
519 'navigationBorderWidthTopMobile' => array(
520 'type' => 'number',
521 'default' => '',
522 ),
523 'navigationBorderWidthRight' => array(
524 'type' => 'number',
525 'default' => '',
526 ),
527 'navigationBorderWidthRightTablet' => array(
528 'type' => 'number',
529 'default' => '',
530 ),
531 'navigationBorderWidthRightMobile' => array(
532 'type' => 'number',
533 'default' => '',
534 ),
535 'navigationBorderWidthBottom' => array(
536 'type' => 'number',
537 'default' => '',
538 ),
539 'navigationBorderWidthBottomTablet' => array(
540 'type' => 'number',
541 'default' => '',
542 ),
543 'navigationBorderWidthBottomMobile' => array(
544 'type' => 'number',
545 'default' => '',
546 ),
547 'navigationBorderWidthLeft' => array(
548 'type' => 'number',
549 'default' => '',
550 ),
551 'navigationBorderWidthLeftTablet' => array(
552 'type' => 'number',
553 'default' => '',
554 ),
555 'navigationBorderWidthLeftMobile' => array(
556 'type' => 'number',
557 'default' => '',
558 ),
559 'navigationBorderWidthUnit' => array(
560 'type' => 'string',
561 'default' => 'px',
562 ),
563 'navigationBorderWidthUnitTablet' => array(
564 'type' => 'string',
565 'default' => 'px',
566 ),
567 'navigationBorderWidthUnitMobile' => array(
568 'type' => 'string',
569 'default' => 'px',
570 ),
571 'navigationBorderRadiusTop' => array(
572 'type' => 'number',
573 'default' => '',
574 ),
575 'navigationBorderRadiusTopTablet' => array(
576 'type' => 'number',
577 'default' => '',
578 ),
579 'navigationBorderRadiusTopMobile' => array(
580 'type' => 'number',
581 'default' => '',
582 ),
583 'navigationBorderRadiusTopDecimal' => array(
584 'type' => 'number',
585 'default' => '',
586 ),
587 'navigationBorderRadiusTopDecimalTablet' => array(
588 'type' => 'number',
589 'default' => '',
590 ),
591 'navigationBorderRadiusTopDecimalMobile' => array(
592 'type' => 'number',
593 'default' => '',
594 ),
595 'navigationBorderRadiusRight' => array(
596 'type' => 'number',
597 'default' => '',
598 ),
599 'navigationBorderRadiusRightTablet' => array(
600 'type' => 'number',
601 'default' => '',
602 ),
603 'navigationBorderRadiusRightMobile' => array(
604 'type' => 'number',
605 'default' => '',
606 ),
607 'navigationBorderRadiusRightDecimal' => array(
608 'type' => 'number',
609 'default' => '',
610 ),
611 'navigationBorderRadiusRightDecimalTablet' => array(
612 'type' => 'number',
613 'default' => '',
614 ),
615 'navigationBorderRadiusRightDecimalMobile' => array(
616 'type' => 'number',
617 'default' => '',
618 ),
619 'navigationBorderRadiusBottom' => array(
620 'type' => 'number',
621 'default' => '',
622 ),
623 'navigationBorderRadiusBottomTablet' => array(
624 'type' => 'number',
625 'default' => '',
626 ),
627 'navigationBorderRadiusBottomMobile' => array(
628 'type' => 'number',
629 'default' => '',
630 ),
631 'navigationBorderRadiusBottomDecimal' => array(
632 'type' => 'number',
633 'default' => '',
634 ),
635 'navigationBorderRadiusBottomDecimalTablet' => array(
636 'type' => 'number',
637 'default' => '',
638 ),
639 'navigationBorderRadiusBottomDecimalMobile' => array(
640 'type' => 'number',
641 'default' => '',
642 ),
643 'navigationBorderRadiusLeft' => array(
644 'type' => 'number',
645 'default' => '',
646 ),
647 'navigationBorderRadiusLeftTablet' => array(
648 'type' => 'number',
649 'default' => '',
650 ),
651 'navigationBorderRadiusLeftMobile' => array(
652 'type' => 'number',
653 'default' => '',
654 ),
655 'navigationBorderRadiusLeftDecimal' => array(
656 'type' => 'number',
657 'default' => '',
658 ),
659 'navigationBorderRadiusLeftDecimalTablet' => array(
660 'type' => 'number',
661 'default' => '',
662 ),
663 'navigationBorderRadiusLeftDecimalMobile' => array(
664 'type' => 'number',
665 'default' => '',
666 ),
667 'navigationBorderRadiusUnit' => array(
668 'type' => 'string',
669 'default' => 'px',
670 ),
671 'navigationBorderRadiusUnitTablet' => array(
672 'type' => 'string',
673 'default' => 'px',
674 ),
675 'navigationBorderRadiusUnitMobile' => array(
676 'type' => 'string',
677 'default' => 'px',
678 ),
679 'navigationArrowSize' => array(
680 'type' => 'number',
681 'default' => '',
682 ),
683 'navigationArrowSizeUnit' => array(
684 'type' => 'string',
685 'default' => 'px',
686 ),
687 'navigationArrowSizeDecimal' => array(
688 'type' => 'number',
689 'default' => '',
690 ),
691 'navigationArrowSizeTablet' => array(
692 'type' => 'number',
693 'default' => '',
694 ),
695 'navigationArrowSizeMobile' => array(
696 'type' => 'number',
697 'default' => '',
698 ),
699 'navigationArrowSizeUnitTablet' => array(
700 'type' => 'string',
701 'default' => 'px',
702 ),
703 'navigationArrowSizeUnitMobile' => array(
704 'type' => 'string',
705 'default' => 'px',
706 ),
707 'navigationArrowSizeDecimalTablet' => array(
708 'type' => 'number',
709 'default' => '',
710 ),
711 'navigationArrowSizeDecimalMobile' => array(
712 'type' => 'number',
713 'default' => '',
714 ),
715 'navigationArrowHolderWidth' => array(
716 'type' => 'number',
717 'default' => '',
718 ),
719 'navigationArrowHolderWidthUnit' => array(
720 'type' => 'string',
721 'default' => 'px',
722 ),
723 'navigationArrowHolderWidthDecimal' => array(
724 'type' => 'number',
725 'default' => '',
726 ),
727 'navigationArrowHolderWidthTablet' => array(
728 'type' => 'number',
729 'default' => '',
730 ),
731 'navigationArrowHolderWidthMobile' => array(
732 'type' => 'number',
733 'default' => '',
734 ),
735 'navigationArrowHolderWidthUnitTablet' => array(
736 'type' => 'string',
737 'default' => 'px',
738 ),
739 'navigationArrowHolderWidthUnitMobile' => array(
740 'type' => 'string',
741 'default' => 'px',
742 ),
743 'navigationArrowHolderWidthDecimalTablet' => array(
744 'type' => 'number',
745 'default' => '',
746 ),
747 'navigationArrowHolderWidthDecimalMobile' => array(
748 'type' => 'number',
749 'default' => '',
750 ),
751 'navigationArrowHolderHeight' => array(
752 'type' => 'number',
753 'default' => '',
754 ),
755 'navigationArrowHolderHeightUnit' => array(
756 'type' => 'string',
757 'default' => 'px',
758 ),
759 'navigationArrowHolderHeightDecimal' => array(
760 'type' => 'number',
761 'default' => '',
762 ),
763 'navigationArrowHolderHeightTablet' => array(
764 'type' => 'number',
765 'default' => '',
766 ),
767 'navigationArrowHolderHeightMobile' => array(
768 'type' => 'number',
769 'default' => '',
770 ),
771 'navigationArrowHolderHeightUnitTablet' => array(
772 'type' => 'string',
773 'default' => 'px',
774 ),
775 'navigationArrowHolderHeightUnitMobile' => array(
776 'type' => 'string',
777 'default' => 'px',
778 ),
779 'navigationArrowHolderHeightDecimalTablet' => array(
780 'type' => 'number',
781 'default' => '',
782 ),
783 'navigationArrowHolderHeightDecimalMobile' => array(
784 'type' => 'number',
785 'default' => '',
786 ),
787 'navigationPrevIcon' => array(
788 'type' => 'object',
789 'default' => array(
790 'html' => '',
791 ),
792 ),
793 'navigationPrevIconColor' => array(
794 'type' => 'string',
795 'default' => '',
796 ),
797 'navigationPrevIconFontSize' => array(
798 'type' => 'number',
799 'default' => '',
800 ),
801 'navigationPrevIconFontSizeUnit' => array(
802 'type' => 'string',
803 'default' => 'px',
804 ),
805 'navigationPrevIconFontSizeDecimal' => array(
806 'type' => 'number',
807 'default' => '',
808 ),
809 'navigationPrevIconFontSizeTablet' => array(
810 'type' => 'number',
811 'default' => '',
812 ),
813 'navigationPrevIconFontSizeMobile' => array(
814 'type' => 'number',
815 'default' => '',
816 ),
817 'navigationPrevIconFontSizeUnitTablet' => array(
818 'type' => 'string',
819 'default' => 'px',
820 ),
821 'navigationPrevIconFontSizeUnitMobile' => array(
822 'type' => 'string',
823 'default' => 'px',
824 ),
825 'navigationPrevIconFontSizeDecimalTablet' => array(
826 'type' => 'number',
827 'default' => '',
828 ),
829 'navigationPrevIconFontSizeDecimalMobile' => array(
830 'type' => 'number',
831 'default' => '',
832 ),
833 'navigationNextIcon' => array(
834 'type' => 'object',
835 'default' => array(
836 'html' => '',
837 ),
838 ),
839 'navigationNextIconColor' => array(
840 'type' => 'string',
841 'default' => '',
842 ),
843 'navigationNextIconFontSize' => array(
844 'type' => 'number',
845 'default' => '',
846 ),
847 'navigationNextIconFontSizeUnit' => array(
848 'type' => 'string',
849 'default' => 'px',
850 ),
851 'navigationNextIconFontSizeDecimal' => array(
852 'type' => 'number',
853 'default' => '',
854 ),
855 'navigationNextIconFontSizeTablet' => array(
856 'type' => 'number',
857 'default' => '',
858 ),
859 'navigationNextIconFontSizeMobile' => array(
860 'type' => 'number',
861 'default' => '',
862 ),
863 'navigationNextIconFontSizeUnitTablet' => array(
864 'type' => 'string',
865 'default' => 'px',
866 ),
867 'navigationNextIconFontSizeUnitMobile' => array(
868 'type' => 'string',
869 'default' => 'px',
870 ),
871 'navigationNextIconFontSizeDecimalTablet' => array(
872 'type' => 'number',
873 'default' => '',
874 ),
875 'navigationNextIconFontSizeDecimalMobile' => array(
876 'type' => 'number',
877 'default' => '',
878 ),
879 )
880 );
881
882 if ( ! empty( $excluded_attributes ) ) {
883 foreach ( $excluded_attributes as $excluded_attribute ) {
884 if ( array_key_exists( $excluded_attribute, $attributes ) ) {
885 unset( $attributes[ $excluded_attribute ] );
886 }
887 }
888 }
889
890 return $attributes;
891 }
892 }
893
894 if ( ! function_exists( 'qi_blocks_get_block_slider_pagination_attributes' ) ) {
895 /**
896 * Function that return block slider pagination attributes
897 *
898 * @param array $excluded_attributes
899 *
900 * @return array
901 */
902 function qi_blocks_get_block_slider_pagination_attributes( $excluded_attributes = array() ) {
903 $attributes = array_merge(
904 array(
905 'paginationAlignment' => array(
906 'type' => 'string',
907 'default' => '',
908 ),
909 'paginationEnableNumbers' => array(
910 'type' => 'boolean',
911 'default' => false,
912 ),
913 'paginationNumbersColor' => array(
914 'type' => 'string',
915 'default' => '',
916 ),
917 'paginationInitialBulletColor' => array(
918 'type' => 'string',
919 'default' => '',
920 ),
921 'paginationInitialBulletBorderType' => array(
922 'type' => 'string',
923 'default' => '',
924 ),
925 'paginationInitialBulletBorderColor' => array(
926 'type' => 'string',
927 'default' => '',
928 ),
929 'paginationHoverBulletColor' => array(
930 'type' => 'string',
931 'default' => '',
932 ),
933 'paginationHoverBulletBorderType' => array(
934 'type' => 'string',
935 'default' => '',
936 ),
937 'paginationHoverBulletBorderColor' => array(
938 'type' => 'string',
939 'default' => '',
940 ),
941 'paginationOffset' => array(
942 'type' => 'number',
943 'default' => '',
944 ),
945 'paginationOffsetUnit' => array(
946 'type' => 'string',
947 'default' => 'px',
948 ),
949 'paginationOffsetDecimal' => array(
950 'type' => 'number',
951 'default' => '',
952 ),
953 'paginationOffsetTablet' => array(
954 'type' => 'number',
955 'default' => '',
956 ),
957 'paginationOffsetMobile' => array(
958 'type' => 'number',
959 'default' => '',
960 ),
961 'paginationOffsetUnitTablet' => array(
962 'type' => 'string',
963 'default' => 'px',
964 ),
965 'paginationOffsetUnitMobile' => array(
966 'type' => 'string',
967 'default' => 'px',
968 ),
969 'paginationOffsetDecimalTablet' => array(
970 'type' => 'number',
971 'default' => '',
972 ),
973 'paginationOffsetDecimalMobile' => array(
974 'type' => 'number',
975 'default' => '',
976 ),
977 'paginationBulletsSpaceBetween' => array(
978 'type' => 'number',
979 'default' => '',
980 ),
981 'paginationBulletsSpaceBetweenUnit' => array(
982 'type' => 'string',
983 'default' => 'px',
984 ),
985 'paginationBulletsSpaceBetweenDecimal' => array(
986 'type' => 'number',
987 'default' => '',
988 ),
989 'paginationBulletsSpaceBetweenTablet' => array(
990 'type' => 'number',
991 'default' => '',
992 ),
993 'paginationBulletsSpaceBetweenMobile' => array(
994 'type' => 'number',
995 'default' => '',
996 ),
997 'paginationBulletsSpaceBetweenUnitTablet' => array(
998 'type' => 'string',
999 'default' => 'px',
1000 ),
1001 'paginationBulletsSpaceBetweenUnitMobile' => array(
1002 'type' => 'string',
1003 'default' => 'px',
1004 ),
1005 'paginationBulletsSpaceBetweenDecimalTablet' => array(
1006 'type' => 'number',
1007 'default' => '',
1008 ),
1009 'paginationBulletsSpaceBetweenDecimalMobile' => array(
1010 'type' => 'number',
1011 'default' => '',
1012 ),
1013 'paginationBulletsSize' => array(
1014 'type' => 'number',
1015 'default' => '',
1016 ),
1017 'paginationBulletsSizeUnit' => array(
1018 'type' => 'string',
1019 'default' => 'px',
1020 ),
1021 'paginationBulletsSizeDecimal' => array(
1022 'type' => 'number',
1023 'default' => '',
1024 ),
1025 'paginationBulletsSizeTablet' => array(
1026 'type' => 'number',
1027 'default' => '',
1028 ),
1029 'paginationBulletsSizeMobile' => array(
1030 'type' => 'number',
1031 'default' => '',
1032 ),
1033 'paginationBulletsSizeUnitTablet' => array(
1034 'type' => 'string',
1035 'default' => 'px',
1036 ),
1037 'paginationBulletsSizeUnitMobile' => array(
1038 'type' => 'string',
1039 'default' => 'px',
1040 ),
1041 'paginationBulletsSizeDecimalTablet' => array(
1042 'type' => 'number',
1043 'default' => '',
1044 ),
1045 'paginationBulletsSizeDecimalMobile' => array(
1046 'type' => 'number',
1047 'default' => '',
1048 ),
1049 ),
1050 qi_blocks_get_block_option_typography_attributes( 'paginationNumbers' ),
1051 array(
1052 'paginationInitialBulletBorderWidthTop' => array(
1053 'type' => 'number',
1054 'default' => '',
1055 ),
1056 'paginationInitialBulletBorderWidthTopTablet' => array(
1057 'type' => 'number',
1058 'default' => '',
1059 ),
1060 'paginationInitialBulletBorderWidthTopMobile' => array(
1061 'type' => 'number',
1062 'default' => '',
1063 ),
1064 'paginationInitialBulletBorderWidthRight' => array(
1065 'type' => 'number',
1066 'default' => '',
1067 ),
1068 'paginationInitialBulletBorderWidthRightTablet' => array(
1069 'type' => 'number',
1070 'default' => '',
1071 ),
1072 'paginationInitialBulletBorderWidthRightMobile' => array(
1073 'type' => 'number',
1074 'default' => '',
1075 ),
1076 'paginationInitialBulletBorderWidthBottom' => array(
1077 'type' => 'number',
1078 'default' => '',
1079 ),
1080 'paginationInitialBulletBorderWidthBottomTablet' => array(
1081 'type' => 'number',
1082 'default' => '',
1083 ),
1084 'paginationInitialBulletBorderWidthBottomMobile' => array(
1085 'type' => 'number',
1086 'default' => '',
1087 ),
1088 'paginationInitialBulletBorderWidthLeft' => array(
1089 'type' => 'number',
1090 'default' => '',
1091 ),
1092 'paginationInitialBulletBorderWidthLeftTablet' => array(
1093 'type' => 'number',
1094 'default' => '',
1095 ),
1096 'paginationInitialBulletBorderWidthLeftMobile' => array(
1097 'type' => 'number',
1098 'default' => '',
1099 ),
1100 'paginationInitialBulletBorderWidthUnit' => array(
1101 'type' => 'string',
1102 'default' => 'px',
1103 ),
1104 'paginationInitialBulletBorderWidthUnitTablet' => array(
1105 'type' => 'string',
1106 'default' => 'px',
1107 ),
1108 'paginationInitialBulletBorderWidthUnitMobile' => array(
1109 'type' => 'string',
1110 'default' => 'px',
1111 ),
1112 'paginationHoverBulletBorderWidthTop' => array(
1113 'type' => 'number',
1114 'default' => '',
1115 ),
1116 'paginationHoverBulletBorderWidthTopTablet' => array(
1117 'type' => 'number',
1118 'default' => '',
1119 ),
1120 'paginationHoverBulletBorderWidthTopMobile' => array(
1121 'type' => 'number',
1122 'default' => '',
1123 ),
1124 'paginationHoverBulletBorderWidthRight' => array(
1125 'type' => 'number',
1126 'default' => '',
1127 ),
1128 'paginationHoverBulletBorderWidthRightTablet' => array(
1129 'type' => 'number',
1130 'default' => '',
1131 ),
1132 'paginationHoverBulletBorderWidthRightMobile' => array(
1133 'type' => 'number',
1134 'default' => '',
1135 ),
1136 'paginationHoverBulletBorderWidthBottom' => array(
1137 'type' => 'number',
1138 'default' => '',
1139 ),
1140 'paginationHoverBulletBorderWidthBottomTablet' => array(
1141 'type' => 'number',
1142 'default' => '',
1143 ),
1144 'paginationHoverBulletBorderWidthBottomMobile' => array(
1145 'type' => 'number',
1146 'default' => '',
1147 ),
1148 'paginationHoverBulletBorderWidthLeft' => array(
1149 'type' => 'number',
1150 'default' => '',
1151 ),
1152 'paginationHoverBulletBorderWidthLeftTablet' => array(
1153 'type' => 'number',
1154 'default' => '',
1155 ),
1156 'paginationHoverBulletBorderWidthLeftMobile' => array(
1157 'type' => 'number',
1158 'default' => '',
1159 ),
1160 'paginationHoverBulletBorderWidthUnit' => array(
1161 'type' => 'string',
1162 'default' => 'px',
1163 ),
1164 'paginationHoverBulletBorderWidthUnitTablet' => array(
1165 'type' => 'string',
1166 'default' => 'px',
1167 ),
1168 'paginationHoverBulletBorderWidthUnitMobile' => array(
1169 'type' => 'string',
1170 'default' => 'px',
1171 ),
1172 )
1173 );
1174
1175 if ( ! empty( $excluded_attributes ) ) {
1176 foreach ( $excluded_attributes as $excluded_attribute ) {
1177 if ( array_key_exists( $excluded_attribute, $attributes ) ) {
1178 unset( $attributes[ $excluded_attribute ] );
1179 }
1180 }
1181 }
1182
1183 return $attributes;
1184 }
1185 }
1186