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

Version Description

  • Small Bug Fix: Using the Slide Anything shortcode with an incorrect ID sometimes did not display an error message - this has been resolved

=

Download this release

Release Info

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

Code changes from version 2.3.15 to 2.3.16

php/slide-anything-frontend.php CHANGED
@@ -39,8 +39,9 @@ function slide_anything_shortcode($atts) {
39
  $post_status = get_post_status($id);
40
  if ($post_status == 'publish') {
41
  $metadata = get_metadata('post', $id);
 
42
  }
43
- if (($post_status != 'publish') || (count($metadata) == 0)) {
44
  // SHORTCODE 'id' PARAMETER PROVIDED IS INVALID
45
  $output .= "<div id='sa_invalid_postid'>Slide Anything shortcode error: A valid ID has not been provided</div>\n";
46
  } else {
@@ -201,9 +202,13 @@ function slide_anything_shortcode($atts) {
201
  } else {
202
  $slide_data['touch_drag'] = 'false';
203
  }
204
- $slide_data['click_advance'] = $metadata['sa_click_advance'][0];
205
- if ($slide_data['click_advance'] == '1') {
206
- $slide_data['click_advance'] = 'true';
 
 
 
 
207
  } else {
208
  $slide_data['click_advance'] = 'false';
209
  }
@@ -951,7 +956,7 @@ function slide_anything_shortcode($atts) {
951
  $output .= " var cta_owl = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
952
  $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').click(function() {\n";
953
  $output .= " cta_owl.trigger('next.owl.carousel');\n";
954
- $output .= " });\n";
955
  }
956
  }
957
 
39
  $post_status = get_post_status($id);
40
  if ($post_status == 'publish') {
41
  $metadata = get_metadata('post', $id);
42
+ $post_type = get_post_type($id);
43
  }
44
+ if (($post_status != 'publish') || (count($metadata) == 0) || ($post_type != 'sa_slider')) {
45
  // SHORTCODE 'id' PARAMETER PROVIDED IS INVALID
46
  $output .= "<div id='sa_invalid_postid'>Slide Anything shortcode error: A valid ID has not been provided</div>\n";
47
  } else {
202
  } else {
203
  $slide_data['touch_drag'] = 'false';
204
  }
205
+ if (isset($metadata['sa_click_advance'])) {
206
+ $slide_data['click_advance'] = $metadata['sa_click_advance'][0];
207
+ if ($slide_data['click_advance'] == '1') {
208
+ $slide_data['click_advance'] = 'true';
209
+ } else {
210
+ $slide_data['click_advance'] = 'false';
211
+ }
212
  } else {
213
  $slide_data['click_advance'] = 'false';
214
  }
956
  $output .= " var cta_owl = jQuery('#".esc_attr($slide_data['css_id'])."');\n";
957
  $output .= " jQuery('#".esc_attr($slide_data['css_id'])."').click(function() {\n";
958
  $output .= " cta_owl.trigger('next.owl.carousel');\n";
959
+ $output .= " });\n";
960
  }
961
  }
962
 
readme.txt CHANGED
@@ -341,6 +341,9 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
341
  = 2.3.15 =
342
  * Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide
343
 
 
 
 
344
  == Upgrade Notice ==
345
 
346
  = 1.0 =
@@ -583,4 +586,7 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
583
  * YouTube popups now set the slide background to the YouTube thumbnail by default
584
 
585
  = 2.3.15 =
586
- * Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide
 
 
 
341
  = 2.3.15 =
342
  * Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide
343
 
344
+ = 2.3.16 =
345
+ * Small Bug Fix: Using the Slide Anything shortcode with an incorrect ID sometimes did not display an error message - this has been resolved
346
+
347
  == Upgrade Notice ==
348
 
349
  = 1.0 =
586
  * YouTube popups now set the slide background to the YouTube thumbnail by default
587
 
588
  = 2.3.15 =
589
+ * Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide
590
+
591
+ = 2.3.16 =
592
+ * Small Bug Fix: Using the Slide Anything shortcode with an incorrect ID sometimes did not display an error message - this has been resolved
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.3.15
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.3.16
8
  * License: GPLv2 or later
9
  */
10