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

Version Description

  • Added 'Click to Advance' feature which when enabled allows users to click on the slider to advance it one slide

=

Download this release

Release Info

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

Code changes from version 2.3.14 to 2.3.15

owl-carousel/sa-owl-theme.css CHANGED
@@ -7,6 +7,9 @@
7
  .owl-carousel .owl-stage-outer {
8
  width:100% !important;
9
  }
 
 
 
10
  /* ### ERROR MESSAGES ### */
11
  #sa_invalid_postid {
12
  width:100% !important;
7
  .owl-carousel .owl-stage-outer {
8
  width:100% !important;
9
  }
10
+ .owl-carousel .owl-wrapper-outer{
11
+ z-index:1 !important;
12
+ }
13
  /* ### ERROR MESSAGES ### */
14
  #sa_invalid_postid {
15
  width:100% !important;
php/slide-anything-admin.php CHANGED
@@ -79,6 +79,7 @@ function cpt_slider_plugin_activation() {
79
  update_post_meta($cpt_id, 'sa_reverse_order', '0');
80
  update_post_meta($cpt_id, 'sa_mouse_drag', '0');
81
  update_post_meta($cpt_id, 'sa_touch_drag', '1');
 
82
  update_post_meta($cpt_id, 'sa_auto_height', '0');
83
  update_post_meta($cpt_id, 'sa_vert_center', '0');
84
  update_post_meta($cpt_id, 'sa_items_width1', 1);
@@ -655,6 +656,19 @@ function cpt_slider_settings_content($post) {
655
  }
656
  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";
657
  echo "</div>\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  // AUTO HEIGHT
659
  $auto_height = get_post_meta($post->ID, 'sa_auto_height', true);
660
  if ($auto_height == '') {
@@ -2514,6 +2528,11 @@ function cpt_slider_save_postdata() {
2514
  } else {
2515
  update_post_meta($post->ID, 'sa_touch_drag', '0');
2516
  }
 
 
 
 
 
2517
  if (isset($_POST['sa_auto_height']) && ($_POST['sa_auto_height'] == '1')) {
2518
  update_post_meta($post->ID, 'sa_auto_height', '1');
2519
  } else {
79
  update_post_meta($cpt_id, 'sa_reverse_order', '0');
80
  update_post_meta($cpt_id, 'sa_mouse_drag', '0');
81
  update_post_meta($cpt_id, 'sa_touch_drag', '1');
82
+ update_post_meta($cpt_id, 'sa_click_advance', '0');
83
  update_post_meta($cpt_id, 'sa_auto_height', '0');
84
  update_post_meta($cpt_id, 'sa_vert_center', '0');
85
  update_post_meta($cpt_id, 'sa_items_width1', 1);
656
  }
657
  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";
658
  echo "</div>\n";
659
+ // CLICK TO ADVANCE
660
+ $click_advance = get_post_meta($post->ID, 'sa_click_advance', true);
661
+ if ($click_advance == '') {
662
+ $click_advance = '0';
663
+ }
664
+ echo "<div class='sa_setting_checkbox'><span>Click to Advance:</span>";
665
+ if ($click_advance == '1') {
666
+ echo "<input type='checkbox' id='sa_click_advance' name='sa_click_advance' value='1' checked/>";
667
+ } else {
668
+ echo "<input type='checkbox' id='sa_click_advance' name='sa_click_advance' value='1'/>";
669
+ }
670
+ echo "<em class='sa_tooltip' href='' title='Clicking on the slider advances to the next slide. NOTE: Only works when the Mouse Drag and Touch Drag options are NOT checked.'></em>\n";
671
+ echo "</div>\n";
672
  // AUTO HEIGHT
673
  $auto_height = get_post_meta($post->ID, 'sa_auto_height', true);
674
  if ($auto_height == '') {
2528
  } else {
2529
  update_post_meta($post->ID, 'sa_touch_drag', '0');
2530
  }
2531
+ if (isset($_POST['sa_click_advance']) && ($_POST['sa_click_advance'] == '1')) {
2532
+ update_post_meta($post->ID, 'sa_click_advance', '1');
2533
+ } else {
2534
+ update_post_meta($post->ID, 'sa_click_advance', '0');
2535
+ }
2536
  if (isset($_POST['sa_auto_height']) && ($_POST['sa_auto_height'] == '1')) {
2537
  update_post_meta($post->ID, 'sa_auto_height', '1');
2538
  } else {
php/slide-anything-frontend.php CHANGED
@@ -201,6 +201,12 @@ function slide_anything_shortcode($atts) {
201
  } else {
202
  $slide_data['touch_drag'] = 'false';
203
  }
 
 
 
 
 
 
204
  if (isset($metadata['sa_auto_height'])) {
205
  $slide_data['auto_height'] = $metadata['sa_auto_height'][0];
206
  if ($slide_data['auto_height'] == '1') {
@@ -939,6 +945,18 @@ function slide_anything_shortcode($atts) {
939
 
940
 
941
 
 
 
 
 
 
 
 
 
 
 
 
 
942
  // ### PRO VERSION - JQUERY/JAVASCRIPT CODE FOR THUMBNAIL PAGINATION ###
943
  if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
944
 
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
+ }
210
  if (isset($metadata['sa_auto_height'])) {
211
  $slide_data['auto_height'] = $metadata['sa_auto_height'][0];
212
  if ($slide_data['auto_height'] == '1') {
945
 
946
 
947
 
948
+ // JAVASCRIPT FOR 'CLICK TO ADVANCE' OPTION ONLY
949
+ if ($slide_data['click_advance'] == 'true') {
950
+ if (($slide_data['touch_drag'] == 'false') && ($slide_data['mouse_drag'] == 'false')) {
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
+
958
+
959
+
960
  // ### PRO VERSION - JQUERY/JAVASCRIPT CODE FOR THUMBNAIL PAGINATION ###
961
  if (($sa_pro_version) && ($slide_data['thumbs_active'] == '1')) {
962
 
readme.txt CHANGED
@@ -338,6 +338,9 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
338
  = 2.3.14 =
339
  * YouTube popups now set the slide background to the YouTube thumbnail by default
340
 
 
 
 
341
  == Upgrade Notice ==
342
 
343
  = 1.0 =
@@ -577,4 +580,7 @@ Adding a SLIDE ANYTHING slider using the WordPress 5.0 'Block Editor' is pretty
577
  * Minor bug fix: PHP 'Undefined Index' warnings were sometimes displayed after upgrading to Slide Anything PRO (and the slider was created using the Slide Anything FREE plugin)
578
 
579
  = 2.3.14 =
580
- * YouTube popups now set the slide background to the YouTube thumbnail by default
 
 
 
338
  = 2.3.14 =
339
  * YouTube popups now set the slide background to the YouTube thumbnail by default
340
 
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 =
580
  * Minor bug fix: PHP 'Undefined Index' warnings were sometimes displayed after upgrading to Slide Anything PRO (and the slider was created using the Slide Anything FREE plugin)
581
 
582
  = 2.3.14 =
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
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.14
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.15
8
  * License: GPLv2 or later
9
  */
10