Slide Anything – Responsive Content / HTML Slider and Carousel - Version 2.1.6

Version Description

  • Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.

=

Download this release

Release Info

Developer simonpedge
Plugin Icon 128x128 Slide Anything – Responsive Content / HTML Slider and Carousel
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

php/slide-anything-admin.php CHANGED
@@ -82,6 +82,7 @@ function cpt_slider_plugin_activation() {
82
  update_post_meta($cpt_id, 'sa_reverse_order', '0');
83
  update_post_meta($cpt_id, 'sa_mouse_drag', '1');
84
  update_post_meta($cpt_id, 'sa_touch_drag', '1');
 
85
  update_post_meta($cpt_id, 'sa_items_width1', 1);
86
  update_post_meta($cpt_id, 'sa_items_width2', 2);
87
  update_post_meta($cpt_id, 'sa_items_width3', 3);
@@ -587,6 +588,19 @@ function cpt_slider_settings_content($post) {
587
  }
588
  echo "<em class='sa_tooltip' href='' title='Allow navigation to previous/next slides on mobile devices by touching screen and dragging left/right'></em>\n";
589
  echo "</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
590
  echo "</div>\n";
591
  echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
592
  echo "</div>\n";
@@ -1973,6 +1987,11 @@ function cpt_slider_save_postdata() {
1973
  } else {
1974
  update_post_meta($post->ID, 'sa_touch_drag', '0');
1975
  }
 
 
 
 
 
1976
 
1977
  // UPDATE SLIDER ITEMS DISPLAYED
1978
  update_post_meta($post->ID, 'sa_items_width1', abs(intval($_POST['sa_items_width1']))); // SANATIZE
82
  update_post_meta($cpt_id, 'sa_reverse_order', '0');
83
  update_post_meta($cpt_id, 'sa_mouse_drag', '1');
84
  update_post_meta($cpt_id, 'sa_touch_drag', '1');
85
+ update_post_meta($cpt_id, 'sa_auto_height', '0');
86
  update_post_meta($cpt_id, 'sa_items_width1', 1);
87
  update_post_meta($cpt_id, 'sa_items_width2', 2);
88
  update_post_meta($cpt_id, 'sa_items_width3', 3);
588
  }
589
  echo "<em class='sa_tooltip' href='' title='Allow navigation to previous/next slides on mobile devices by touching screen and dragging left/right'></em>\n";
590
  echo "</div>\n";
591
+ // AUTO HEIGHT
592
+ $auto_height = get_post_meta($post->ID, 'sa_auto_height', true);
593
+ if ($auto_height == '') {
594
+ $auto_height = '0';
595
+ }
596
+ echo "<div class='sa_setting_checkbox'><span>Auto Height:</span>";
597
+ if ($auto_height == '1') {
598
+ echo "<input type='checkbox' id='sa_auto_height' name='sa_auto_height' value='1' checked/>";
599
+ } else {
600
+ echo "<input type='checkbox' id='sa_auto_height' name='sa_auto_height' value='1'/>";
601
+ }
602
+ echo "<em class='sa_tooltip' title='Only works with 1 item on the screen. When checked the height of slider is automatically changed to match the height for each slide.'></em>";
603
+ echo "</div>\n";
604
  echo "</div>\n";
605
  echo "<div style='clear:both; float:none; width:100%; height:1px;'></div>\n";
606
  echo "</div>\n";
1987
  } else {
1988
  update_post_meta($post->ID, 'sa_touch_drag', '0');
1989
  }
1990
+ if (isset($_POST['sa_auto_height']) && ($_POST['sa_auto_height'] == '1')) {
1991
+ update_post_meta($post->ID, 'sa_auto_height', '1');
1992
+ } else {
1993
+ update_post_meta($post->ID, 'sa_auto_height', '0');
1994
+ }
1995
 
1996
  // UPDATE SLIDER ITEMS DISPLAYED
1997
  update_post_meta($post->ID, 'sa_items_width1', abs(intval($_POST['sa_items_width1']))); // SANATIZE
php/slide-anything-frontend.php CHANGED
@@ -166,6 +166,12 @@ function slide_anything_shortcode($atts) {
166
  } else {
167
  $slide_data['touch_drag'] = 'false';
168
  }
 
 
 
 
 
 
