Version Description
- Added a new feature to allow you to set slider minimum height in pixels
- Added a new feature so that each slide within a slider has its own unique CSS ID
=
Download this release
Release Info
Developer | simonpedge |
Plugin | Slide Anything – Responsive Content / HTML Slider and Carousel |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- css/slide-anything-admin.css +14 -0
- js/slide-anything-admin.js +12 -2
- php/slide-anything-admin.php +39 -11
- php/slide-anything-frontend.php +11 -1
- readme.txt +9 -1
- slide-anything.php +1 -1
css/slide-anything-admin.css
CHANGED
@@ -143,6 +143,16 @@
|
|
143 |
-moz-transition:all .3s ease-in-out;
|
144 |
-o-transition:all .3s ease-in-out;
|
145 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
#slider_accordion > h3:hover {
|
147 |
background-color:#e8e8e8;
|
148 |
}
|
@@ -150,6 +160,9 @@
|
|
150 |
background-color:#007fff;
|
151 |
color:#f0f0f0;
|
152 |
}
|
|
|
|
|
|
|
153 |
#slider_accordion > h3 .ui-accordion-header-icon {
|
154 |
display:none !important;
|
155 |
}
|
@@ -862,6 +875,7 @@ input.sa_slide_popup_imagetitle:-ms-input-placeholder { color:#c0c0c0 !important
|
|
862 |
background-position:0px 1px !important;
|
863 |
height:20px !important;
|
864 |
padding-left:20px !important;
|
|
|
865 |
cursor:help;
|
866 |
}
|
867 |
#slider_style_metabox #ca_style_min_height em {
|
143 |
-moz-transition:all .3s ease-in-out;
|
144 |
-o-transition:all .3s ease-in-out;
|
145 |
}
|
146 |
+
#slider_accordion > h3 span {
|
147 |
+
float:right !important;
|
148 |
+
display:block !important;
|
149 |
+
padding:2px 0px 0px 10px !important;
|
150 |
+
font-weight:400 !important;
|
151 |
+
font-size:12px !important;
|
152 |
+
line-height:18px !important;
|
153 |
+
text-transform:none !important;
|
154 |
+
color:#a0a0a0;
|
155 |
+
}
|
156 |
#slider_accordion > h3:hover {
|
157 |
background-color:#e8e8e8;
|
158 |
}
|
160 |
background-color:#007fff;
|
161 |
color:#f0f0f0;
|
162 |
}
|
163 |
+
#slider_accordion > h3.ui-state-active span {
|
164 |
+
color:#f0f0f0;
|
165 |
+
}
|
166 |
#slider_accordion > h3 .ui-accordion-header-icon {
|
167 |
display:none !important;
|
168 |
}
|
875 |
background-position:0px 1px !important;
|
876 |
height:20px !important;
|
877 |
padding-left:20px !important;
|
878 |
+
padding-bottom:3px !important;
|
879 |
cursor:help;
|
880 |
}
|
881 |
#slider_style_metabox #ca_style_min_height em {
|
js/slide-anything-admin.js
CHANGED
@@ -275,6 +275,11 @@ jQuery(function() {
|
|
275 |
if (slide_min_height_type == "percent") {
|
276 |
document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
|
277 |
document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
|
|
|
|
|
|
|
|
|
|
|
278 |
} else if (slide_min_height_type == '43') {
|
279 |
document.getElementById('sa_slide_min_height').value = 'aspect43';
|
280 |
document.getElementById('sa_slide_min_height_wrapper').style.display = 'none';
|
@@ -294,13 +299,18 @@ jQuery(function() {
|
|
294 |
jQuery('#sa_slide_min_height_wrapper .ui-spinner-button').click(function() {
|
295 |
jQuery(this).siblings('input').change();
|
296 |
});
|
297 |
-
// ##### CHANGE EVENT HANDLER FOR SLIDE MINIMUM HEIGHT (PIXELS) #####
|
298 |
jQuery('#sa_slide_min_height').change(function() {
|
299 |
var slide_min_height = document.getElementById('sa_slide_min_height').value;
|
|
|
300 |
if (jQuery.isNumeric(slide_min_height)) {
|
301 |
if ((slide_min_height >= 0) && (slide_min_height <= 999)) {
|
302 |
// valid number
|
303 |
-
|
|
|
|
|
|
|
|
|
304 |
} else {
|
305 |
document.getElementById('sa_slide_min_height').value = '0'; // number out of range
|
306 |
document.getElementById('sa_slide_min_height_hidden').value = '0';
|
275 |
if (slide_min_height_type == "percent") {
|
276 |
document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
|
277 |
document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
|
278 |
+
document.getElementById('mh_suffix').innerHTML = '%';
|
279 |
+
} else if (slide_min_height_type == 'px') {
|
280 |
+
document.getElementById('sa_slide_min_height').value = document.getElementById('sa_slide_min_height_hidden').value;
|
281 |
+
document.getElementById('sa_slide_min_height_wrapper').style.display = 'block';
|
282 |
+
document.getElementById('mh_suffix').innerHTML = 'px';
|
283 |
} else if (slide_min_height_type == '43') {
|
284 |
document.getElementById('sa_slide_min_height').value = 'aspect43';
|
285 |
document.getElementById('sa_slide_min_height_wrapper').style.display = 'none';
|
299 |
jQuery('#sa_slide_min_height_wrapper .ui-spinner-button').click(function() {
|
300 |
jQuery(this).siblings('input').change();
|
301 |
});
|
302 |
+
// ##### CHANGE EVENT HANDLER FOR SLIDE MINIMUM HEIGHT (PERCENT/PIXELS) #####
|
303 |
jQuery('#sa_slide_min_height').change(function() {
|
304 |
var slide_min_height = document.getElementById('sa_slide_min_height').value;
|
305 |
+
var min_height_type = jQuery('input[name=sa_slide_min_height_type]:checked').val();
|
306 |
if (jQuery.isNumeric(slide_min_height)) {
|
307 |
if ((slide_min_height >= 0) && (slide_min_height <= 999)) {
|
308 |
// valid number
|
309 |
+
if (min_height_type == 'percent') {
|
310 |
+
document.getElementById('sa_slide_min_height_hidden').value = slide_min_height;
|
311 |
+
} else {
|
312 |
+
document.getElementById('sa_slide_min_height_hidden').value = slide_min_height + 'px';
|
313 |
+
}
|
314 |
} else {
|
315 |
document.getElementById('sa_slide_min_height').value = '0'; // number out of range
|
316 |
document.getElementById('sa_slide_min_height_hidden').value = '0';
|
php/slide-anything-admin.php
CHANGED
@@ -597,6 +597,7 @@ function cpt_slider_settings_content($post) {
|
|
597 |
// ##### META BOX CONTENT - 'Slides' BOX #####
|
598 |
function cpt_slider_slides_content($post) {
|
599 |
$num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
|
|
|
600 |
$sa_pro_version = validate_slide_anything_pro_registration();
|
601 |
// DISABLE VISUAL EDITOR CHECKBOX
|
602 |
$disable_visual_editor = get_post_meta($post->ID, 'sa_disable_visual_editor', true);
|
@@ -753,7 +754,12 @@ function cpt_slider_slides_content($post) {
|
|
753 |
// ###### LOOP TO DISPLAY INPUT ELEMENTS FOR EACH SLIDE ######
|
754 |
echo "<div id='slider_accordion'>\n";
|
755 |
for ($i = 0; $i < count($slide_data); $i++) {
|
756 |
-
|
|
|
|
|
|
|
|
|
|
|
757 |
echo "<div>\n";
|
758 |
|
759 |
// ### DISPLAY THE SLIDE CONTENT EDITOR (textarea field) ###
|
@@ -1511,29 +1517,47 @@ function cpt_slider_style_content($post) {
|
|
1511 |
}
|
1512 |
echo "<div style='padding:5px 0px 10px;'>\n";
|
1513 |
$tooltip = "The minimum height of each slide. Can be set to a percentage of the slide width, or for image sliders set to a 4:3 or 16:9 aspect ratio.";
|
1514 |
-
echo "<div class='ca_style_setting_line' id='ca_style_min_height'
|
|
|
1515 |
if ($slide_min_height == 'aspect43') {
|
1516 |
-
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent'/><em>%</em>";
|
|
|
1517 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43' checked/><em>4:3</em>";
|
1518 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1519 |
} elseif ($slide_min_height == 'aspect169') {
|
1520 |
-
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent'/><em>%</em>";
|
|
|
1521 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1522 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169' checked/><em>16:9</em>";
|
|
|
|
|
|
|
|
|
|
|
1523 |
} else {
|
1524 |
-
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' checked/><em>%</em>";
|
|
|
1525 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1526 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1527 |
}
|
1528 |
echo "</div>\n";
|
1529 |
if (($slide_min_height == 'aspect43') || ($slide_min_height == 'aspect169')) {
|
1530 |
-
echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper' style='display:none;'
|
1531 |
-
echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($slide_min_height)."'
|
|
|
1532 |
echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='0'/>\n";
|
1533 |
} else {
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1537 |
}
|
1538 |
echo "</div>\n";
|
1539 |
|
@@ -1969,7 +1993,11 @@ function cpt_slider_save_postdata() {
|
|
1969 |
update_post_meta($post->ID, 'sa_wrapper_padd_right', abs(intval($_POST['sa_wrapper_padd_right']))); // SANATIZE
|
1970 |
update_post_meta($post->ID, 'sa_wrapper_padd_bottom', abs(intval($_POST['sa_wrapper_padd_bottom']))); // SANATIZE
|
1971 |
update_post_meta($post->ID, 'sa_wrapper_padd_left', abs(intval($_POST['sa_wrapper_padd_left']))); // SANATIZE
|
1972 |
-
|
|
|
|
|
|
|
|
|
1973 |
update_post_meta($post->ID, 'sa_slide_padding_tb', abs(floatval($_POST['sa_slide_padding_tb']))); // SANATIZE
|
1974 |
update_post_meta($post->ID, 'sa_slide_padding_lr', abs(floatval($_POST['sa_slide_padding_lr']))); // SANATIZE
|
1975 |
update_post_meta($post->ID, 'sa_slide_margin_lr', abs(floatval($_POST['sa_slide_margin_lr']))); // SANATIZE
|
597 |
// ##### META BOX CONTENT - 'Slides' BOX #####
|
598 |
function cpt_slider_slides_content($post) {
|
599 |
$num_slides = get_post_meta($post->ID, 'sa_num_slides', true);
|
600 |
+
$slider_css_id = get_post_meta($post->ID, 'sa_css_id', true);
|
601 |
$sa_pro_version = validate_slide_anything_pro_registration();
|
602 |
// DISABLE VISUAL EDITOR CHECKBOX
|
603 |
$disable_visual_editor = get_post_meta($post->ID, 'sa_disable_visual_editor', true);
|
754 |
// ###### LOOP TO DISPLAY INPUT ELEMENTS FOR EACH SLIDE ######
|
755 |
echo "<div id='slider_accordion'>\n";
|
756 |
for ($i = 0; $i < count($slide_data); $i++) {
|
757 |
+
// DISPLAY ACCORDION HEADING
|
758 |
+
echo "<h3>Slide ".$slide_data[$i]['slide_no'];
|
759 |
+
$css_id = $slider_css_id."_slide".sprintf('%02d', $slide_data[$i]['slide_no']);
|
760 |
+
// display CSS ID for the current slide
|
761 |
+
echo "<span>#".$css_id."</span>";
|
762 |
+
echo "</h3>\n";
|
763 |
echo "<div>\n";
|
764 |
|
765 |
// ### DISPLAY THE SLIDE CONTENT EDITOR (textarea field) ###
|
1517 |
}
|
1518 |
echo "<div style='padding:5px 0px 10px;'>\n";
|
1519 |
$tooltip = "The minimum height of each slide. Can be set to a percentage of the slide width, or for image sliders set to a 4:3 or 16:9 aspect ratio.";
|
1520 |
+
echo "<div class='ca_style_setting_line' id='ca_style_min_height' style='padding-bottom:7px !important;'>";
|
1521 |
+
echo "<span class='sa_tooltip' title='".esc_attr($tooltip)."'>Min Height:</span><br/>";
|
1522 |
if ($slide_min_height == 'aspect43') {
|
1523 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
|
1524 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
|
1525 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43' checked/><em>4:3</em>";
|
1526 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1527 |
} elseif ($slide_min_height == 'aspect169') {
|
1528 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
|
1529 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
|
1530 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1531 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169' checked/><em>16:9</em>";
|
1532 |
+
} elseif (strpos($slide_min_height, 'px') !== false) {
|
1533 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;'/><em>%</em>";
|
1534 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px' checked/><em>px</em>";
|
1535 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1536 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1537 |
} else {
|
1538 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='percent' style='margin-left:20px !important;' checked/><em>%</em>";
|
1539 |
+
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='px'/><em>px</em>";
|
1540 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='43'/><em>4:3</em>";
|
1541 |
echo "<input type='radio' name='sa_slide_min_height_type' class='sa_slide_min_height_type' value='169'/><em>16:9</em>";
|
1542 |
}
|
1543 |
echo "</div>\n";
|
1544 |
if (($slide_min_height == 'aspect43') || ($slide_min_height == 'aspect169')) {
|
1545 |
+
echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper' style='display:none;'>";
|
1546 |
+
echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($slide_min_height)."'/>";
|
1547 |
+
echo "<em id='mh_suffix'>".$mh_suffix."</em></div>\n";
|
1548 |
echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='0'/>\n";
|
1549 |
} else {
|
1550 |
+
if (strpos($slide_min_height, 'px') !== false) {
|
1551 |
+
$mh_value = str_replace('px', '', $slide_min_height);
|
1552 |
+
$mh_suffix = 'px';
|
1553 |
+
} else {
|
1554 |
+
$mh_value = $slide_min_height;
|
1555 |
+
$mh_suffix = '%';
|
1556 |
+
}
|
1557 |
+
echo "<div class='ca_style_setting_line' id='sa_slide_min_height_wrapper'><span style='width:20px;'> </span>";
|
1558 |
+
echo "<input type='text' id='sa_slide_min_height' name='sa_slide_min_height' value='".esc_attr($mh_value)."'/>";
|
1559 |
+
echo "<em id='mh_suffix'>".$mh_suffix."</em></div>\n";
|
1560 |
+
echo "<input type='hidden' id='sa_slide_min_height_hidden' name='sa_slide_min_height_hidden' value='".esc_attr($mh_value)."'/>\n";
|
1561 |
}
|
1562 |
echo "</div>\n";
|
1563 |
|
1993 |
update_post_meta($post->ID, 'sa_wrapper_padd_right', abs(intval($_POST['sa_wrapper_padd_right']))); // SANATIZE
|
1994 |
update_post_meta($post->ID, 'sa_wrapper_padd_bottom', abs(intval($_POST['sa_wrapper_padd_bottom']))); // SANATIZE
|
1995 |
update_post_meta($post->ID, 'sa_wrapper_padd_left', abs(intval($_POST['sa_wrapper_padd_left']))); // SANATIZE
|
1996 |
+
if ($_POST['sa_slide_min_height_type'] == 'px') {
|
1997 |
+
update_post_meta($post->ID, 'sa_slide_min_height_perc', sanitize_text_field($_POST['sa_slide_min_height']).'px'); // SANATIZE
|
1998 |
+
} else {
|
1999 |
+
update_post_meta($post->ID, 'sa_slide_min_height_perc', sanitize_text_field($_POST['sa_slide_min_height'])); // SANATIZE
|
2000 |
+
}
|
2001 |
update_post_meta($post->ID, 'sa_slide_padding_tb', abs(floatval($_POST['sa_slide_padding_tb']))); // SANATIZE
|
2002 |
update_post_meta($post->ID, 'sa_slide_padding_lr', abs(floatval($_POST['sa_slide_padding_lr']))); // SANATIZE
|
2003 |
update_post_meta($post->ID, 'sa_slide_margin_lr', abs(floatval($_POST['sa_slide_margin_lr']))); // SANATIZE
|
php/slide-anything-frontend.php
CHANGED
@@ -55,6 +55,7 @@ function slide_anything_shortcode($atts) {
|
|
55 |
}
|
56 |
$slide_data['css_id'] = $metadata['sa_css_id'][0];
|
57 |
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
|
|
58 |
// get the valid content character count and the actual content character count
|
59 |
$slide_data["slide".$i."_valid_char_count"] = $metadata["sa_slide".$i."_char_count"][0];
|
60 |
if ($slide_data["slide".$i."_valid_char_count"] == 0) {
|
@@ -211,6 +212,7 @@ function slide_anything_shortcode($atts) {
|
|
211 |
if (($slide_data['reverse_order'] == 'true') || ($slide_data['random_order'] == 'true')) {
|
212 |
$reorder_arr = array();
|
213 |
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
|
|
214 |
$reorder_arr[$i-1]['content'] = $slide_data["slide".$i."_content"];
|
215 |
$reorder_arr[$i-1]['image_id'] = $slide_data["slide".$i."_image_id"];
|
216 |
$reorder_arr[$i-1]['image_pos'] = $slide_data["slide".$i."_image_pos"];
|
@@ -243,6 +245,7 @@ function slide_anything_shortcode($atts) {
|
|
243 |
$reorder_arr = $reverse_arr;
|
244 |
}
|
245 |
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
|
|
246 |
$slide_data["slide".$i."_content"] = $reorder_arr[$i-1]['content'];
|
247 |
$slide_data["slide".$i."_image_id"] = $reorder_arr[$i-1]['image_id'];
|
248 |
$slide_data["slide".$i."_image_pos"] = $reorder_arr[$i-1]['image_pos'];
|
@@ -321,6 +324,9 @@ function slide_anything_shortcode($atts) {
|
|
321 |
$slide_style .= "background-size:".$slide_image_size."; ";
|
322 |
$slide_style .= "background-repeat:".$slide_image_repeat."; ";
|
323 |
$slide_style .= "background-color:".$slide_image_color."; ";
|
|
|
|
|
|
|
324 |
|
325 |
// BUILD SLIDE LINK HOVER BUTTON
|
326 |
$link_output = '';
|
@@ -349,7 +355,8 @@ function slide_anything_shortcode($atts) {
|
|
349 |
// DISPLAY SLIDE OUTPUT
|
350 |
//$data_hash = $slide_data['css_id']."_slide".sprintf('%02d', $i);
|
351 |
//$output .= "<div class='sa_hover_container' data-hash='".$data_hash."' style='".esc_attr($slide_style)."'>";
|
352 |
-
$
|
|
|
353 |
if (($link_output != '') || ($popup_output != '')) {
|
354 |
if ($slide_data['slide_icons_location'] == 'Top Left') {
|
355 |
// icons location - top left
|
@@ -510,6 +517,9 @@ function slide_anything_shortcode($atts) {
|
|
510 |
|
511 |
// JAVASCRIPT 'WINDOW RESIZE' EVENT TO SET CSS 'min-height' OF SLIDES WITHIN THIS SLIDER
|
512 |
$slide_min_height = $slide_data['slide_min_height_perc'];
|
|
|
|
|
|
|
513 |
if (($slide_min_height != '') && ($slide_min_height != '0')) {
|
514 |
$output .= " sa_resize_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
|
515 |
$output .= " window.addEventListener('resize', sa_resize_".esc_attr($slide_data['css_id']).");\n"; // create resize event
|
55 |
}
|
56 |
$slide_data['css_id'] = $metadata['sa_css_id'][0];
|
57 |
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
58 |
+
$slide_data["slide".$i."_num"] = $i;
|
59 |
// get the valid content character count and the actual content character count
|
60 |
$slide_data["slide".$i."_valid_char_count"] = $metadata["sa_slide".$i."_char_count"][0];
|
61 |
if ($slide_data["slide".$i."_valid_char_count"] == 0) {
|
212 |
if (($slide_data['reverse_order'] == 'true') || ($slide_data['random_order'] == 'true')) {
|
213 |
$reorder_arr = array();
|
214 |
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
215 |
+
$reorder_arr[$i-1]['num'] = $slide_data["slide".$i."_num"];
|
216 |
$reorder_arr[$i-1]['content'] = $slide_data["slide".$i."_content"];
|
217 |
$reorder_arr[$i-1]['image_id'] = $slide_data["slide".$i."_image_id"];
|
218 |
$reorder_arr[$i-1]['image_pos'] = $slide_data["slide".$i."_image_pos"];
|
245 |
$reorder_arr = $reverse_arr;
|
246 |
}
|
247 |
for ($i = 1; $i <= $slide_data['num_slides']; $i++) {
|
248 |
+
$slide_data["slide".$i."_num"] = $reorder_arr[$i-1]['num'];
|
249 |
$slide_data["slide".$i."_content"] = $reorder_arr[$i-1]['content'];
|
250 |
$slide_data["slide".$i."_image_id"] = $reorder_arr[$i-1]['image_id'];
|
251 |
$slide_data["slide".$i."_image_pos"] = $reorder_arr[$i-1]['image_pos'];
|
324 |
$slide_style .= "background-size:".$slide_image_size."; ";
|
325 |
$slide_style .= "background-repeat:".$slide_image_repeat."; ";
|
326 |
$slide_style .= "background-color:".$slide_image_color."; ";
|
327 |
+
if (strpos($slide_data['slide_min_height_perc'], 'px') !== false) {
|
328 |
+
$slide_style .= "min-height:".$slide_data['slide_min_height_perc']."; ";
|
329 |
+
}
|
330 |
|
331 |
// BUILD SLIDE LINK HOVER BUTTON
|
332 |
$link_output = '';
|
355 |
// DISPLAY SLIDE OUTPUT
|
356 |
//$data_hash = $slide_data['css_id']."_slide".sprintf('%02d', $i);
|
357 |
//$output .= "<div class='sa_hover_container' data-hash='".$data_hash."' style='".esc_attr($slide_style)."'>";
|
358 |
+
$css_id = $slide_data['css_id']."_slide".sprintf('%02d', $slide_data["slide".$i."_num"]);
|
359 |
+
$output .= "<div id='".$css_id."' class='sa_hover_container' style='".esc_attr($slide_style)."'>";
|
360 |
if (($link_output != '') || ($popup_output != '')) {
|
361 |
if ($slide_data['slide_icons_location'] == 'Top Left') {
|
362 |
// icons location - top left
|
517 |
|
518 |
// JAVASCRIPT 'WINDOW RESIZE' EVENT TO SET CSS 'min-height' OF SLIDES WITHIN THIS SLIDER
|
519 |
$slide_min_height = $slide_data['slide_min_height_perc'];
|
520 |
+
if (strpos($slide_min_height, 'px') !== false) {
|
521 |
+
$slide_min_height = 0;
|
522 |
+
}
|
523 |
if (($slide_min_height != '') && ($slide_min_height != '0')) {
|
524 |
$output .= " sa_resize_".esc_attr($slide_data['css_id'])."();\n"; // initial call of resize function
|
525 |
$output .= " window.addEventListener('resize', sa_resize_".esc_attr($slide_data['css_id']).");\n"; // create resize event
|
readme.txt
CHANGED
@@ -188,6 +188,10 @@ The `SLIDE STYLE` settings are the style settings for each individual slide with
|
|
188 |
= 2.1.1 =
|
189 |
* Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
|
190 |
|
|
|
|
|
|
|
|
|
191 |
== Upgrade Notice ==
|
192 |
|
193 |
= 1.0 =
|
@@ -290,4 +294,8 @@ The `SLIDE STYLE` settings are the style settings for each individual slide with
|
|
290 |
* Although a BETA, version 2.3 seems pretty stable, and OC has been sitting at version 2.1.1 for over a year now.
|
291 |
|
292 |
= 2.1.1 =
|
293 |
-
* Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
|
|
|
|
|
|
|
|
188 |
= 2.1.1 =
|
189 |
* Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
|
190 |
|
191 |
+
= 2.1.2 =
|
192 |
+
* Added a new feature to allow you to set slider minimum height in pixels
|
193 |
+
* Added a new feature so that each slide within a slider has its own unique CSS ID
|
194 |
+
|
195 |
== Upgrade Notice ==
|
196 |
|
197 |
= 1.0 =
|
294 |
* Although a BETA, version 2.3 seems pretty stable, and OC has been sitting at version 2.1.1 for over a year now.
|
295 |
|
296 |
= 2.1.1 =
|
297 |
+
* Bug Fix - Owl Carousel changed the CSS Style used for slide images in version 2.3. Changed the CSS style for images back to what was used in version 2.2.1 of Owl Carousel, so that sliders already created on sites continue to look the same.
|
298 |
+
|
299 |
+
= 2.1.2 =
|
300 |
+
* Added a new feature to allow you to set slider minimum height in pixels
|
301 |
+
* Added a new feature so that each slide within a slider has its own unique CSS ID
|
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.1.
|
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.1.2
|
8 |
* License: GPLv2 or later
|
9 |
*/
|
10 |
|