Version Description
- Added Hero Slider and Thumbnail Pagination support, which are Slide Anything PRO features.
=
Download this release
Release Info
Developer | simonpedge |
Plugin | Slide Anything – Responsive Content / HTML Slider and Carousel |
Version | 2.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.21 to 2.2
- css/slide-anything-admin.css +175 -0
- js/slide-anything-admin.js +220 -1
- owl-carousel/owl.carousel2.thumbs.min.js +2 -0
- owl-carousel/sa-owl-theme.css +88 -0
- php/slide-anything-admin.php +283 -42
- php/slide-anything-frontend.php +198 -48
- readme.txt +21 -13
- slide-anything.php +1 -1
css/slide-anything-admin.css
CHANGED
@@ -173,6 +173,10 @@
|
|
173 |
border-color:#e0e0e0;
|
174 |
border-radius:3px;
|
175 |
}
|
|
|
|
|
|
|
|
|
176 |
|
177 |
/* ### METABOX 'Slides' - TABS FOR EACH SLIDE ### */
|
178 |
.sa_slide_tabs {
|
@@ -730,6 +734,78 @@ input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important
|
|
730 |
margin:1px 1px 3px !important;
|
731 |
max-width:50px !important;
|
732 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
733 |
|
734 |
/* ### METABOX 'Slider Style' ### */
|
735 |
#slider_style_metabox h4 {
|
@@ -918,6 +994,105 @@ input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important
|
|
918 |
margin-right:0px !important;
|
919 |
}
|
920 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
921 |
/* ### METABOX 'Information' - 'SLIDE ADDED', 'SLIDE DELETED', 'SLIDE DUPLICATED' & 'SLIDE MOVED' INFO MESSAGES ### */
|
922 |
#sa_slide_added_mess,
|
923 |
#sa_slide_duplicated_mess,
|
173 |
border-color:#e0e0e0;
|
174 |
border-radius:3px;
|
175 |
}
|
176 |
+
#slider_accordion > div .wp-editor-container .mce-tinymce > .mce-container-body > .mce-edit-area > iframe,
|
177 |
+
#slider_accordion > div .wp-editor-container > .mce-tinymce textarea.sa_slide_content {
|
178 |
+
min-height:240px !important;
|
179 |
+
}
|
180 |
|
181 |
/* ### METABOX 'Slides' - TABS FOR EACH SLIDE ### */
|
182 |
.sa_slide_tabs {
|
734 |
margin:1px 1px 3px !important;
|
735 |
max-width:50px !important;
|
736 |
}
|
737 |
+
/* hero slider */
|
738 |
+
#items_displayed_metabox #sa_hero_slider_wrapper {
|
739 |
+
margin:10px 0px 0px !important;
|
740 |
+
padding:10px 0px 10px !important;
|
741 |
+
background-color:#f5f5f5 !important;
|
742 |
+
}
|
743 |
+
#items_displayed_metabox #sa_hero_slider_wrapper > span {
|
744 |
+
padding-left:10px !important;
|
745 |
+
font-weight:700 !important;
|
746 |
+
font-size:14px !important;
|
747 |
+
line-height:16px !important;
|
748 |
+
height:16px !important;
|
749 |
+
}
|
750 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note {
|
751 |
+
clear:both !important;
|
752 |
+
float:none !important;
|
753 |
+
margin:0px !important;
|
754 |
+
padding:5px 0px 0px 10px !important;
|
755 |
+
}
|
756 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note ol {
|
757 |
+
margin:3px 0px 0px 15px !important;
|
758 |
+
padding:0px !important;
|
759 |
+
}
|
760 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note ol li {
|
761 |
+
margin:2px 0px !important;
|
762 |
+
padding:0px !important;
|
763 |
+
font-size:13px !important;
|
764 |
+
line-height:16px !important;
|
765 |
+
}
|
766 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_note ol li em {
|
767 |
+
display:inline-block !important;
|
768 |
+
float:none !important;
|
769 |
+
margin-left:5px !important;
|
770 |
+
font-size:13px !important;
|
771 |
+
line-height:16px !important;
|
772 |
+
height:16px !important;
|
773 |
+
background-position:0px 0px !important;
|
774 |
+
}
|
775 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo {
|
776 |
+
padding:0px 10px !important;
|
777 |
+
clear:both !important;
|
778 |
+
float:none !important;
|
779 |
+
}
|
780 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo h4 {
|
781 |
+
margin:0px !important;
|
782 |
+
padding:10px 0px 0px !important;
|
783 |
+
font-size:14px !important;
|
784 |
+
line-height:18px !important;
|
785 |
+
color:#000000 !important;
|
786 |
+
}
|
787 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p {
|
788 |
+
margin:0px !important;
|
789 |
+
padding:10px 0px 0px !important;
|
790 |
+
}
|
791 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p strong {
|
792 |
+
color:#000000 !important;
|
793 |
+
}
|
794 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p a {
|
795 |
+
display:inline-block !important;
|
796 |
+
padding-left:10px !important;
|
797 |
+
font-weight:700 !important;
|
798 |
+
font-size:14px !important;
|
799 |
+
color:#007fff !important;
|
800 |
+
text-decoration:none !important;
|
801 |
+
transition:all 0.3s ease-in-out;
|
802 |
+
-webkit-transition:all 0.3s ease-in-out;
|
803 |
+
-moz-transition:all 0.3s ease-in-out;
|
804 |
+
-o-transition:all 0.3s ease-in-out;
|
805 |
+
}
|
806 |
+
#items_displayed_metabox #sa_hero_slider_wrapper #sa_hero_slider_promo p a:hover {
|
807 |
+
color:#000000 !important;
|
808 |
+
}
|
809 |
|
810 |
/* ### METABOX 'Slider Style' ### */
|
811 |
#slider_style_metabox h4 {
|
994 |
margin-right:0px !important;
|
995 |
}
|
996 |
|
997 |
+
/* ### METABOX 'Thumbnail Pagination' ### */
|
998 |
+
#cpt_slider_thumbs .inside {
|
999 |
+
margin:0px !important;
|
1000 |
+
padding:15px 12px 10px !important;
|
1001 |
+
background-color:#f5f5f5 !important;
|
1002 |
+
}
|
1003 |
+
#cpt_slider_thumbs .sa_thumbs_line {
|
1004 |
+
padding:0px 0px 10px !important;
|
1005 |
+
}
|
1006 |
+
#cpt_slider_thumbs .sa_thumbs_line span:first-child {
|
1007 |
+
display:inline-block !important;
|
1008 |
+
min-width:120px !important;
|
1009 |
+
padding-right:10px !important;
|
1010 |
+
font-family:'Open Sans', sans-serif !important;
|
1011 |
+
font-size:13px !important;
|
1012 |
+
line-height:18px !important;
|
1013 |
+
}
|
1014 |
+
#cpt_slider_thumbs #sa_thumbs_settings {
|
1015 |
+
padding:10px 0px 0px !important;
|
1016 |
+
}
|
1017 |
+
#cpt_slider_thumbs #sa_thumbs_settings h4 {
|
1018 |
+
color:#303030;
|
1019 |
+
margin:10px 0px;
|
1020 |
+
font-family:'Open Sans', sans-serif;
|
1021 |
+
font-size:13px;
|
1022 |
+
font-weight:600;
|
1023 |
+
line-height:18px;
|
1024 |
+
}
|
1025 |
+
#sa_thumbs_settings .sa_thumbs_line input[type=text] {
|
1026 |
+
width:50px !important;
|
1027 |
+
margin:3px 5px !important;
|
1028 |
+
outline-style:none !important;
|
1029 |
+
border-style:none !important;
|
1030 |
+
box-shadow:none !important;
|
1031 |
+
-webkit-box-shadow:none !important;
|
1032 |
+
color:#303030 !important;
|
1033 |
+
font-size:13px !important;
|
1034 |
+
line-height:20px !important;
|
1035 |
+
}
|
1036 |
+
#sa_thumbs_settings .sa_thumbs_line em {
|
1037 |
+
display:inline-block !important;
|
1038 |
+
padding-left:5px !important;
|
1039 |
+
font-style:normal !important;
|
1040 |
+
color:#a0a0a0 !important;
|
1041 |
+
}
|
1042 |
+
#sa_thumbs_settings .sa_thumbs_line #sa_thumbs_image_size {
|
1043 |
+
margin-top:3px !important;
|
1044 |
+
}
|
1045 |
+
#sa_thumbs_settings .sa_thumbs_line .sp-replacer { /* spectrum color picker */
|
1046 |
+
background-color:#f0f0f0 !important;
|
1047 |
+
border:solid 1px #e0e0e0 !important;
|
1048 |
+
padding:2px !important;
|
1049 |
+
border-radius:3px !important;
|
1050 |
+
}
|
1051 |
+
#sa_thumbs_settings .sa_thumbs_line .sp-replacer .sp-preview { /* spectrum color picker */
|
1052 |
+
width:40px !important;
|
1053 |
+
height:20px !important;
|
1054 |
+
border:solid 1px #c0c0c0 !important;
|
1055 |
+
margin-right:3px !important;
|
1056 |
+
}
|
1057 |
+
#sa_thumbs_settings .sa_thumbs_line .sp-replacer .sp-dd { /* spectrum color picker */
|
1058 |
+
height:16px !important;
|
1059 |
+
padding:0px !important;
|
1060 |
+
margin-right:2px !important;
|
1061 |
+
}
|
1062 |
+
#cpt_slider_thumbs #sa_thumbs_promo {
|
1063 |
+
margin:-3px !important;
|
1064 |
+
padding:0px 5px 8px !important;
|
1065 |
+
}
|
1066 |
+
#cpt_slider_thumbs #sa_thumbs_promo h4 {
|
1067 |
+
margin:0px !important;
|
1068 |
+
padding:0px !important;
|
1069 |
+
font-size:14px !important;
|
1070 |
+
line-height:18px !important;
|
1071 |
+
color:#000000 !important;
|
1072 |
+
}
|
1073 |
+
#cpt_slider_thumbs #sa_thumbs_promo p {
|
1074 |
+
margin:0px !important;
|
1075 |
+
padding:10px 0px 0px !important;
|
1076 |
+
}
|
1077 |
+
#cpt_slider_thumbs #sa_thumbs_promo p strong {
|
1078 |
+
color:#000000 !important;
|
1079 |
+
}
|
1080 |
+
#cpt_slider_thumbs #sa_thumbs_promo p a {
|
1081 |
+
display:inline-block !important;
|
1082 |
+
padding-left:10px !important;
|
1083 |
+
font-weight:700 !important;
|
1084 |
+
font-size:14px !important;
|
1085 |
+
color:#007fff !important;
|
1086 |
+
text-decoration:none !important;
|
1087 |
+
transition:all 0.3s ease-in-out;
|
1088 |
+
-webkit-transition:all 0.3s ease-in-out;
|
1089 |
+
-moz-transition:all 0.3s ease-in-out;
|
1090 |
+
-o-transition:all 0.3s ease-in-out;
|
1091 |
+
}
|
1092 |
+
#cpt_slider_thumbs #sa_thumbs_promo p a:hover {
|
1093 |
+
color:#000000 !important;
|
1094 |
+
}
|
1095 |
+
|
1096 |
/* ### METABOX 'Information' - 'SLIDE ADDED', 'SLIDE DELETED', 'SLIDE DUPLICATED' & 'SLIDE MOVED' INFO MESSAGES ### */
|
1097 |
#sa_slide_added_mess,
|
1098 |
#sa_slide_duplicated_mess,
|
js/slide-anything-admin.js
CHANGED
@@ -374,7 +374,7 @@ jQuery(function() {
|
|
374 |
jQuery('#sa_slide_margin_lr').change(function() {
|
375 |
var slide_margin_lr = document.getElementById('sa_slide_margin_lr').value;
|
376 |
if (jQuery.isNumeric(slide_margin_lr)) {
|
377 |
-
if ((slide_margin_lr >= 0) && (slide_margin_lr <=
|
378 |
// valid number
|
379 |
} else {
|
380 |
document.getElementById('sa_slide_margin_lr').value = '0'; // number out of range
|
@@ -383,10 +383,229 @@ jQuery(function() {
|
|
383 |
document.getElementById('sa_slide_margin_lr').value = '0'; // not a valid number
|
384 |
}
|
385 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
})
|
387 |
|
388 |
|
389 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
// ##### CHANGE EVENT HANDLER FOR 'Use Popup Image as Slide Background' #####
|
391 |
function change_slide_popup_background(slide_no) {
|
392 |
var pro_version = document.getElementById('sa_pro_version').value;
|
374 |
jQuery('#sa_slide_margin_lr').change(function() {
|
375 |
var slide_margin_lr = document.getElementById('sa_slide_margin_lr').value;
|
376 |
if (jQuery.isNumeric(slide_margin_lr)) {
|
377 |
+
if ((slide_margin_lr >= 0) && (slide_margin_lr <= 20)) {
|
378 |
// valid number
|
379 |
} else {
|
380 |
document.getElementById('sa_slide_margin_lr').value = '0'; // number out of range
|
383 |
document.getElementById('sa_slide_margin_lr').value = '0'; // not a valid number
|
384 |
}
|
385 |
});
|
386 |
+
|
387 |
+
// ##### CHANGE EVENT FOR ANY OF THE ITEMS DISPLAYED DROPDOWNS #####
|
388 |
+
jQuery("select[name='sa_items_width1']").change(function() { items_displayed_changed(); });
|
389 |
+
jQuery("select[name='sa_items_width2']").change(function() { items_displayed_changed(); });
|
390 |
+
jQuery("select[name='sa_items_width3']").change(function() { items_displayed_changed(); });
|
391 |
+
jQuery("select[name='sa_items_width4']").change(function() { items_displayed_changed(); });
|
392 |
+
jQuery("select[name='sa_items_width5']").change(function() { items_displayed_changed(); });
|
393 |
+
jQuery("select[name='sa_items_width6']").change(function() { items_displayed_changed(); });
|
394 |
+
|
395 |
+
// ##### CHANGE EVENT FOR 'Hero Slider' CHECKBOX #####
|
396 |
+
jQuery('#sa_hero_slider').click(function() {
|
397 |
+
if (document.getElementById('sa_hero_slider').checked) {
|
398 |
+
document.getElementById('sa_hero_slider_note').style.display = 'block';
|
399 |
+
} else {
|
400 |
+
document.getElementById('sa_hero_slider_note').style.display = 'none';
|
401 |
+
}
|
402 |
+
});
|
403 |
+
|
404 |
+
// ##### CHANGE EVENT FOR 'Use Thumbnail Pagination' CHECKBOX #####
|
405 |
+
jQuery('#sa_thumbs_active').click(function() {
|
406 |
+
if (document.getElementById('sa_thumbs_active').checked) {
|
407 |
+
document.getElementById('sa_thumbs_settings').style.display = 'block';
|
408 |
+
jQuery('#sa_pagination').prop('checked', false); // uncheck 'Show Pagination' checkbox
|
409 |
+
} else {
|
410 |
+
document.getElementById('sa_thumbs_settings').style.display = 'none';
|
411 |
+
}
|
412 |
+
});
|
413 |
+
|
414 |
+
// ##### JQUERY-UI SPINNER - THUMBS CONTAINER PADDING #####
|
415 |
+
jQuery("#sa_thumbs_padding").spinner({
|
416 |
+
step: 0.1,
|
417 |
+
min: 0,
|
418 |
+
max: 10,
|
419 |
+
numberFormat: "n"
|
420 |
+
});
|
421 |
+
// ##### CHANGE EVENT HANDLER FOR THUMBS CONTAINER PADDING #####
|
422 |
+
jQuery('#sa_thumbs_padding').change(function() {
|
423 |
+
var thumbs_padding = document.getElementById('sa_thumbs_padding').value;
|
424 |
+
if (jQuery.isNumeric(thumbs_padding)) {
|
425 |
+
if ((thumbs_padding >= 0) && (thumbs_padding <= 10)) {
|
426 |
+
// valid number
|
427 |
+
} else {
|
428 |
+
document.getElementById('sa_thumbs_padding').value = '3'; // number out of range
|
429 |
+
}
|
430 |
+
} else {
|
431 |
+
document.getElementById('sa_thumbs_padding').value = '3'; // not a valid number
|
432 |
+
}
|
433 |
+
});
|
434 |
+
|
435 |
+
// ##### JQUERY-UI SPINNER - THUMBS WIDTH #####
|
436 |
+
jQuery("#sa_thumbs_width").spinner({
|
437 |
+
step: 1,
|
438 |
+
min: 10,
|
439 |
+
max: 300,
|
440 |
+
numberFormat: "n"
|
441 |
+
});
|
442 |
+
// ##### CHANGE EVENT HANDLER - THUMBS WIDTH #####
|
443 |
+
jQuery('#sa_thumbs_width').change(function() {
|
444 |
+
var thumbs_width = document.getElementById('sa_thumbs_width').value;
|
445 |
+
if (jQuery.isNumeric(thumbs_width)) {
|
446 |
+
if ((thumbs_width >= 10) && (thumbs_width <= 300)) {
|
447 |
+
// valid number
|
448 |
+
} else {
|
449 |
+
document.getElementById('sa_thumbs_width').value = '150'; // number out of range
|
450 |
+
}
|
451 |
+
} else {
|
452 |
+
document.getElementById('sa_thumbs_width').value = '150'; // not a valid number
|
453 |
+
}
|
454 |
+
});
|
455 |
+
|
456 |
+
// ##### JQUERY-UI SPINNER - THUMBS HEIGHT #####
|
457 |
+
jQuery("#sa_thumbs_height").spinner({
|
458 |
+
step: 1,
|
459 |
+
min: 10,
|
460 |
+
max: 300,
|
461 |
+
numberFormat: "n"
|
462 |
+
});
|
463 |
+
// ##### CHANGE EVENT HANDLER - THUMBS HEIGHT #####
|
464 |
+
jQuery('#sa_thumbs_height').change(function() {
|
465 |
+
var thumbs_height = document.getElementById('sa_thumbs_height').value;
|
466 |
+
if (jQuery.isNumeric(thumbs_height)) {
|
467 |
+
if ((thumbs_height >= 10) && (thumbs_height <= 300)) {
|
468 |
+
// valid number
|
469 |
+
} else {
|
470 |
+
document.getElementById('sa_thumbs_height').value = '85'; // number out of range
|
471 |
+
}
|
472 |
+
} else {
|
473 |
+
document.getElementById('sa_thumbs_height').value = '85'; // not a valid number
|
474 |
+
}
|
475 |
+
});
|
476 |
+
|
477 |
+
// ##### JQUERY-UI SPINNER - THUMBS OPACITY #####
|
478 |
+
jQuery("#sa_thumbs_opacity").spinner({
|
479 |
+
step: 1,
|
480 |
+
min: 0,
|
481 |
+
max: 100,
|
482 |
+
numberFormat: "n"
|
483 |
+
});
|
484 |
+
// ##### CHANGE EVENT HANDLER - THUMBS OPACITY #####
|
485 |
+
jQuery('#sa_thumbs_opacity').change(function() {
|
486 |
+
var thumbs_opacity = document.getElementById('sa_thumbs_opacity').value;
|
487 |
+
if (jQuery.isNumeric(thumbs_opacity)) {
|
488 |
+
if ((thumbs_opacity >= 0) && (thumbs_opacity <= 100)) {
|
489 |
+
// valid number
|
490 |
+
} else {
|
491 |
+
document.getElementById('sa_thumbs_opacity').value = '50'; // number out of range
|
492 |
+
}
|
493 |
+
} else {
|
494 |
+
document.getElementById('sa_thumbs_opacity').value = '50'; // not a valid number
|
495 |
+
}
|
496 |
+
});
|
497 |
+
|
498 |
+
// ##### JQUERY-UI SPINNER - THUMBS BORDER WIDTH #####
|
499 |
+
jQuery("#sa_thumbs_border_width").spinner({
|
500 |
+
step: 1,
|
501 |
+
min: 0,
|
502 |
+
max: 10,
|
503 |
+
numberFormat: "n"
|
504 |
+
});
|
505 |
+
// ##### CHANGE EVENT HANDLER - THUMBS BORDER WIDTH #####
|
506 |
+
jQuery('#sa_thumbs_border_width').change(function() {
|
507 |
+
var thumbs_border_width = document.getElementById('sa_thumbs_border_width').value;
|
508 |
+
if (jQuery.isNumeric(thumbs_border_width)) {
|
509 |
+
if ((thumbs_border_width >= 0) && (thumbs_border_width <= 10)) {
|
510 |
+
// valid number
|
511 |
+
} else {
|
512 |
+
document.getElementById('sa_thumbs_border_width').value = '0'; // number out of range
|
513 |
+
}
|
514 |
+
} else {
|
515 |
+
document.getElementById('sa_thumbs_border_width').value = '0'; // not a valid number
|
516 |
+
}
|
517 |
+
});
|
518 |
+
|
519 |
+
// ##### SPECTRUM COLOR PICKER - THUMBS BORDER COLOR #####
|
520 |
+
if (document.getElementById('sa_thumbs_border_color')) {
|
521 |
+
var thumbs_border_color = document.getElementById('sa_thumbs_border_color').value;
|
522 |
+
jQuery("#sa_thumbs_border_color").spectrum({
|
523 |
+
showPaletteOnly: true,
|
524 |
+
togglePaletteOnly: true,
|
525 |
+
togglePaletteMoreText: 'more',
|
526 |
+
togglePaletteLessText: 'less',
|
527 |
+
showInput: true,
|
528 |
+
allowEmpty:true,
|
529 |
+
preferredFormat: "rgb",
|
530 |
+
showAlpha: true,
|
531 |
+
color: thumbs_border_color,
|
532 |
+
palette: [
|
533 |
+
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
534 |
+
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
535 |
+
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
536 |
+
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
537 |
+
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
538 |
+
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
539 |
+
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
540 |
+
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
541 |
+
]
|
542 |
+
});
|
543 |
+
}
|
544 |
+
|
545 |
+
// ##### JQUERY-UI SPINNER - TABLET THUMBS SIZE (PERCENTAGE) #####
|
546 |
+
jQuery("#sa_thumbs_resp_tablet").spinner({
|
547 |
+
step: 1,
|
548 |
+
min: 0,
|
549 |
+
max: 100,
|
550 |
+
numberFormat: "n"
|
551 |
+
});
|
552 |
+
// ##### CHANGE EVENT HANDLER - TABLET THUMBS SIZE (PERCENTAGE) #####
|
553 |
+
jQuery('#sa_thumbs_resp_tablet').change(function() {
|
554 |
+
var thumbs_resp_tablet = document.getElementById('sa_thumbs_resp_tablet').value;
|
555 |
+
if (jQuery.isNumeric(thumbs_resp_tablet)) {
|
556 |
+
if ((thumbs_resp_tablet >= 0) && (thumbs_resp_tablet <= 100)) {
|
557 |
+
// valid number
|
558 |
+
} else {
|
559 |
+
document.getElementById('sa_thumbs_resp_tablet').value = '75'; // number out of range
|
560 |
+
}
|
561 |
+
} else {
|
562 |
+
document.getElementById('sa_thumbs_resp_tablet').value = '75'; // not a valid number
|
563 |
+
}
|
564 |
+
});
|
565 |
+
|
566 |
+
// ##### JQUERY-UI SPINNER - MOBILE THUMBS SIZE (PERCENTAGE) #####
|
567 |
+
jQuery("#sa_thumbs_resp_mobile").spinner({
|
568 |
+
step: 1,
|
569 |
+
min: 0,
|
570 |
+
max: 100,
|
571 |
+
numberFormat: "n"
|
572 |
+
});
|
573 |
+
// ##### CHANGE EVENT HANDLER - MOBILE THUMBS SIZE (PERCENTAGE) #####
|
574 |
+
jQuery('#sa_thumbs_resp_mobile').change(function() {
|
575 |
+
var thumbs_resp_mobile = document.getElementById('sa_thumbs_resp_mobile').value;
|
576 |
+
if (jQuery.isNumeric(thumbs_resp_mobile)) {
|
577 |
+
if ((thumbs_resp_mobile >= 0) && (thumbs_resp_mobile <= 100)) {
|
578 |
+
// valid number
|
579 |
+
} else {
|
580 |
+
document.getElementById('sa_thumbs_resp_mobile').value = '50'; // number out of range
|
581 |
+
}
|
582 |
+
} else {
|
583 |
+
document.getElementById('sa_thumbs_resp_mobile').value = '50'; // not a valid number
|
584 |
+
}
|
585 |
+
});
|
586 |
})
|
587 |
|
588 |
|
589 |
|
590 |
+
// ##### ONE OF THE ITEMS DISPLAYED DROPDOWNS HAVE CHANGED #####
|
591 |
+
function items_displayed_changed() {
|
592 |
+
var width1 = jQuery("select[name='sa_items_width1']").val();
|
593 |
+
var width2 = jQuery("select[name='sa_items_width2']").val();
|
594 |
+
var width3 = jQuery("select[name='sa_items_width3']").val();
|
595 |
+
var width4 = jQuery("select[name='sa_items_width4']").val();
|
596 |
+
var width5 = jQuery("select[name='sa_items_width5']").val();
|
597 |
+
var width6 = jQuery("select[name='sa_items_width6']").val();
|
598 |
+
if ((width1 == '1') && (width2 == '1') && (width3 == '1') && (width4 == '1') && (width5 == '1') && (width6 == '1')) {
|
599 |
+
jQuery(".sa_items_all_one").css("display","block");
|
600 |
+
} else {
|
601 |
+
jQuery(".sa_items_all_one").css("display","none");
|
602 |
+
jQuery('#sa_hero_slider').prop('checked', false); // uncheck 'Hero Slider' checkbox
|
603 |
+
document.getElementById('sa_hero_slider_note').style.display = 'none';
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
|
608 |
+
|
609 |
// ##### CHANGE EVENT HANDLER FOR 'Use Popup Image as Slide Background' #####
|
610 |
function change_slide_popup_background(slide_no) {
|
611 |
var pro_version = document.getElementById('sa_pro_version').value;
|
owl-carousel/owl.carousel2.thumbs.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! owl.carousel2.thumbs - v0.1.8 | (c) 2016 @gijsroge | MIT license | https://github.com/gijsroge/OwlCarousel2-Thumbs */
|
2 |
+
!function(a,b,c,d){"use strict";var e=function(b){this.owl=b,this._thumbcontent=[],this._identifier=0,this.owl_currentitem=this.owl.options.startPosition,this.$element=this.owl.$element,this._handlers={"prepared.owl.carousel":a.proxy(function(b){if(!b.namespace||!this.owl.options.thumbs||this.owl.options.thumbImage||this.owl.options.thumbsPrerendered||this.owl.options.thumbImage){if(b.namespace&&this.owl.options.thumbs&&this.owl.options.thumbImage){var c=a(b.content).find("img");this._thumbcontent.push(c)}}else a(b.content).find("[data-thumb]").attr("data-thumb")!==d&&this._thumbcontent.push(a(b.content).find("[data-thumb]").attr("data-thumb"))},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this.owl.options.thumbs&&(this.render(),this.listen(),this._identifier=this.owl.$element.data("slider-id"),this.setActive())},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this.owl.options.thumbs&&(this._identifier=this.owl.$element.data("slider-id"),this.setActive())},this)},this.owl.options=a.extend({},e.Defaults,this.owl.options),this.owl.$element.on(this._handlers)};e.Defaults={thumbs:!0,thumbImage:!1,thumbContainerClass:"owl-thumbs",thumbItemClass:"owl-thumb-item",moveThumbsInside:!1},e.prototype.listen=function(){var b=this.owl.options;b.thumbsPrerendered&&(this._thumbcontent._thumbcontainer=a("."+b.thumbContainerClass)),a(this._thumbcontent._thumbcontainer).on("click",this._thumbcontent._thumbcontainer.children(),a.proxy(function(c){this._identifier=a(c.target).closest("."+b.thumbContainerClass).data("slider-id");var d=a(c.target).parent().is(this._thumbcontent._thumbcontainer)?a(c.target).index():a(c.target).closest("."+b.thumbItemClass).index();b.thumbsPrerendered?a("[data-slider-id="+this._identifier+"]").trigger("to.owl.carousel",[d,b.dotsSpeed,!0]):this.owl.to(d,b.dotsSpeed),c.preventDefault()},this))},e.prototype.render=function(){var b=this.owl.options;b.thumbsPrerendered?(this._thumbcontent._thumbcontainer=a("."+b.thumbContainerClass),b.moveThumbsInside&&this._thumbcontent._thumbcontainer.appendTo(this.$element)):this._thumbcontent._thumbcontainer=a("<div>").addClass(b.thumbContainerClass).appendTo(this.$element);var c;if(b.thumbImage)for(c=0;c<this._thumbcontent.length;++c)this._thumbcontent._thumbcontainer.append("<button class="+b.thumbItemClass+'><img src="'+this._thumbcontent[c].attr("src")+'" alt="'+this._thumbcontent[c].attr("alt")+'" /></button>');else for(c=0;c<this._thumbcontent.length;++c)this._thumbcontent._thumbcontainer.append("<button class="+b.thumbItemClass+">"+this._thumbcontent[c]+"</button>")},e.prototype.setActive=function(){this.owl_currentitem=this.owl._current-this.owl._clones.length/2,this.owl_currentitem===this.owl._items.length&&(this.owl_currentitem=0);var b=this.owl.options,c=b.thumbsPrerendered?a("."+b.thumbContainerClass+'[data-slider-id="'+this._identifier+'"]'):this._thumbcontent._thumbcontainer;c.children().filter(".active").removeClass("active"),c.children().eq(this.owl_currentitem).addClass("active")},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this.owl.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Thumbs=e}(window.Zepto||window.jQuery,window,document);
|
owl-carousel/sa-owl-theme.css
CHANGED
@@ -175,6 +175,94 @@
|
|
175 |
background-color:rgba(255,255,255,0.8) !important;
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
/* MAGNIFIC POPUP */
|
179 |
.sa_custom_popup {
|
180 |
position:relative;
|
175 |
background-color:rgba(255,255,255,0.8) !important;
|
176 |
}
|
177 |
|
178 |
+
/* HERO SLIDER (SA PRO) */
|
179 |
+
.white .sa_hero_slider,
|
180 |
+
.black .sa_hero_slider {
|
181 |
+
height:100vh !important;
|
182 |
+
}
|
183 |
+
.white .sa_hero_slider .owl-stage-outer,
|
184 |
+
.black .sa_hero_slider .owl-stage-outer,
|
185 |
+
.white .sa_hero_slider .owl-stage-outer .owl-stage,
|
186 |
+
.black .sa_hero_slider .owl-stage-outer .owl-stage,
|
187 |
+
.white .sa_hero_slider .owl-stage-outer .owl-stage .owl-item,
|
188 |
+
.black .sa_hero_slider .owl-stage-outer .owl-stage .owl-item,
|
189 |
+
.white .sa_hero_slider .owl-stage-outer .owl-stage .owl-item .sa_hover_container,
|
190 |
+
.black .sa_hero_slider .owl-stage-outer .owl-stage .owl-item .sa_hover_container {
|
191 |
+
height:100% !important;
|
192 |
+
}
|
193 |
+
|
194 |
+
/* THUMBNAIL PAGINATION (SA PRO) */
|
195 |
+
.sa_owl_thumbs_wrap {
|
196 |
+
display:block !important;
|
197 |
+
z-index:2 !important;
|
198 |
+
text-align:center !important;
|
199 |
+
}
|
200 |
+
.sa_owl_thumbs_wrap .owl-thumbs {
|
201 |
+
display:block !important;
|
202 |
+
margin:auto !important;
|
203 |
+
text-align:center !important;
|
204 |
+
font-size:0px !important;
|
205 |
+
line-height:0px !important;
|
206 |
+
}
|
207 |
+
.sa_owl_thumbs_wrap .owl-thumbs .owl-thumb-item {
|
208 |
+
display:inline-block !important;
|
209 |
+
cursor:pointer;
|
210 |
+
transition:all .3s ease-in-out !important;
|
211 |
+
-webkit-transition:all .3s ease-in-out !important;
|
212 |
+
-moz-transition:all .3s ease-in-out !important;
|
213 |
+
-o-transition:all .3s ease-in-out !important;
|
214 |
+
}
|
215 |
+
.sa_owl_thumbs_wrap .owl-thumbs .active,
|
216 |
+
.sa_owl_thumbs_wrap .owl-thumbs .owl-thumb-item:hover {
|
217 |
+
opacity:1.0 !important;
|
218 |
+
}
|
219 |
+
.sa_thumbs_inside_bottom,
|
220 |
+
.sa_thumbs_inside_top {
|
221 |
+
position:absolute !important;
|
222 |
+
width:100% !important;
|
223 |
+
}
|
224 |
+
.sa_thumbs_inside_bottom {
|
225 |
+
bottom:0px !important;
|
226 |
+
}
|
227 |
+
.sa_thumbs_inside_top {
|
228 |
+
top:0px !important;
|
229 |
+
}
|
230 |
+
.sa_thumbs_inside_left,
|
231 |
+
.sa_thumbs_inside_right {
|
232 |
+
position:absolute !important;
|
233 |
+
top:0px !important;
|
234 |
+
height:100% !important;
|
235 |
+
padding:0px !important;
|
236 |
+
box-sizing:content-box !important;
|
237 |
+
padding-top:0px !important;
|
238 |
+
padding-bottom:0px !important;
|
239 |
+
overflow:hidden !important;
|
240 |
+
}
|
241 |
+
.sa_thumbs_inside_left .owl-thumbs,
|
242 |
+
.sa_thumbs_inside_right .owl-thumbs {
|
243 |
+
position:absolute !important;
|
244 |
+
top:50% !important;
|
245 |
+
transform:translate(0px,-50%) !important;
|
246 |
+
max-height:100% !important;
|
247 |
+
box-sizing:content-box !important;
|
248 |
+
width:100% !important;
|
249 |
+
padding-right:20px !important;
|
250 |
+
overflow-y:scroll !important;
|
251 |
+
overflow-x:hidden !important;
|
252 |
+
}
|
253 |
+
.sa_thumbs_outside_bottom {
|
254 |
+
position:relative !important;
|
255 |
+
width:100% !important;
|
256 |
+
}
|
257 |
+
@media only screen and (max-width:999px) {
|
258 |
+
.white .sa_thumbs_hide_tablet,
|
259 |
+
.black .sa_thumbs_hide_tablet { display:none !important; }
|
260 |
+
}
|
261 |
+
@media only screen and (max-width:767px) {
|
262 |
+
.white .sa_thumbs_hide_mobile,
|
263 |
+
.black .sa_thumbs_hide_mobile { display:none !important; }
|
264 |
+
}
|
265 |
+
|
266 |
/* MAGNIFIC POPUP */
|
267 |
.sa_custom_popup {
|
268 |
position:relative;
|
php/slide-anything-admin.php
CHANGED
@@ -49,11 +49,8 @@ function cpt_slider_plugin_activation() {
|
|
49 |
$content .= "<p>Lorem ipsum dolor sit amet, cu usu cibo vituperata, id ius probo maiestatis inciderint, sit eu vide volutpat.</p>\n";
|
50 |
$content .= "</div>\n";
|
51 |
update_post_meta($cpt_id, "sa_slide".$i."_content", $content);
|
52 |
-
|
53 |
-
update_post_meta($cpt_id, "sa_slide".$i."
|
54 |
-
update_post_meta($cpt_id, "sa_slide".$i."_image_size", "contain");
|
55 |
-
update_post_meta($cpt_id, "sa_slide".$i."_image_repeat", "no-repeat");
|
56 |
-
update_post_meta($cpt_id, "sa_slide".$i."_image_color", $color);
|
57 |
update_post_meta($cpt_id, "sa_slide".$i."_link_url", "");
|
58 |
update_post_meta($cpt_id, "sa_slide".$i."_link_target", "_self");
|
59 |
update_post_meta($cpt_id, "sa_slide".$i."_popup_type", "NONE");
|
@@ -90,6 +87,7 @@ function cpt_slider_plugin_activation() {
|
|
90 |
update_post_meta($cpt_id, 'sa_items_width5', 4);
|
91 |
update_post_meta($cpt_id, 'sa_items_width6', 4);
|
92 |
update_post_meta($cpt_id, 'sa_transition', 'fade');
|
|
|
93 |
update_post_meta($cpt_id, 'sa_css_id', 'sample_slider');
|
94 |
update_post_meta($cpt_id, 'sa_background_color', '#fafafa');
|
95 |
update_post_meta($cpt_id, 'sa_border_width', 1);
|
@@ -107,6 +105,17 @@ function cpt_slider_plugin_activation() {
|
|
107 |
update_post_meta($cpt_id, 'sa_slide_icons_location', 'Center Center');
|
108 |
update_post_meta($cpt_id, 'sa_slide_icons_visible', '0');
|
109 |
update_post_meta($cpt_id, 'sa_slide_icons_color', 'white');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
}
|
112 |
|
@@ -371,6 +380,7 @@ function cpt_slider_add_meta_boxes() {
|
|
371 |
add_meta_box('cpt_slider_shortcode', __('Shortcode / Preview'), 'cpt_slider_shortcode_content', 'sa_slider', 'side', 'high');
|
372 |
add_meta_box('cpt_slider_items', __('Items Displayed'), 'cpt_slider_items_content', 'sa_slider', 'side', 'default');
|
373 |
add_meta_box('cpt_slider_style', __('Slider Style'), 'cpt_slider_style_content', 'sa_slider', 'side', 'default');
|
|
|
374 |
remove_meta_box( 'mymetabox_revslider_0', 'sa_slider', 'normal' ); // remove revolution slider meta box
|
375 |
}
|
376 |
|
@@ -716,13 +726,14 @@ function cpt_slider_slides_content($post) {
|
|
716 |
$slide_data[$count]['content'] = get_post_meta($post->ID, $slide_edit_id, true);
|
717 |
$slide_data[$count]['char_count'] = get_post_meta($post->ID, $slide_char_count, true);
|
718 |
$slide_data[$count]['del_id'] = "sa_slide".$i."_delete";
|
719 |
-
$slide_data[$count]['image_id'] = "sa_slide".$i."_image_id";
|
720 |
$slide_data[$count]['thumb'] = "slide".$i."_thumb";
|
721 |
$slide_data[$count]['image_del'] = "slide".$i."_image_del";
|
|
|
722 |
$slide_data[$count]['image_pos'] = "sa_slide".$i."_image_pos";
|
723 |
$slide_data[$count]['image_size'] = "sa_slide".$i."_image_size";
|
724 |
$slide_data[$count]['image_repeat'] = "sa_slide".$i."_image_repeat";
|
725 |
$slide_data[$count]['image_color'] = "sa_slide".$i."_image_color";
|
|
|
726 |
$slide_data[$count]['link_url'] = "sa_slide".$i."_link_url";
|
727 |
$slide_data[$count]['link_target'] = "sa_slide".$i."_link_target";
|
728 |
if ($sa_pro_version) {
|
@@ -795,20 +806,30 @@ function cpt_slider_slides_content($post) {
|
|
795 |
echo "<div id='slide".$tabs_num."_background_tab' class='sa_slide_tab'>\n";
|
796 |
|
797 |
// GET BACKGROUND IMAGE DATA FOR THIS SLIDE (image id, position, size, repeat and color) FROM DATABASE
|
798 |
-
$
|
799 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
800 |
if ($slide_image_pos == '') {
|
801 |
$slide_image_pos = 'left top';
|
802 |
}
|
803 |
-
$slide_image_size = get_post_meta($post->ID, $slide_data[$i]['image_size'], true);
|
804 |
if ($slide_image_size == '') {
|
805 |
$slide_image_size = 'contain';
|
806 |
}
|
807 |
-
$slide_image_repeat = get_post_meta($post->ID, $slide_data[$i]['image_repeat'], true);
|
808 |
if ($slide_image_repeat == '') {
|
809 |
$slide_image_repeat = 'no-repeat';
|
810 |
}
|
811 |
-
$slide_image_color = get_post_meta($post->ID, $slide_data[$i]['image_color'], true);
|
812 |
if ($slide_image_color == '') {
|
813 |
$slide_image_color = "rgba(0,0,0,0)";
|
814 |
}
|
@@ -1326,6 +1347,7 @@ function cpt_slider_shortcode_content($post) {
|
|
1326 |
|
1327 |
// ##### META BOX CONTENT - 'Items Displayed' BOX #####
|
1328 |
function cpt_slider_items_content($post) {
|
|
|
1329 |
$items_width1 = intval(get_post_meta($post->ID, 'sa_items_width1', true));
|
1330 |
$items_width2 = intval(get_post_meta($post->ID, 'sa_items_width2', true));
|
1331 |
$items_width3 = intval(get_post_meta($post->ID, 'sa_items_width3', true));
|
@@ -1418,7 +1440,12 @@ function cpt_slider_items_content($post) {
|
|
1418 |
$option_arr[8] = 'Bounce Out';
|
1419 |
$option_arr[9] = 'Roll Out';
|
1420 |
$option_arr[10] = 'Slide Down';
|
1421 |
-
|
|
|
|
|
|
|
|
|
|
|
1422 |
echo "<span style='color:firebrick !important;'>Slide Transition</span><select style='max-width:100px !important;' name='sa_transition'>";
|
1423 |
for ($i = 0; $i < count($option_arr); $i++) {
|
1424 |
if ($transition == $option_arr[$i]) {
|
@@ -1428,6 +1455,45 @@ function cpt_slider_items_content($post) {
|
|
1428 |
}
|
1429 |
}
|
1430 |
echo "</select></div>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1431 |
|
1432 |
echo "</div>\n";
|
1433 |
}
|
@@ -1713,6 +1779,179 @@ function cpt_slider_style_content($post) {
|
|
1713 |
|
1714 |
|
1715 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1716 |
// ##### ACTION HOOK - SAVE CUSTOM POST TYPE ('Slide Anything') DATA #####
|
1717 |
function cpt_slider_save_postdata() {
|
1718 |
global $post;
|
@@ -1792,11 +2031,7 @@ function cpt_slider_save_postdata() {
|
|
1792 |
// save slide content only if slide has not been marked for deletion
|
1793 |
$slides_saved++;
|
1794 |
$slide_edit_id_save = "sa_slide".$slides_saved."_content";
|
1795 |
-
$
|
1796 |
-
$slide_image_pos_saved = "sa_slide".$slides_saved."_image_pos";
|
1797 |
-
$slide_image_size_saved = "sa_slide".$slides_saved."_image_size";
|
1798 |
-
$slide_image_repeat_saved = "sa_slide".$slides_saved."_image_repeat";
|
1799 |
-
$slide_image_color_saved = "sa_slide".$slides_saved."_image_color";
|
1800 |
$slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
|
1801 |
$slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
|
1802 |
if ($sa_pro_version) {
|
@@ -1812,11 +2047,8 @@ function cpt_slider_save_postdata() {
|
|
1812 |
$slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
|
1813 |
}
|
1814 |
update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
|
1815 |
-
|
1816 |
-
update_post_meta($post->ID, $
|
1817 |
-
update_post_meta($post->ID, $slide_image_size_saved, $slide_image_size_val);
|
1818 |
-
update_post_meta($post->ID, $slide_image_repeat_saved, $slide_image_repeat_val);
|
1819 |
-
update_post_meta($post->ID, $slide_image_color_saved, $slide_image_color_val);
|
1820 |
update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
|
1821 |
update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
|
1822 |
if ($sa_pro_version) {
|
@@ -1836,11 +2068,7 @@ function cpt_slider_save_postdata() {
|
|
1836 |
// (REPEAT THE CODE ABOVE HERE!!!)
|
1837 |
$slides_saved++;
|
1838 |
$slide_edit_id_save = "sa_slide".$slides_saved."_content";
|
1839 |
-
$
|
1840 |
-
$slide_image_pos_saved = "sa_slide".$slides_saved."_image_pos";
|
1841 |
-
$slide_image_size_saved = "sa_slide".$slides_saved."_image_size";
|
1842 |
-
$slide_image_repeat_saved = "sa_slide".$slides_saved."_image_repeat";
|
1843 |
-
$slide_image_color_saved = "sa_slide".$slides_saved."_image_color";
|
1844 |
$slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
|
1845 |
$slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
|
1846 |
if ($sa_pro_version) {
|
@@ -1856,11 +2084,8 @@ function cpt_slider_save_postdata() {
|
|
1856 |
$slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
|
1857 |
}
|
1858 |
update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
|
1859 |
-
|
1860 |
-
update_post_meta($post->ID, $
|
1861 |
-
update_post_meta($post->ID, $slide_image_size_saved, $slide_image_size_val);
|
1862 |
-
update_post_meta($post->ID, $slide_image_repeat_saved, $slide_image_repeat_val);
|
1863 |
-
update_post_meta($post->ID, $slide_image_color_saved, $slide_image_color_val);
|
1864 |
update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
|
1865 |
update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
|
1866 |
if ($sa_pro_version) {
|
@@ -1926,11 +2151,8 @@ function cpt_slider_save_postdata() {
|
|
1926 |
$slide2_popup_width = abs(intval($_POST["sa_slide".$slide2."_popup_width"])); // SANATIZE
|
1927 |
}
|
1928 |
update_post_meta($post->ID, "sa_slide".$slide2."_content", $slide1_content);
|
1929 |
-
|
1930 |
-
update_post_meta($post->ID, "sa_slide".$slide2."
|
1931 |
-
update_post_meta($post->ID, "sa_slide".$slide2."_image_size", $slide1_image_size);
|
1932 |
-
update_post_meta($post->ID, "sa_slide".$slide2."_image_repeat", $slide1_image_repeat);
|
1933 |
-
update_post_meta($post->ID, "sa_slide".$slide2."_image_color", $slide1_image_color);
|
1934 |
update_post_meta($post->ID, "sa_slide".$slide2."_link_url", $slide1_link_url);
|
1935 |
update_post_meta($post->ID, "sa_slide".$slide2."_link_target", $slide1_link_target);
|
1936 |
if ($sa_pro_version) {
|
@@ -1946,11 +2168,8 @@ function cpt_slider_save_postdata() {
|
|
1946 |
update_post_meta($post->ID, "sa_slide".$slide2."_popup_width", $slide1_popup_width);
|
1947 |
}
|
1948 |
update_post_meta($post->ID, "sa_slide".$slide1."_content", $slide2_content);
|
1949 |
-
|
1950 |
-
update_post_meta($post->ID, "sa_slide".$slide1."
|
1951 |
-
update_post_meta($post->ID, "sa_slide".$slide1."_image_size", $slide2_image_size);
|
1952 |
-
update_post_meta($post->ID, "sa_slide".$slide1."_image_repeat", $slide2_image_repeat);
|
1953 |
-
update_post_meta($post->ID, "sa_slide".$slide1."_image_color", $slide2_image_color);
|
1954 |
update_post_meta($post->ID, "sa_slide".$slide1."_link_url", $slide2_link_url);
|
1955 |
update_post_meta($post->ID, "sa_slide".$slide1."_link_target", $slide2_link_target);
|
1956 |
if ($sa_pro_version) {
|
@@ -2050,6 +2269,11 @@ function cpt_slider_save_postdata() {
|
|
2050 |
update_post_meta($post->ID, 'sa_items_width5', abs(intval($_POST['sa_items_width5']))); // SANATIZE
|
2051 |
update_post_meta($post->ID, 'sa_items_width6', abs(intval($_POST['sa_items_width6']))); // SANATIZE
|
2052 |
update_post_meta($post->ID, 'sa_transition', sanitize_text_field($_POST['sa_transition'])); // SANATIZE
|
|
|
|
|
|
|
|
|
|
|
2053 |
|
2054 |
// UPDATE SLIDER STYLE
|
2055 |
$post_css_id = str_replace("-", "_", $_POST['sa_css_id']);
|
@@ -2099,6 +2323,23 @@ function cpt_slider_save_postdata() {
|
|
2099 |
} else {
|
2100 |
update_post_meta($post->ID, 'sa_lazy_load_images', '0');
|
2101 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2102 |
}
|
2103 |
}
|
2104 |
|
49 |
$content .= "<p>Lorem ipsum dolor sit amet, cu usu cibo vituperata, id ius probo maiestatis inciderint, sit eu vide volutpat.</p>\n";
|
50 |
$content .= "</div>\n";
|
51 |
update_post_meta($cpt_id, "sa_slide".$i."_content", $content);
|
52 |
+
$image_data = "~left top~contain~no-repeat~".$color;
|
53 |
+
update_post_meta($cpt_id, "sa_slide".$i."_image_data", $image_data);
|
|
|
|
|
|
|
54 |
update_post_meta($cpt_id, "sa_slide".$i."_link_url", "");
|
55 |
update_post_meta($cpt_id, "sa_slide".$i."_link_target", "_self");
|
56 |
update_post_meta($cpt_id, "sa_slide".$i."_popup_type", "NONE");
|
87 |
update_post_meta($cpt_id, 'sa_items_width5', 4);
|
88 |
update_post_meta($cpt_id, 'sa_items_width6', 4);
|
89 |
update_post_meta($cpt_id, 'sa_transition', 'fade');
|
90 |
+
update_post_meta($cpt_id, 'sa_hero_slider', '0');
|
91 |
update_post_meta($cpt_id, 'sa_css_id', 'sample_slider');
|
92 |
update_post_meta($cpt_id, 'sa_background_color', '#fafafa');
|
93 |
update_post_meta($cpt_id, 'sa_border_width', 1);
|
105 |
update_post_meta($cpt_id, 'sa_slide_icons_location', 'Center Center');
|
106 |
update_post_meta($cpt_id, 'sa_slide_icons_visible', '0');
|
107 |
update_post_meta($cpt_id, 'sa_slide_icons_color', 'white');
|
108 |
+
update_post_meta($cpt_id, 'sa_thumbs_active', '0');
|
109 |
+
update_post_meta($cpt_id, 'sa_thumbs_location', 'Inside Bottom');
|
110 |
+
update_post_meta($cpt_id, 'sa_thumbs_image_size', 'thumbnail');
|
111 |
+
update_post_meta($cpt_id, 'sa_thumbs_padding', 3);
|
112 |
+
update_post_meta($cpt_id, 'sa_thumbs_width', 150);
|
113 |
+
update_post_meta($cpt_id, 'sa_thumbs_height', 85);
|
114 |
+
update_post_meta($cpt_id, 'sa_thumbs_opacity', 50);
|
115 |
+
update_post_meta($cpt_id, 'sa_thumbs_border_width', 0);
|
116 |
+
update_post_meta($cpt_id, 'sa_thumbs_border_color', '#ffffff');
|
117 |
+
update_post_meta($cpt_id, 'sa_thumbs_resp_tablet', 75);
|
118 |
+
update_post_meta($cpt_id, 'sa_thumbs_resp_mobile', 50);
|
119 |
}
|
120 |
}
|
121 |
|
380 |
add_meta_box('cpt_slider_shortcode', __('Shortcode / Preview'), 'cpt_slider_shortcode_content', 'sa_slider', 'side', 'high');
|
381 |
add_meta_box('cpt_slider_items', __('Items Displayed'), 'cpt_slider_items_content', 'sa_slider', 'side', 'default');
|
382 |
add_meta_box('cpt_slider_style', __('Slider Style'), 'cpt_slider_style_content', 'sa_slider', 'side', 'default');
|
383 |
+
add_meta_box('cpt_slider_thumbs', __('Thumbnail Pagination'), 'cpt_slider_thumbs_content', 'sa_slider', 'side', 'default');
|
384 |
remove_meta_box( 'mymetabox_revslider_0', 'sa_slider', 'normal' ); // remove revolution slider meta box
|
385 |
}
|
386 |
|
726 |
$slide_data[$count]['content'] = get_post_meta($post->ID, $slide_edit_id, true);
|
727 |
$slide_data[$count]['char_count'] = get_post_meta($post->ID, $slide_char_count, true);
|
728 |
$slide_data[$count]['del_id'] = "sa_slide".$i."_delete";
|
|
|
729 |
$slide_data[$count]['thumb'] = "slide".$i."_thumb";
|
730 |
$slide_data[$count]['image_del'] = "slide".$i."_image_del";
|
731 |
+
$slide_data[$count]['image_id'] = "sa_slide".$i."_image_id";
|
732 |
$slide_data[$count]['image_pos'] = "sa_slide".$i."_image_pos";
|
733 |
$slide_data[$count]['image_size'] = "sa_slide".$i."_image_size";
|
734 |
$slide_data[$count]['image_repeat'] = "sa_slide".$i."_image_repeat";
|
735 |
$slide_data[$count]['image_color'] = "sa_slide".$i."_image_color";
|
736 |
+
$slide_data[$count]['image_data'] = "sa_slide".$i."_image_data";
|
737 |
$slide_data[$count]['link_url'] = "sa_slide".$i."_link_url";
|
738 |
$slide_data[$count]['link_target'] = "sa_slide".$i."_link_target";
|
739 |
if ($sa_pro_version) {
|
806 |
echo "<div id='slide".$tabs_num."_background_tab' class='sa_slide_tab'>\n";
|
807 |
|
808 |
// GET BACKGROUND IMAGE DATA FOR THIS SLIDE (image id, position, size, repeat and color) FROM DATABASE
|
809 |
+
$slide_image_data = get_post_meta($post->ID, $slide_data[$i]['image_data'], true);
|
810 |
+
if (isset($slide_image_data) && ($slide_image_data != '')) {
|
811 |
+
$data_arr = explode("~", $slide_image_data);
|
812 |
+
$slide_image_id = $data_arr[0];
|
813 |
+
$slide_image_pos = $data_arr[1];
|
814 |
+
$slide_image_size = $data_arr[2];
|
815 |
+
$slide_image_repeat = $data_arr[3];
|
816 |
+
$slide_image_color = $data_arr[4];
|
817 |
+
} else {
|
818 |
+
$slide_image_id = get_post_meta($post->ID, $slide_data[$i]['image_id'], true);
|
819 |
+
$slide_image_pos = get_post_meta($post->ID, $slide_data[$i]['image_pos'], true);
|
820 |
+
$slide_image_size = get_post_meta($post->ID, $slide_data[$i]['image_size'], true);
|
821 |
+
$slide_image_repeat = get_post_meta($post->ID, $slide_data[$i]['image_repeat'], true);
|
822 |
+
$slide_image_color = get_post_meta($post->ID, $slide_data[$i]['image_color'], true);
|
823 |
+
}
|
824 |
if ($slide_image_pos == '') {
|
825 |
$slide_image_pos = 'left top';
|
826 |
}
|
|
|
827 |
if ($slide_image_size == '') {
|
828 |
$slide_image_size = 'contain';
|
829 |
}
|
|
|
830 |
if ($slide_image_repeat == '') {
|
831 |
$slide_image_repeat = 'no-repeat';
|
832 |
}
|
|
|
833 |
if ($slide_image_color == '') {
|
834 |
$slide_image_color = "rgba(0,0,0,0)";
|
835 |
}
|
1347 |
|
1348 |
// ##### META BOX CONTENT - 'Items Displayed' BOX #####
|
1349 |
function cpt_slider_items_content($post) {
|
1350 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
1351 |
$items_width1 = intval(get_post_meta($post->ID, 'sa_items_width1', true));
|
1352 |
$items_width2 = intval(get_post_meta($post->ID, 'sa_items_width2', true));
|
1353 |
$items_width3 = intval(get_post_meta($post->ID, 'sa_items_width3', true));
|
1440 |
$option_arr[8] = 'Bounce Out';
|
1441 |
$option_arr[9] = 'Roll Out';
|
1442 |
$option_arr[10] = 'Slide Down';
|
1443 |
+
if (($items_width1 == 1) && ($items_width2 == 1) && ($items_width3 == 1) && ($items_width4 == 1) && ($items_width5 == 1) && ($items_width6 == 1)) {
|
1444 |
+
echo "<div class='sa_items_all_one' style='display:block;'>";
|
1445 |
+
} else {
|
1446 |
+
echo "<div class='sa_items_all_one' style='display:none;'>";
|
1447 |
+
}
|
1448 |
+
echo "<em class='sa_tooltip' href='' title='NOTE: Slide transitions only work when the above items displayed are ALL SET TO 1'></em>";
|
1449 |
echo "<span style='color:firebrick !important;'>Slide Transition</span><select style='max-width:100px !important;' name='sa_transition'>";
|
1450 |
for ($i = 0; $i < count($option_arr); $i++) {
|
1451 |
if ($transition == $option_arr[$i]) {
|
1455 |
}
|
1456 |
}
|
1457 |
echo "</select></div>\n";
|
1458 |
+
// hero slider checkbox
|
1459 |
+
$hero_slider = get_post_meta($post->ID, 'sa_hero_slider', true);
|
1460 |
+
if ($hero_slider != '1') {
|
1461 |
+
$hero_slider = '0';
|
1462 |
+
}
|
1463 |
+
if (($items_width1 == 1) && ($items_width2 == 1) && ($items_width3 == 1) && ($items_width4 == 1) && ($items_width5 == 1) && ($items_width6 == 1)) {
|
1464 |
+
echo "<div id='sa_hero_slider_wrapper' class='sa_items_all_one' style='display:block;'>";
|
1465 |
+
} else {
|
1466 |
+
echo "<div id='sa_hero_slider_wrapper' class='sa_items_all_one' style='display:none;'>";
|
1467 |
+
}
|
1468 |
+
echo "<span>Hero Slider</span>";
|
1469 |
+
if ($sa_pro_version) {
|
1470 |
+
if ($hero_slider == '1') {
|
1471 |
+
echo "<input type='checkbox' id='sa_hero_slider' name='sa_hero_slider' value='1' checked/>";
|
1472 |
+
} else {
|
1473 |
+
echo "<input type='checkbox' id='sa_hero_slider' name='sa_hero_slider' value='1'/>";
|
1474 |
+
}
|
1475 |
+
$hs_note1 = "Most WP Theme 'Page Builders' (Visual Composer, Divi, Elementor, SiteOrigin...) allow you create full-width sections in your content. If you are not using a page builder then you will have to manually create a PHP template file to include a full-width container.";
|
1476 |
+
$hs_note2 = "The slider height is set to 100% screen/device height using CSS 'vh' (viewport height). Just about all browsers now support CSS viewport units, except Opera Mini which was installed on the old 'button' phones.";
|
1477 |
+
if ($hero_slider == '1') {
|
1478 |
+
echo "<div id='sa_hero_slider_note' style='display:block;'>";
|
1479 |
+
} else {
|
1480 |
+
echo "<div id='sa_hero_slider_note' style='display:none;'>";
|
1481 |
+
}
|
1482 |
+
echo "<strong>Please Note:</strong>";
|
1483 |
+
echo "<ol><li>Shortcode should be inserted into a full-width section<em class='sa_tooltip' title='".$hs_note1."'></em></li>";
|
1484 |
+
echo "<li>Only works on browsers that support Viewport units - see <a href='https://caniuse.com/#feat=viewport-units' target='_blank'>here</a>";
|
1485 |
+
echo "<em class='sa_tooltip' title='".$hs_note2."'></em></li></ol></div>";
|
1486 |
+
} else {
|
1487 |
+
// display slide anything pro promotional text
|
1488 |
+
echo "<div id='sa_hero_slider_promo'>";
|
1489 |
+
echo "<h4>Available in the PRO VERSION only!</h4>\n";
|
1490 |
+
echo "<p>With <strong>Slide Anything PRO </strong> you can create full width/height <strong>Hero Sliders</strong> ";
|
1491 |
+
echo "which auto-resize depending on device/screen.</p>";
|
1492 |
+
echo "<p>To view a Hero Slider DEMO click:</p>";
|
1493 |
+
echo "<p style='padding-top:2px !important;'><a href='https://edgewebpages.com/hero-slider-with-thumbnails' target='_blank'>HERO SLIDER DEMO</a></p>";
|
1494 |
+
echo "</div>";
|
1495 |
+
}
|
1496 |
+
echo "</div>\n";
|
1497 |
|
1498 |
echo "</div>\n";
|
1499 |
}
|
1779 |
|
1780 |
|
1781 |
|
1782 |
+
// ##### META BOX CONTENT - 'Thumbnails (Pagination)' BOX #####
|
1783 |
+
function cpt_slider_thumbs_content($post) {
|
1784 |
+
$sa_pro_version = validate_slide_anything_pro_registration();
|
1785 |
+
|
1786 |
+
if ($sa_pro_version) {
|
1787 |
+
// get wordpress image size data and save into and array
|
1788 |
+
global $_wp_additional_image_sizes;
|
1789 |
+
$image_size_arr = array();
|
1790 |
+
$count = 0;
|
1791 |
+
foreach (get_intermediate_image_sizes() as $image_size) {
|
1792 |
+
if (in_array($image_size, array('thumbnail', 'medium', 'medium_large', 'large'))) {
|
1793 |
+
$width = get_option("{$image_size}_size_w");
|
1794 |
+
$height = get_option("{$image_size}_size_h");
|
1795 |
+
} elseif (isset($_wp_additional_image_sizes[$image_size])) {
|
1796 |
+
$width = $_wp_additional_image_sizes[$image_size]['width'];
|
1797 |
+
$height = $_wp_additional_image_sizes[$image_size]['height'];
|
1798 |
+
}
|
1799 |
+
if (($width != 0) && ($height != 0)) {
|
1800 |
+
$image_size_arr[$count]['value'] = $image_size;
|
1801 |
+
$image_size_arr[$count]['desc'] = $image_size." (".$width."×".$height.")";
|
1802 |
+
$count++;
|
1803 |
+
}
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
// Use thumbnail pagination (checkbox)
|
1807 |
+
$thumbs_active = get_post_meta($post->ID, 'sa_thumbs_active', true);
|
1808 |
+
if ($thumbs_active == '') {
|
1809 |
+
$thumbs_active = '0';
|
1810 |
+
}
|
1811 |
+
echo "<div class='sa_thumbs_line'><span>Use Thumbnail Pagination:</span>";
|
1812 |
+
if ($thumbs_active == '1') {
|
1813 |
+
echo "<input type='checkbox' id='sa_thumbs_active' name='sa_thumbs_active' value='1' checked/>";
|
1814 |
+
} else {
|
1815 |
+
echo "<input type='checkbox' id='sa_thumbs_active' name='sa_thumbs_active' value='1'/>";
|
1816 |
+
}
|
1817 |
+
echo "</div>\n";
|
1818 |
+
|
1819 |
+
if ($thumbs_active == '1') {
|
1820 |
+
echo "<div id='sa_thumbs_settings' style='display:block;'>\n";
|
1821 |
+
} else {
|
1822 |
+
echo "<div id='sa_thumbs_settings' style='display:none;'>\n";
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
// Thumbs Location (dropdown)
|
1826 |
+
$thumbs_location = get_post_meta($post->ID, 'sa_thumbs_location', true);
|
1827 |
+
if ($thumbs_location == '') {
|
1828 |
+
$thumbs_location = 'inside_bottom';
|
1829 |
+
}
|
1830 |
+
echo "<div class='sa_thumbs_line'><span>Thumbs Location:</span>";
|
1831 |
+
echo "<select id='sa_thumbs_location' name='sa_thumbs_location'>";
|
1832 |
+
$option_arr = array();
|
1833 |
+
$option_arr[0] = 'Inside Bottom';
|
1834 |
+
$option_arr[1] = 'Inside Top';
|
1835 |
+
$option_arr[2] = 'Inside Left';
|
1836 |
+
$option_arr[3] = 'Inside Right';
|
1837 |
+
$option_arr[4] = 'Outside Bottom';
|
1838 |
+
for ($i = 0; $i < count($option_arr); $i++) {
|
1839 |
+
$value = strtolower(str_replace(' ', '_', $option_arr[$i]));
|
1840 |
+
if ($value == $thumbs_location) {
|
1841 |
+
echo "<option value='".$value."' selected>".$option_arr[$i]."</option>";
|
1842 |
+
} else {
|
1843 |
+
echo "<option value='".$value."'>".$option_arr[$i]."</option>";
|
1844 |
+
}
|
1845 |
+
}
|
1846 |
+
echo "</select></div>\n";
|
1847 |
+
|
1848 |
+
// Thumbnail Image Size (dropdown)
|
1849 |
+
$thumbs_image_size = get_post_meta($post->ID, 'sa_thumbs_image_size', true);
|
1850 |
+
if ($thumbs_image_size == '') {
|
1851 |
+
$thumbs_image_size = 'thumbnail';
|
1852 |
+
}
|
1853 |
+
echo "<div class='sa_thumbs_line'><span>Thumbnail Image Size:</span>";
|
1854 |
+
echo "<select id='sa_thumbs_image_size' name='sa_thumbs_image_size'>";
|
1855 |
+
for ($i = 0; $i < count($image_size_arr); $i++) {
|
1856 |
+
if ($image_size_arr[$i]['value'] == $thumbs_image_size) {
|
1857 |
+
echo "<option value='".$image_size_arr[$i]['value']."' selected>".$image_size_arr[$i]['desc']."</option>";
|
1858 |
+
} else {
|
1859 |
+
echo "<option value='".$image_size_arr[$i]['value']."'>".$image_size_arr[$i]['desc']."</option>";
|
1860 |
+
}
|
1861 |
+
}
|
1862 |
+
echo "</select></div>\n";
|
1863 |
+
|
1864 |
+
// Container Padding
|
1865 |
+
$thumbs_padding = get_post_meta($post->ID, 'sa_thumbs_padding', true);
|
1866 |
+
if ($thumbs_padding == '') {
|
1867 |
+
$thumbs_padding = '3';
|
1868 |
+
}
|
1869 |
+
echo "<div class='sa_thumbs_line'><span>Container Padding:</span>";
|
1870 |
+
echo "<input type='text' id='sa_thumbs_padding' name='sa_thumbs_padding' value='".esc_attr($thumbs_padding)."'><em>%</em>";
|
1871 |
+
echo "</div>\n";
|
1872 |
+
|
1873 |
+
// Thumbs Width
|
1874 |
+
$thumbs_width = get_post_meta($post->ID, 'sa_thumbs_width', true);
|
1875 |
+
if ($thumbs_width == '') {
|
1876 |
+
$thumbs_width = '150';
|
1877 |
+
}
|
1878 |
+
echo "<div class='sa_thumbs_line'><span>Thumbs Width:</span>";
|
1879 |
+
echo "<input type='text' id='sa_thumbs_width' name='sa_thumbs_width' value='".esc_attr($thumbs_width)."'><em>px</em>";
|
1880 |
+
echo "</div>\n";
|
1881 |
+
|
1882 |
+
// Thumbs Height
|
1883 |
+
$thumbs_height = get_post_meta($post->ID, 'sa_thumbs_height', true);
|
1884 |
+
if ($thumbs_height == '') {
|
1885 |
+
$thumbs_height = '85';
|
1886 |
+
}
|
1887 |
+
echo "<div class='sa_thumbs_line'><span>Thumbs Height:</span>";
|
1888 |
+
echo "<input type='text' id='sa_thumbs_height' name='sa_thumbs_height' value='".esc_attr($thumbs_height)."'><em>px</em>";
|
1889 |
+
echo "</div>\n";
|
1890 |
+
|
1891 |
+
// Thumbs Opacity
|
1892 |
+
$thumbs_opacity = get_post_meta($post->ID, 'sa_thumbs_opacity', true);
|
1893 |
+
if ($thumbs_opacity == '') {
|
1894 |
+
$thumbs_opacity = '50';
|
1895 |
+
}
|
1896 |
+
echo "<div class='sa_thumbs_line'><span>Thumbs Opacity:</span>";
|
1897 |
+
echo "<input type='text' id='sa_thumbs_opacity' name='sa_thumbs_opacity' value='".esc_attr($thumbs_opacity)."'><em>%</em>";
|
1898 |
+
echo "</div>\n";
|
1899 |
+
|
1900 |
+
echo "<h4>Active Thumb Border Style</h4>";
|
1901 |
+
|
1902 |
+
// Border Width
|
1903 |
+
$thumbs_border_width = get_post_meta($post->ID, 'sa_thumbs_border_width', true);
|
1904 |
+
if ($thumbs_border_width == '') {
|
1905 |
+
$thumbs_border_width = '0';
|
1906 |
+
}
|
1907 |
+
echo "<div class='sa_thumbs_line'><span>Border Width:</span>";
|
1908 |
+
echo "<input type='text' id='sa_thumbs_border_width' name='sa_thumbs_border_width' value='".esc_attr($thumbs_border_width)."'><em>px</em>";
|
1909 |
+
echo "</div>\n";
|
1910 |
+
|
1911 |
+
// Border Color
|
1912 |
+
$thumbs_border_color = get_post_meta($post->ID, 'sa_thumbs_border_color', true);
|
1913 |
+
if ($thumbs_border_color == '') {
|
1914 |
+
$thumbs_border_color = '#ffffff';
|
1915 |
+
}
|
1916 |
+
echo "<div class='sa_thumbs_line'><span>Border Color:</span>";
|
1917 |
+
echo "<input type='text' id='sa_thumbs_border_color' name='sa_thumbs_border_color' value='".esc_attr($thumbs_border_color)."'></div>\n";
|
1918 |
+
|
1919 |
+
echo "<h4>Responsive Thumb Sizes</h4>";
|
1920 |
+
|
1921 |
+
// Tablet Thumb Size
|
1922 |
+
$thumbs_resp_tablet = get_post_meta($post->ID, 'sa_thumbs_resp_tablet', true);
|
1923 |
+
if ($thumbs_resp_tablet == '') {
|
1924 |
+
$thumbs_resp_tablet = '75';
|
1925 |
+
}
|
1926 |
+
echo "<div class='sa_thumbs_line'><span>Tablet Thumb Size:</span>";
|
1927 |
+
echo "<input type='text' id='sa_thumbs_resp_tablet' name='sa_thumbs_resp_tablet' value='".esc_attr($thumbs_resp_tablet)."'><em>%</em>";
|
1928 |
+
echo "</div>\n";
|
1929 |
+
|
1930 |
+
// Mobile Thumb Size
|
1931 |
+
$thumbs_resp_mobile = get_post_meta($post->ID, 'sa_thumbs_resp_mobile', true);
|
1932 |
+
if ($thumbs_resp_mobile == '') {
|
1933 |
+
$thumbs_resp_mobile = '50';
|
1934 |
+
}
|
1935 |
+
echo "<div class='sa_thumbs_line'><span>Mobile Thumb Size:</span>";
|
1936 |
+
echo "<input type='text' id='sa_thumbs_resp_mobile' name='sa_thumbs_resp_mobile' value='".esc_attr($thumbs_resp_mobile)."'><em>%</em>";
|
1937 |
+
echo "</div>\n";
|
1938 |
+
|
1939 |
+
echo "</div>\n"; // #sa_thumbs_settings
|
1940 |
+
|
1941 |
+
} else {
|
1942 |
+
|
1943 |
+
// display slide anything pro promotional text
|
1944 |
+
echo "<div id='sa_thumbs_promo'>";
|
1945 |
+
echo "<h4>Available in the PRO VERSION only!</h4>\n";
|
1946 |
+
echo "<p>With <strong>Slide Anything PRO </strong> you can now add <strong>Thumbnail Pagination</strong>.";
|
1947 |
+
echo "<p>Wiew a Thumbnail Pagination DEMO here:</p>";
|
1948 |
+
echo "<p style='padding-top:2px !important;'><a href='https://edgewebpages.com/hero-slider-with-thumbnails' target='_blank'>THUMBNAIL PAGINATION DEMO</a></p>";
|
1949 |
+
echo "</div>";
|
1950 |
+
}
|
1951 |
+
}
|
1952 |
+
|
1953 |
+
|
1954 |
+
|
1955 |
// ##### ACTION HOOK - SAVE CUSTOM POST TYPE ('Slide Anything') DATA #####
|
1956 |
function cpt_slider_save_postdata() {
|
1957 |
global $post;
|
2031 |
// save slide content only if slide has not been marked for deletion
|
2032 |
$slides_saved++;
|
2033 |
$slide_edit_id_save = "sa_slide".$slides_saved."_content";
|
2034 |
+
$slide_image_data_saved = "sa_slide".$slides_saved."_image_data";
|
|
|
|
|
|
|
|
|
2035 |
$slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
|
2036 |
$slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
|
2037 |
if ($sa_pro_version) {
|
2047 |
$slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
|
2048 |
}
|
2049 |
update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
|
2050 |
+
$slide_image_data_val = $slide_image_id_val."~".$slide_image_pos_val."~".$slide_image_size_val."~".$slide_image_repeat_val."~".$slide_image_color_val;
|
2051 |
+
update_post_meta($post->ID, $slide_image_data_saved, $slide_image_data_val);
|
|
|
|
|
|
|
2052 |
update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
|
2053 |
update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
|
2054 |
if ($sa_pro_version) {
|
2068 |
// (REPEAT THE CODE ABOVE HERE!!!)
|
2069 |
$slides_saved++;
|
2070 |
$slide_edit_id_save = "sa_slide".$slides_saved."_content";
|
2071 |
+
$slide_image_data_saved = "sa_slide".$slides_saved."_image_data";
|
|
|
|
|
|
|
|
|
2072 |
$slide_link_url_saved = "sa_slide".$slides_saved."_link_url";
|
2073 |
$slide_link_target_saved = "sa_slide".$slides_saved."_link_target";
|
2074 |
if ($sa_pro_version) {
|
2084 |
$slide_popup_width_saved = "sa_slide".$slides_saved."_popup_width";
|
2085 |
}
|
2086 |
update_post_meta($post->ID, $slide_edit_id_save, $slide_content);
|
2087 |
+
$slide_image_data_val = $slide_image_id_val."~".$slide_image_pos_val."~".$slide_image_size_val."~".$slide_image_repeat_val."~".$slide_image_color_val;
|
2088 |
+
update_post_meta($post->ID, $slide_image_data_saved, $slide_image_data_val);
|
|
|
|
|
|
|
2089 |
update_post_meta($post->ID, $slide_link_url_saved, $slide_link_url_val);
|
2090 |
update_post_meta($post->ID, $slide_link_target_saved, $slide_link_target_val);
|
2091 |
if ($sa_pro_version) {
|
2151 |
$slide2_popup_width = abs(intval($_POST["sa_slide".$slide2."_popup_width"])); // SANATIZE
|
2152 |
}
|
2153 |
update_post_meta($post->ID, "sa_slide".$slide2."_content", $slide1_content);
|
2154 |
+
$slide1_image_data = $slide1_image_id."~".$slide1_image_pos."~".$slide1_image_size."~".$slide1_image_repeat."~".$slide1_image_color;
|
2155 |
+
update_post_meta($post->ID, "sa_slide".$slide2."_image_data", $slide1_image_data);
|
|
|
|
|
|
|
2156 |
update_post_meta($post->ID, "sa_slide".$slide2."_link_url", $slide1_link_url);
|
2157 |
update_post_meta($post->ID, "sa_slide".$slide2."_link_target", $slide1_link_target);
|
2158 |
if ($sa_pro_version) {
|
2168 |
update_post_meta($post->ID, "sa_slide".$slide2."_popup_width", $slide1_popup_width);
|
2169 |
}
|
2170 |
update_post_meta($post->ID, "sa_slide".$slide1."_content", $slide2_content);
|
2171 |
+
$slide2_image_data = $slide2_image_id."~".$slide2_image_pos."~".$slide2_image_size."~".$slide2_image_repeat."~".$slide2_image_color;
|
2172 |
+
update_post_meta($post->ID, "sa_slide".$slide1."_image_data", $slide2_image_data);
|
|
|
|
|
|
|
2173 |
update_post_meta($post->ID, "sa_slide".$slide1."_link_url", $slide2_link_url);
|
2174 |
update_post_meta($post->ID, "sa_slide".$slide1."_link_target", $slide2_link_target);
|
2175 |
if ($sa_pro_version) {
|
2269 |
update_post_meta($post->ID, 'sa_items_width5', abs(intval($_POST['sa_items_width5']))); // SANATIZE
|
2270 |
update_post_meta($post->ID, 'sa_items_width6', abs(intval($_POST['sa_items_width6']))); // SANATIZE
|
2271 |
update_post_meta($post->ID, 'sa_transition', sanitize_text_field($_POST['sa_transition'])); // SANATIZE
|
2272 |
+
if (isset($_POST['sa_hero_slider']) && ($_POST['sa_hero_slider'] == '1')) {
|
2273 |
+
update_post_meta($post->ID, 'sa_hero_slider', '1');
|
2274 |
+
} else {
|
2275 |
+
update_post_meta($post->ID, 'sa_hero_slider', '0');
|
2276 |
+
}
|
2277 |
|
2278 |
// UPDATE SLIDER STYLE
|
2279 |
$post_css_id = str_replace("-", "_", $_POST['sa_css_id']);
|
2323 |
} else {
|
2324 |
update_post_meta($post->ID, 'sa_lazy_load_images', '0');
|
2325 |
}
|
2326 |
+
|
2327 |
+
// THUMBNAIL PAGINATION
|
2328 |
+
if (isset($_POST['sa_thumbs_active']) && ($_POST['sa_thumbs_active'] == '1')) {
|
2329 |
+
update_post_meta($post->ID, 'sa_thumbs_active', '1');
|
2330 |
+
} else {
|
2331 |
+
update_post_meta($post->ID, 'sa_thumbs_active', '0');
|
2332 |
+
}
|
2333 |
+
update_post_meta($post->ID, 'sa_thumbs_location', sanitize_text_field($_POST['sa_thumbs_location'])); // SANATIZE
|
2334 |
+
update_post_meta($post->ID, 'sa_thumbs_image_size', sanitize_text_field($_POST['sa_thumbs_image_size'])); // SANATIZE
|
2335 |
+
update_post_meta($post->ID, 'sa_thumbs_padding', abs(floatval($_POST['sa_thumbs_padding']))); // SANATIZE
|
2336 |
+
update_post_meta($post->ID, 'sa_thumbs_width', abs(intval($_POST['sa_thumbs_width']))); // SANATIZE
|
2337 |
+
update_post_meta($post->ID, 'sa_thumbs_height', abs(intval($_POST['sa_thumbs_height']))); // SANATIZE
|
2338 |
+
update_post_meta($post->ID, 'sa_thumbs_opacity', abs(intval($_POST['sa_thumbs_opacity']))); // SANATIZE
|
2339 |
+
update_post_meta($post->ID, 'sa_thumbs_border_width', abs(intval($_POST['sa_thumbs_border_width']))); // SANATIZE
|
2340 |
+
update_post_meta($post->ID, 'sa_thumbs_border_color', sanitize_text_field($_POST['sa_thumbs_border_color'])); // SANATIZE
|
2341 |
+
update_post_meta($post->ID, 'sa_thumbs_resp_tablet', abs(intval($_POST['sa_thumbs_resp_tablet']))); // SANATIZE
|
2342 |
+
update_post_meta($post->ID, 'sa_thumbs_resp_mobile', abs(intval($_POST['sa_thumbs_resp_mobile']))); // SANATIZE
|
2343 |
}
|
2344 |
}
|
2345 |
|
php/slide-anything-frontend.php
CHANGED
@@ -23,6 +23,8 @@ function slide_anything_shortcode($atts) {
|
|
23 |
wp_enqueue_script('magnific-popup_js');
|
24 |
wp_register_style('magnific-popup_css', SA_PLUGIN_PATH.'magnific-popup/magnific-popup.css', array(), '1.1.0', 'all');
|
25 |
wp_enqueue_style('magnific-popup_css');
|
|
|
|
|
26 |
}
|
27 |
|
28 |
// EXTRACT SHORTCODE ATTRIBUTES
|
@@ -61,11 +63,21 @@ function slide_anything_shortcode($atts) {
|
|
61 |
} else {
|
62 |
$slide_data["slide".$i."_content"] = $metadata["sa_slide".$i."_content"][0];
|
63 |
}
|
64 |
-
$
|
65 |
-
$
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
$slide_data["slide".$i."_link_url"] = $metadata["sa_slide".$i."_link_url"][0];
|
70 |
$slide_data["slide".$i."_link_target"] = $metadata["sa_slide".$i."_link_target"][0];
|
71 |
if ($slide_data["slide".$i."_link_target"] == '') {
|
@@ -226,6 +238,29 @@ function slide_anything_shortcode($atts) {
|
|
226 |
if (isset($metadata['sa_lazy_load_images'])) {
|
227 |
$slide_data['lazy_load_images'] = $metadata['sa_lazy_load_images'][0];
|
228 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
|
230 |
// REVERSE THE ORDER OF THE SLIDES IF 'Random Order' CHECKBOX IS CHECKED OR
|
231 |
// RE-ORDER SLIDES IN A RANDOM ORDER IF 'Random Order' CHECKBOX IS CHECKED
|
@@ -312,7 +347,11 @@ function slide_anything_shortcode($atts) {
|
|
312 |
$additional_classes = "autohide-arrows";
|
313 |
}
|
314 |
}
|
315 |
-
|
|
|
|
|
|
|
|
|
316 |
if ($sa_pro_version) {
|
317 |
// PRO VERSION - INITIALISE VAIRABLES FOR MAGNIFIC POPUP
|
318 |
$lightbox_function = "open_lightbox_gallery_".$slide_data['css_id'];
|
@@ -424,8 +463,55 @@ function slide_anything_shortcode($atts) {
|
|
424 |
}
|
425 |
$output .= $slide_content."</div>\n"; // .sa_hover_container
|
426 |
}
|
427 |
-
$output .= "</div>\n";
|
428 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
|
430 |
|
431 |
|
@@ -464,6 +550,7 @@ function slide_anything_shortcode($atts) {
|
|
464 |
} else {
|
465 |
$single_item = 0;
|
466 |
}
|
|
|
467 |
$output .= "<script type='text/javascript'>\n";
|
468 |
if ($slide_data['sa_window_onload'] == '1') {
|
469 |
$output .= " document.addEventListener('DOMContentLoaded', function() {\n";
|
@@ -545,6 +632,10 @@ function slide_anything_shortcode($atts) {
|
|
545 |
$output .= " lazyLoad : true,\n";
|
546 |
$output .= " lazyLoadEager: 1,\n";
|
547 |
}
|
|
|
|
|
|
|
|
|
548 |
$output .= " mouseDrag : ".esc_attr($slide_data['mouse_drag']).",\n";
|
549 |
$output .= " touchDrag : ".esc_attr($slide_data['touch_drag'])."\n";
|
550 |
$output .= " });\n";
|
@@ -553,51 +644,110 @@ function slide_anything_shortcode($atts) {
|
|
553 |
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."').css('visibility', 'visible');\n";
|
554 |
|
555 |
// JAVASCRIPT 'WINDOW RESIZE' EVENT TO SET CSS 'min-height' OF SLIDES WITHIN THIS SLIDER
|
556 |
-
|
557 |
-
|
558 |
-
$slide_min_height
|
559 |
-
|
560 |
-
|
561 |
-
$
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
568 |
$output .= " var win_width = jQuery(window).width();\n";
|
569 |
-
$output .= " var
|
570 |
-
|
571 |
-
$output .= "
|
572 |
-
$output .= "
|
573 |
-
$output .= "
|
574 |
-
$output .= "
|
575 |
-
$output .= "
|
576 |
-
$output .= "
|
577 |
-
$output .= "
|
578 |
-
$output .= "
|
579 |
-
$output .= "
|
580 |
-
$output .= "
|
581 |
$output .= " } else {\n";
|
582 |
-
$output .= "
|
|
|
583 |
$output .= " }\n";
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
// set the slide 'min-height' css value
|
598 |
-
$output .= " jQuery('#".esc_attr($slide_data['css_id'])." .owl-item .sa_hover_container').css('min-height', slide_height+'px');\n";
|
599 |
$output .= " }\n";
|
600 |
}
|
|
|
|
|
|
|
601 |
$output .= " });\n";
|
602 |
$output .= "</script>\n";
|
603 |
|
23 |
wp_enqueue_script('magnific-popup_js');
|
24 |
wp_register_style('magnific-popup_css', SA_PLUGIN_PATH.'magnific-popup/magnific-popup.css', array(), '1.1.0', 'all');
|
25 |
wp_enqueue_style('magnific-popup_css');
|
26 |
+
wp_register_script('owl_thumbs_js', SA_PLUGIN_PATH.'owl-carousel/owl.carousel2.thumbs.min.js', array('jquery'), '0.1.8', true);
|
27 |
+
wp_enqueue_script('owl_thumbs_js');
|
28 |
}
|
29 |
|
30 |
// EXTRACT SHORTCODE ATTRIBUTES
|
63 |
} else {
|
64 |
$slide_data["slide".$i."_content"] = $metadata["sa_slide".$i."_content"][0];
|
65 |
}
|
66 |
+
$slide_image_data = $metadata["sa_slide".$i."_image_data"][0];
|
67 |
+
if (isset($slide_image_data) && ($slide_image_data != '')) {
|
68 |
+
$data_arr = explode("~", $slide_image_data);
|
69 |
+
$slide_data["slide".$i."_image_id"] = $data_arr[0];
|
70 |
+
$slide_data["slide".$i."_image_pos"] = $data_arr[1];
|
71 |
+
$slide_data["slide".$i."_image_size"] = $data_arr[2];
|
72 |
+
$slide_data["slide".$i."_image_repeat"] = $data_arr[3];
|
73 |
+
$slide_data["slide".$i."_image_color"] = $data_arr[4];
|
74 |
+
} else {
|
75 |
+
$slide_data["slide".$i."_image_id"] = $metadata["sa_slide".$i."_image_id"][0];
|
76 |
+
$slide_data["slide".$i."_image_pos"] = $metadata["sa_slide".$i."_image_pos"][0];
|
77 |
+
$slide_data["slide".$i."_image_size"] = $metadata["sa_slide".$i."_image_size"][0];
|
78 |
+
$slide_data["slide".$i."_image_repeat"] = $metadata["sa_slide".$i."_image_repeat"][0];
|
79 |
+
$slide_data["slide".$i."_image_color"] = $metadata["sa_slide".$i."_image_color"][0];
|
80 |
+
}
|
81 |
$slide_data["slide".$i."_link_url"] = $metadata["sa_slide".$i."_link_url"][0];
|
82 |
$slide_data["slide".$i."_link_target"] = $metadata["sa_slide".$i."_link_target"][0];
|
83 |
if ($slide_data["slide".$i."_link_target"] == '') {
|
238 |
if (isset($metadata['sa_lazy_load_images'])) {
|
239 |
$slide_data['lazy_load_images'] = $metadata['sa_lazy_load_images'][0];
|
240 |
}
|
241 |
+
// hero slider and slider thumbnails
|
242 |
+
$slide_data['hero_slider'] = '0';
|
243 |
+
$slide_data['thumbs_active'] = '0';
|
244 |
+
if ($sa_pro_version) {
|
245 |
+
$slide_data['hero_slider'] = $metadata['sa_hero_slider'][0];
|
246 |
+
if ($slide_data['hero_slider'] != '1') {
|
247 |
+
$slide_data['hero_slider'] = '0';
|
248 |
+
}
|
249 |
+
$slide_data['thumbs_active'] = $metadata['sa_thumbs_active'][0];
|
250 |
+
if ($slide_data['thumbs_active'] != '1') {
|
251 |
+
$slide_data['thumbs_active'] = '0';
|
252 |
+
}
|
253 |
+
$slide_data['thumbs_location'] = $metadata['sa_thumbs_location'][0];
|
254 |
+
$slide_data['thumbs_image_size'] = $metadata['sa_thumbs_image_size'][0];
|
255 |
+
$slide_data['thumbs_padding'] = $metadata['sa_thumbs_padding'][0];
|
256 |
+
$slide_data['thumbs_width'] = $metadata['sa_thumbs_width'][0];
|
257 |
+
$slide_data['thumbs_height'] = $metadata['sa_thumbs_height'][0];
|
258 |
+
$slide_data['thumbs_opacity'] = $metadata['sa_thumbs_opacity'][0];
|
259 |
+
$slide_data['thumbs_border_width'] = $metadata['sa_thumbs_border_width'][0];
|
260 |
+
$slide_data['thumbs_border_color'] = $metadata['sa_thumbs_border_color'][0];
|
261 |
+
$slide_data['thumbs_resp_tablet'] = $metadata['sa_thumbs_resp_tablet'][0];
|
262 |
+
$slide_data['thumbs_resp_mobile'] = $metadata['sa_thumbs_resp_mobile'][0];
|
263 |
+
}
|
264 |
|
265 |
// REVERSE THE ORDER OF THE SLIDES IF 'Random Order' CHECKBOX IS CHECKED OR
|
266 |
// RE-ORDER SLIDES IN A RANDOM ORDER IF 'Random Order' CHECKBOX IS CHECKED
|
347 |
$additional_classes = "autohide-arrows";
|
348 |
}
|
349 |
}
|
350 |
+
if ($slide_data['hero_slider'] == '1') {
|
351 |
+
$additional_classes .= " sa_hero_slider";
|
352 |
+
}
|
353 |
+
$output .= "<div id='".esc_attr($slide_data['css_id'])."' class='owl-carousel sa_owl_theme ".$additional_classes."' ";
|
354 |
+
$output .= "data-slider-id='".esc_attr($slide_data['css_id'])."' style='visibility:hidden;'>\n";
|
355 |
if ($sa_pro_version) {
|
356 |
// PRO VERSION - INITIALISE VAIRABLES FOR MAGNIFIC POPUP
|
357 |
$lightbox_function = "open_lightbox_gallery_".$slide_data['css_id'];
|
463 |
}
|
464 |
$output .= $slide_content."</div>\n"; // .sa_hover_container
|
465 |
}
|
466 |
+
$output .= "</div>\n"; // .owl-carousel
|
467 |
+
|
468 |
+
|
469 |
+
|
470 |
+
// PRO VERSION - THUMBNAIL PAGINATION
|
471 |
+
if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
|
472 |
+
$thumbs_loc = $slide_data['thumbs_location'];
|
473 |
+
$thumbs_opacity = $slide_data['thumbs_opacity'] / 100;
|
474 |
+
// thumbnail container - set style
|
475 |
+
$thumbs_style = " padding:".$slide_data['thumbs_padding']."%;";
|
476 |
+
if ($thumbs_loc == 'inside_left') {
|
477 |
+
$thumbs_style .= "left:".$slide_data['thumbs_padding']."%; width:".$slide_data['thumbs_width']."px;";
|
478 |
+
} elseif ($thumbs_loc == 'inside_right') {
|
479 |
+
$thumbs_style .= "right:".$slide_data['thumbs_padding']."%; width:".$slide_data['thumbs_width']."px;";
|
480 |
+
} elseif ($thumbs_loc == 'outside_bottom') {
|
481 |
+
$thumbs_style .= " padding-bottom:0px;";
|
482 |
+
}
|
483 |
+
$add_classes = '';
|
484 |
+
if ($slide_data['thumbs_resp_tablet'] == 0) { $add_classes .= ' sa_thumbs_hide_tablet'; }
|
485 |
+
if ($slide_data['thumbs_resp_mobile'] == 0) { $add_classes .= ' sa_thumbs_hide_mobile'; }
|
486 |
+
$output .= "<div id='".esc_attr($slide_data['css_id'])."_thumbs' class='sa_owl_thumbs_wrap sa_thumbs_".$thumbs_loc.$add_classes."' style='".$thumbs_style."'>";
|
487 |
+
$output .= "<div class='owl-thumbs' data-slider-id='".esc_attr($slide_data['css_id'])."'>";
|
488 |
+
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
489 |
+
// get background image for the thumb (slide image background)
|
490 |
+
if ($slide_data["slide".$i."_image_id"] != 0) {
|
491 |
+
$thumb_image_src = wp_get_attachment_image_src($slide_data["slide".$i."_image_id"], $slide_data['thumbs_image_size']);
|
492 |
+
$thumb_image_src = $thumb_image_src[0];
|
493 |
+
} else {
|
494 |
+
// use a placeholder image if slide has no background image
|
495 |
+
$thumb_image_src = SA_PLUGIN_PATH."images/image_placeholder.jpg";
|
496 |
+
}
|
497 |
+
// thumbnail - set style
|
498 |
+
$thumb_style = "background-image:url(\"".$thumb_image_src."\"); ";
|
499 |
+
$thumb_style .= "width:".$slide_data['thumbs_width']."px; ";
|
500 |
+
$thumb_style .= "height:".$slide_data['thumbs_height']."px; ";
|
501 |
+
$thumb_style .= "background-position:".$slide_data["slide".$i."_image_pos"]."; ";
|
502 |
+
$thumb_style .= "background-size:".$slide_data["slide".$i."_image_size"]."; ";
|
503 |
+
$thumb_style .= "background-repeat:".$slide_data["slide".$i."_image_repeat"]."; ";
|
504 |
+
$thumb_style .= "opacity:".$thumbs_opacity."; ";
|
505 |
+
$thumb_style .= "border:solid ".$slide_data['thumbs_border_width']."px transparent";
|
506 |
+
$output .= "<div class='owl-thumb-item' style='".$thumb_style."' title='Slide ".$i."'></div>";
|
507 |
+
}
|
508 |
+
$output .= "</div>"; // .sa_owl_thumbs
|
509 |
+
$output .= "</div>\n"; // .sa_owl_thumbs_wrap
|
510 |
+
}
|
511 |
+
|
512 |
+
|
513 |
+
|
514 |
+
$output .= "</div>\n"; // .white or .black
|
515 |
|
516 |
|
517 |
|
550 |
} else {
|
551 |
$single_item = 0;
|
552 |
}
|
553 |
+
|
554 |
$output .= "<script type='text/javascript'>\n";
|
555 |
if ($slide_data['sa_window_onload'] == '1') {
|
556 |
$output .= " document.addEventListener('DOMContentLoaded', function() {\n";
|
632 |
$output .= " lazyLoad : true,\n";
|
633 |
$output .= " lazyLoadEager: 1,\n";
|
634 |
}
|
635 |
+
if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
|
636 |
+
$output .= " thumbs : true,\n";
|
637 |
+
$output .= " thumbsPrerendered : true,\n";
|
638 |
+
}
|
639 |
$output .= " mouseDrag : ".esc_attr($slide_data['mouse_drag']).",\n";
|
640 |
$output .= " touchDrag : ".esc_attr($slide_data['touch_drag'])."\n";
|
641 |
$output .= " });\n";
|
644 |
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."').css('visibility', 'visible');\n";
|
645 |
|
646 |
// JAVASCRIPT 'WINDOW RESIZE' EVENT TO SET CSS 'min-height' OF SLIDES WITHIN THIS SLIDER
|
647 |
+
if ($slide_data['hero_slider'] != '1') {
|
648 |
+
$slide_min_height = $slide_data['slide_min_height_perc'];
|
649 |
+
if (strpos($slide_min_height, 'px') !== false) {
|
650 |
+
$slide_min_height = 0;
|
651 |
+
}
|
652 |
+
if (($slide_min_height != '') && ($slide_min_height != '0')) {
|
653 |
+
$output .= " sa_resize_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
|
654 |
+
$output .= " window.addEventListener('resize', sa_resize_".esc_attr($slide_data['css_id']).");\n"; // create resize event
|
655 |
+
// RESIZE EVENT FUNCTION (to set slide CSS 'min-heigh')
|
656 |
+
$output .= " function sa_resize_".esc_attr($slide_data['css_id'])."() {\n";
|
657 |
+
// get slide min height setting
|
658 |
+
$output .= " var min_height = '".$slide_min_height."';\n";
|
659 |
+
// get window width
|
660 |
+
$output .= " var win_width = jQuery(window).width();\n";
|
661 |
+
$output .= " var slider_width = jQuery('#".esc_attr($slide_data['css_id'])."').width();\n";
|
662 |
+
// calculate slide width according to window width & number of slides
|
663 |
+
$output .= " if (win_width < 480) {\n";
|
664 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width1']).";\n";
|
665 |
+
$output .= " } else if (win_width < 768) {\n";
|
666 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width2']).";\n";
|
667 |
+
$output .= " } else if (win_width < 980) {\n";
|
668 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width3']).";\n";
|
669 |
+
$output .= " } else if (win_width < 1200) {\n";
|
670 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width4']).";\n";
|
671 |
+
$output .= " } else if (win_width < 1500) {\n";
|
672 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width5']).";\n";
|
673 |
+
$output .= " } else {\n";
|
674 |
+
$output .= " var slide_width = slider_width / ".esc_attr($slide_data['items_width6']).";\n";
|
675 |
+
$output .= " }\n";
|
676 |
+
$output .= " slide_width = Math.round(slide_width);\n";
|
677 |
+
// calculate CSS 'min-height' using the captured 'min-height' data settings for this slider
|
678 |
+
$output .= " var slide_height = '0';\n";
|
679 |
+
$output .= " if (min_height == 'aspect43') {\n";
|
680 |
+
$output .= " slide_height = (slide_width / 4) * 3;";
|
681 |
+
$output .= " slide_height = Math.round(slide_height);\n";
|
682 |
+
$output .= " } else if (min_height == 'aspect169') {\n";
|
683 |
+
$output .= " slide_height = (slide_width / 16) * 9;";
|
684 |
+
$output .= " slide_height = Math.round(slide_height);\n";
|
685 |
+
$output .= " } else {\n";
|
686 |
+
$output .= " slide_height = (slide_width / 100) * min_height;";
|
687 |
+
$output .= " slide_height = Math.round(slide_height);\n";
|
688 |
+
$output .= " }\n";
|
689 |
+
// set the slide 'min-height' css value
|
690 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])." .owl-item .sa_hover_container').css('min-height', slide_height+'px');\n";
|
691 |
+
$output .= " }\n";
|
692 |
+
}
|
693 |
+
}
|
694 |
+
|
695 |
+
|
696 |
+
|
697 |
+
// ### PRO VERSION - JQUERY/JAVASCRIPT CODE FOR THUMBNAIL PAGINATION ###
|
698 |
+
if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
|
699 |
+
|
700 |
+
// BORDER WIDTH IS SET - SET BORDER COLOUR TO THE ACTIVE THUMB
|
701 |
+
if ($slide_data['thumbs_border_width'] > 0) {
|
702 |
+
// set border colour of the active (first) thumb
|
703 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .active').css('border-color', '".$slide_data['thumbs_border_color']."');\n";
|
704 |
+
$output .= " var owl = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
|
705 |
+
// owl carousel change event - set border colour of the active thumb
|
706 |
+
$output .= " owl.on('changed.owl.carousel', function(event) {\n";
|
707 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('border-color', 'transparent');\n";
|
708 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .active').css('border-color', '".$slide_data['thumbs_border_color']."');\n";
|
709 |
+
$output .= " })\n";
|
710 |
+
}
|
711 |
+
|
712 |
+
// RESIZE WINDOW EVENT - RESIZE THUMBS WIDTH & HEIGHT DEPENDING ON WINDOW WIDTH BREAKPOINTS
|
713 |
+
$output .= " sa_resize_thumbs_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
|
714 |
+
$output .= " window.addEventListener('resize', sa_resize_thumbs_".esc_attr($slide_data['css_id']).");\n"; // create resize event
|
715 |
+
$output .= " function sa_resize_thumbs_".esc_attr($slide_data['css_id'])."() {\n";
|
716 |
$output .= " var win_width = jQuery(window).width();\n";
|
717 |
+
$output .= " var tablet_perc = parseFloat(".$slide_data['thumbs_resp_tablet']." / 100);\n";
|
718 |
+
$output .= " var mobile_perc = parseFloat(".$slide_data['thumbs_resp_mobile']." / 100);\n";
|
719 |
+
$output .= " var tablet_width = Math.round(".$slide_data['thumbs_width']." * tablet_perc) + 'px';\n";
|
720 |
+
$output .= " var tablet_height = Math.round(".$slide_data['thumbs_height']." * tablet_perc) + 'px';\n";
|
721 |
+
$output .= " var mobile_width = Math.round(".$slide_data['thumbs_width']." * mobile_perc) + 'px';\n";
|
722 |
+
$output .= " var mobile_height = Math.round(".$slide_data['thumbs_height']." * mobile_perc) + 'px';\n";
|
723 |
+
$output .= " if ((mobile_perc != 0) && (win_width < 768)) {\n";
|
724 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('width', mobile_width);\n";
|
725 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('height', mobile_height);\n";
|
726 |
+
$output .= " } else if ((tablet_perc != 0) && (win_width < 1000)) {\n";
|
727 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('width', tablet_width);\n";
|
728 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('height', tablet_height);\n";
|
729 |
$output .= " } else {\n";
|
730 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('width', '".$slide_data['thumbs_width']."px');\n";
|
731 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs .owl-thumbs .owl-thumb-item').css('height', '".$slide_data['thumbs_height']."px');\n";
|
732 |
$output .= " }\n";
|
733 |
+
// THUMBS POSITION 'Inside Left' or 'Inside Right' - RESIZE CONTAINER WIDTH DEPENDING ON WINDOW WIDTH BREAKPOINTS
|
734 |
+
if (($thumbs_loc == 'inside_left') || ($thumbs_loc == 'inside_right')) {
|
735 |
+
$output .= " if ((mobile_perc != 0) && (win_width < 768)) {\n";
|
736 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('width', mobile_width);\n";
|
737 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('height', mobile_height);\n";
|
738 |
+
$output .= " } else if ((tablet_perc != 0) && (win_width < 1000)) {\n";
|
739 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('width', tablet_width);\n";
|
740 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('height', tablet_height);\n";
|
741 |
+
$output .= " } else {\n";
|
742 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('width', '".$slide_data['thumbs_width']."px');\n";
|
743 |
+
$output .= " jQuery('#".esc_attr($slide_data['css_id'])."_thumbs').css('height', '".$slide_data['thumbs_height']."px');\n";
|
744 |
+
$output .= " }\n";
|
745 |
+
}
|
|
|
|
|
746 |
$output .= " }\n";
|
747 |
}
|
748 |
+
|
749 |
+
|
750 |
+
|
751 |
$output .= " });\n";
|
752 |
$output .= "</script>\n";
|
753 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: simonpedge
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RP7JLGK6VT252
|
4 |
Tags: slider, carousel, content slider, responsive slider, html slider, owl carousel
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.0
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -14,23 +14,27 @@ Create responsive carousels or sliders where the content for each slide can be a
|
|
14 |
|
15 |
Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel 2 jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
Slide Anything has now been rebuilt using Owl Carousel 2, and this now provides many improvements and new features:
|
20 |
|
|
|
|
|
|
|
21 |
* New Lazy Load Images - with this feature enabled, slide images (<img> tags) are only loaded when the relevant slides are displayed (all of the slider's images are NOT loaded up-front).
|
22 |
-
* Infinite Looping -
|
23 |
* New Transition Effects - New Owl Carousel transitions include Slide, Fade, Zoom In, Zoom Out, Flip Out X/Y, Rotate Left/Right, Bounce Out, Roll Out and Slide Down.
|
24 |
-
* Slide Link Feature - A
|
25 |
-
* Modern Browsers - Owl Carousel 2 Uses hardware acceleration with CSS3 Translate3D transitions. Its fast and works like a charm! Slide Anything has CSS2 fallback built-in to support older browsers.
|
26 |
|
27 |
= Slide Anything PRO =
|
28 |
|
29 |
-
[SLIDE ANYTHING PRO](https://edgewebpages.com/) adds
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
|
33 |
-
|
34 |
|
35 |
= Owl Carousel =
|
36 |
|
@@ -38,8 +42,6 @@ For more information about Slide Anything PRO, [CLICK HERE](https://edgewebpages
|
|
38 |
|
39 |
I use Owl Carousel a in various WordPress sites I develop, specifically where I need the additional flexibility to develop a carousel with a more complex layout, or use a layout not catered for by any existing carousel plugin product.
|
40 |
|
41 |
-
Owl Carousel has been tested in following browsers/devices: Chrome, Firefox, Opera, IE7/8/10/11, Microsoft Edge, iPhone/iPad/Mac Safari and Android Chrome.
|
42 |
-
|
43 |
Please view the [FAQ Page](https://wordpress.org/plugins/slide-anything/faq/) for information on how to use `Slide Anything`.
|
44 |
|
45 |
== Installation ==
|
@@ -255,6 +257,9 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
|
|
255 |
= 2.1.21 =
|
256 |
* Replace the 'Load JavaScript during window.onload event' option with a 'Load JavaScript during DOMContentLoaded event' option, which is a much better solution.
|
257 |
|
|
|
|
|
|
|
258 |
== Upgrade Notice ==
|
259 |
|
260 |
= 1.0 =
|
@@ -419,4 +424,7 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
|
|
419 |
* Bug Fix - Fixed an issue where the Slide Anything JavaScript code was not being generated with certain newer themes.
|
420 |
|
421 |
= 2.1.21 =
|
422 |
-
* Replace the 'Load JavaScript during window.onload event' option with a 'Load JavaScript during DOMContentLoaded event' option, which is a much better solution.
|
|
|
|
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RP7JLGK6VT252
|
4 |
Tags: slider, carousel, content slider, responsive slider, html slider, owl carousel
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.0.3
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
14 |
|
15 |
Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel 2 jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
16 |
|
17 |
+
Slide Anything provides many Owl Carousel 2 features, which include:
|
|
|
|
|
18 |
|
19 |
+
* Touch and Drag Support - Designed specially to boost mobile browsing experience. Mouse drag works great on desktop too!
|
20 |
+
* Fully Responsive - You can define the number of slides to display for various breakpoint settings, e.g. 4 slides on desktop, 3 slides on tablet and 2 slides on mobile.
|
21 |
+
* Modern Browsers - Owl uses hardware acceleration with CSS3 Translate3d transitions. Its fast and works like a charm! It also supports CSS2 fallbacks to cater for older browsers.
|
22 |
* New Lazy Load Images - with this feature enabled, slide images (<img> tags) are only loaded when the relevant slides are displayed (all of the slider's images are NOT loaded up-front).
|
23 |
+
* Infinite Looping - introduced with Owl Carousel 2, this feature means that the first slide is now seamlessly displayed after the last slide without any carousel rewind.
|
24 |
* New Transition Effects - New Owl Carousel transitions include Slide, Fade, Zoom In, Zoom Out, Flip Out X/Y, Rotate Left/Right, Bounce Out, Roll Out and Slide Down.
|
25 |
+
* Slide Link Feature - A feature which allows you to create a hover-over link button for any slide within your carousels.
|
|
|
26 |
|
27 |
= Slide Anything PRO =
|
28 |
|
29 |
+
[SLIDE ANYTHING PRO](https://edgewebpages.com/) adds the following extra features:
|
30 |
+
|
31 |
+
* MODAL POPUPS - Each slide can now open a MODAL POPUP, which can be an IMAGE popup, a VIDEO EMBED popup (YouTube/Vimeo), a HTML CODE popup or a popup displaying a WordPress SHORTCODE.
|
32 |
+
* HERO SLIDER - A Hero Slider is a slider that always is 100% of the width/height of the device it's being viewed on (or 100% of the window width/height if on a desktop device).
|
33 |
+
* THUMBNAIL PAGINATION - Allows you to add an area of small clickable thumb images, with each image representing a single slide that can be clicked to navigate to that slide.
|
34 |
|
35 |
+
[MODAL POPUPS DEMO](https://edgewebpages.com/)
|
36 |
|
37 |
+
[HERO SLIDER WITH THUMBNAILS DEMO](https://edgewebpages.com/hero-slider-with-thumbnails/)
|
38 |
|
39 |
= Owl Carousel =
|
40 |
|
42 |
|
43 |
I use Owl Carousel a in various WordPress sites I develop, specifically where I need the additional flexibility to develop a carousel with a more complex layout, or use a layout not catered for by any existing carousel plugin product.
|
44 |
|
|
|
|
|
45 |
Please view the [FAQ Page](https://wordpress.org/plugins/slide-anything/faq/) for information on how to use `Slide Anything`.
|
46 |
|
47 |
== Installation ==
|
257 |
= 2.1.21 =
|
258 |
* Replace the 'Load JavaScript during window.onload event' option with a 'Load JavaScript during DOMContentLoaded event' option, which is a much better solution.
|
259 |
|
260 |
+
= 2.2 =
|
261 |
+
* Added Hero Slider and Thumbnail Pagination support, which are Slide Anything PRO features.
|
262 |
+
|
263 |
== Upgrade Notice ==
|
264 |
|
265 |
= 1.0 =
|
424 |
* Bug Fix - Fixed an issue where the Slide Anything JavaScript code was not being generated with certain newer themes.
|
425 |
|
426 |
= 2.1.21 =
|
427 |
+
* Replace the 'Load JavaScript during window.onload event' option with a 'Load JavaScript during DOMContentLoaded event' option, which is a much better solution.
|
428 |
+
|
429 |
+
= 2.2 =
|
430 |
+
* Added Hero Slider and Thumbnail Pagination support, which are Slide Anything PRO features.
|
slide-anything.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
* Author: Simon Edge
|
7 |
-
* Version: 2.
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|
4 |
* Plugin URI: https://wordpress.org/plugins/slide-anything/
|
5 |
* Description: Slide Anything allows you to create a carousel/slider where the content for each slide can be anything you want - images, text, HTML, and even shortcodes. This plugin uses the Owl Carousel jQuery plugin, and lets you create beautiful, touch enabled, responsive carousels and sliders.
|
6 |
* Author: Simon Edge
|
7 |
+
* Version: 2.2
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|