169
  $slide_data['items_width1'] = $metadata['sa_items_width1'][0];
170
  $slide_data['items_width2'] = $metadata['sa_items_width2'][0];
171
  $slide_data['items_width3'] = $metadata['sa_items_width3'][0];
@@ -510,6 +516,7 @@ function slide_anything_shortcode($atts) {
510
  $output .= " slideBy : ".esc_attr($slide_data['slide_by']).",\n";
511
  $output .= " mergeFit : true,\n";
512
  //$output .= " URLhashListener : true,\n";
 
513
  $output .= " mouseDrag : ".esc_attr($slide_data['mouse_drag']).",\n";
514
  $output .= " touchDrag : ".esc_attr($slide_data['touch_drag'])."\n";
515
  $output .= " });\n";
@@ -616,6 +623,7 @@ function slide_anything_shortcode($atts) {
616
  $output .= " gallery: { enabled: true, tCounter: '' },\n";
617
  $output .= " mainClass: 'sa_popup',\n";
618
  $output .= " closeBtnInside: true,\n";
 
619
  $output .= " callbacks: {\n";
620
  $output .= " open: function() {\n";
621
  $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').trigger('stop.owl.autoplay');\n";
166
  } else {
167
  $slide_data['touch_drag'] = 'false';
168
  }
169
+ $slide_data['auto_height'] = $metadata['sa_auto_height'][0];
170
+ if ($slide_data['auto_height'] == '1') {
171
+ $slide_data['auto_height'] = 'true';
172
+ } else {
173
+ $slide_data['auto_height'] = 'false';
174
+ }
175
  $slide_data['items_width1'] = $metadata['sa_items_width1'][0];
176
  $slide_data['items_width2'] = $metadata['sa_items_width2'][0];
177
  $slide_data['items_width3'] = $metadata['sa_items_width3'][0];
516
  $output .= " slideBy : ".esc_attr($slide_data['slide_by']).",\n";
517
  $output .= " mergeFit : true,\n";
518
  //$output .= " URLhashListener : true,\n";
519
+ $output .= " autoHeight : ".esc_attr($slide_data['auto_height']).",\n";
520
  $output .= " mouseDrag : ".esc_attr($slide_data['mouse_drag']).",\n";
521
  $output .= " touchDrag : ".esc_attr($slide_data['touch_drag'])."\n";
522
  $output .= " });\n";
623
  $output .= " gallery: { enabled: true, tCounter: '' },\n";
624
  $output .= " mainClass: 'sa_popup',\n";
625
  $output .= " closeBtnInside: true,\n";
626
+ $output .= " fixedContentPos: true,\n";
627
  $output .= " callbacks: {\n";
628
  $output .= " open: function() {\n";
629
  $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').trigger('stop.owl.autoplay');\n";
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: 4.9.4
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -201,6 +201,9 @@ The `SLIDE STYLE` settings are the style settings for each individual slide with
201
  = 2.1.5 =
202
  * Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
203
 
 
 
 
204
  == Upgrade Notice ==
205
 
206
  = 1.0 =
@@ -316,4 +319,7 @@ The `SLIDE STYLE` settings are the style settings for each individual slide with
316
  * Upgraded Owl Carousel from version 2.3 BETA to version 2.3.3 (production release)
317
 
318
  = 2.1.5 =
319
- * Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
 
 
 
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: 4.9.6
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
201
  = 2.1.5 =
202
  * Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
203
 
204
+ = 2.1.6 =
205
+ * Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.
206
+
207
  == Upgrade Notice ==
208
 
209
  = 1.0 =
319
  * Upgraded Owl Carousel from version 2.3 BETA to version 2.3.3 (production release)
320
 
321
  = 2.1.5 =
322
+ * Bug Fix - Issue with using shortcodes within slides. Certain shortcodes can only be displayed on the front-end (i.e. required resources are only loaded on the front-end), so the 'Preview Slider' feature on the Edit Slider page was causing issues for these shortcodes. So I have displayed this 'Preview Slider' feature for sliders where the 'Allow Shortcodes' checkbox is checked.
323
+
324
+ = 2.1.6 =
325
+ * Added a new 'Auto Height' feature, which automatically resizes the height of the slider according to the current slide's height.
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.5
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.6
8
  * License: GPLv2 or later
9
  */
10