Slider by WD – Responsive Slider - Version 1.1.67

Version Description

  • Added: Full width slider on small screens.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Slider by WD – Responsive Slider
Version 1.1.67
Comparing to
See all releases

Code changes from version 1.1.66 to 1.1.67

admin/controllers/WDSControllerSliders_wds.php CHANGED
@@ -220,6 +220,7 @@ class WDSControllerSliders_wds {
220
  $slider_loop = ((isset($params_array['slider_loop'])) ? (int) esc_html(stripslashes($params_array['slider_loop'])) : 1);
221
  $hide_on_mobile = ((isset($params_array['hide_on_mobile'])) ? (int) esc_html(stripslashes($params_array['hide_on_mobile'])) : 0);
222
  $twoway_slideshow = ((isset($params_array['twoway_slideshow'])) ? (int) esc_html(stripslashes($params_array['twoway_slideshow'])) : 0);
 
223
  $data = array(
224
  'name' => $name,
225
  'published' => $published,
@@ -334,6 +335,7 @@ class WDSControllerSliders_wds {
334
  'slider_loop' => $slider_loop,
335
  'hide_on_mobile' => $hide_on_mobile,
336
  'twoway_slideshow' => $twoway_slideshow,
 
337
  );
338
 
339
  if (!$slider_id) {
@@ -857,6 +859,7 @@ class WDSControllerSliders_wds {
857
  'mouse_wheel_nav' => $slider_row->mouse_wheel_nav,
858
  'keyboard_nav' => $slider_row->keyboard_nav,
859
  'fixed_bg' => $slider_row->fixed_bg,
 
860
  ));
861
  $new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
862
 
220
  $slider_loop = ((isset($params_array['slider_loop'])) ? (int) esc_html(stripslashes($params_array['slider_loop'])) : 1);
221
  $hide_on_mobile = ((isset($params_array['hide_on_mobile'])) ? (int) esc_html(stripslashes($params_array['hide_on_mobile'])) : 0);
222
  $twoway_slideshow = ((isset($params_array['twoway_slideshow'])) ? (int) esc_html(stripslashes($params_array['twoway_slideshow'])) : 0);
223
+ $full_width_for_mobile = ((isset($params_array['full_width_for_mobile'])) ? (int) esc_html(stripslashes($params_array['full_width_for_mobile'])) : 0);
224
  $data = array(
225
  'name' => $name,
226
  'published' => $published,
335
  'slider_loop' => $slider_loop,
336
  'hide_on_mobile' => $hide_on_mobile,
337
  'twoway_slideshow' => $twoway_slideshow,
338
+ 'full_width_for_mobile' => $full_width_for_mobile,
339
  );
340
 
341
  if (!$slider_id) {
859
  'mouse_wheel_nav' => $slider_row->mouse_wheel_nav,
860
  'keyboard_nav' => $slider_row->keyboard_nav,
861
  'fixed_bg' => $slider_row->fixed_bg,
862
+ 'full_width_for_mobile' => $slider_row->full_width_for_mobile,
863
  ));
864
  $new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
865
 
admin/models/WDSModelSliders_wds.php CHANGED
@@ -235,6 +235,7 @@ class WDSModelSliders_wds {
235
  $row->slider_loop = 1;
236
  $row->hide_on_mobile = 0;
237
  $row->twoway_slideshow = 0;
 
238
  }
239
  return $row;
240
  }
235
  $row->slider_loop = 1;
236
  $row->hide_on_mobile = 0;
237
  $row->twoway_slideshow = 0;
238
+ $row->full_width_for_mobile = 0;
239
  }
240
  return $row;
241
  }
admin/views/WDSViewSliders_wds.php CHANGED
@@ -694,10 +694,10 @@ class WDSViewSliders_wds {
694
  </td>
695
  </tr>
696
  <tr>
697
- <td class="spider_label"><label>Hide on small screens: </label></td>
698
  <td>
699
  <input type="text" id="hide_on_mobile" name="hide_on_mobile" value="<?php echo $row->hide_on_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
700
- <div class="spider_description">Hide slider when resolution is smaller than</div>
701
  </td>
702
  </tr>
703
  <tr>
@@ -709,6 +709,13 @@ class WDSViewSliders_wds {
709
  <div class="spider_description">The image will stretch to the page width, taking the height based on dimensions ratio.</div>
710
  </td>
711
  </tr>
 
 
 
 
 
 
 
712
  <tr>
713
  <td class="spider_label"><label>Background fit: </label></td>
714
  <td>
694
  </td>
695
  </tr>
696
  <tr>
697
+ <td class="spider_label"><label for="hide_on_mobile">Hide on small screens: </label></td>
698
  <td>
699
  <input type="text" id="hide_on_mobile" name="hide_on_mobile" value="<?php echo $row->hide_on_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
700
+ <div class="spider_description">Hide slider when resolution is smaller than.</div>
701
  </td>
702
  </tr>
703
  <tr>
709
  <div class="spider_description">The image will stretch to the page width, taking the height based on dimensions ratio.</div>
710
  </td>
711
  </tr>
712
+ <tr>
713
+ <td class="spider_label"><label for="full_width_for_mobile">Full width on small screens: </label></td>
714
+ <td>
715
+ <input type="text" id="full_width_for_mobile" name="full_width_for_mobile" value="<?php echo $row->full_width_for_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
716
+ <div class="spider_description">Full width slider when resolution is smaller than.</div>
717
+ </td>
718
+ </tr>
719
  <tr>
720
  <td class="spider_label"><label>Background fit: </label></td>
721
  <td>
frontend/views/WDSViewSlider.php CHANGED
@@ -157,6 +157,7 @@ class WDSViewSlider {
157
  $twoway_slideshow = isset($slider_row->twoway_slideshow) ? (int) $slider_row->twoway_slideshow : 0;
158
  $current_image_url = '';
159
  $hide_on_mobile = (isset($slider_row->hide_on_mobile) ? $slider_row->hide_on_mobile : 0);
 
160
  ?>
161
  <style>
162
  .wds_bigplay_<?php echo $wds; ?>,
@@ -222,7 +223,6 @@ class WDSViewSlider {
222
  width: <?php echo 100 - $filmstrip_width_in_percent; ?>%;
223
  height: /*inherit*/100%;
224
  }
225
-
226
  <?php
227
  foreach ($resolutions as $key => $resolution) {
228
  if ($key) {
@@ -276,7 +276,6 @@ class WDSViewSlider {
276
  <?php
277
  }
278
  ?>
279
-
280
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_video_<?php echo $wds; ?> {
281
  padding: 0 !important;
282
  margin: 0 !important;
@@ -455,7 +454,6 @@ class WDSViewSlider {
455
  color: #<?php echo $slider_row->hover_color; ?>;
456
  cursor: pointer;
457
  }
458
-
459
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_none_selectable_<?php echo $wds; ?> {
460
  -webkit-touch-callout: none;
461
  -webkit-user-select: none;
@@ -522,7 +520,6 @@ class WDSViewSlider {
522
  filter: Alpha(opacity=100);
523
  position: absolute;
524
  }
525
-
526
  /* Dots.*/
527
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_dots_container_<?php echo $wds; ?> {
528
  opacity: <?php echo $bull_hover; ?>;
@@ -702,11 +699,9 @@ class WDSViewSlider {
702
  z-index: 300;
703
  position: relative;
704
  }
705
-
706
  <?php
707
  }
708
  ?>
709
-
710
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_image_spun1_<?php echo $wds; ?> {
711
  display: table;
712
  width: /*inherit*/100%;
@@ -731,6 +726,19 @@ class WDSViewSlider {
731
  }
732
  <?php
733
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
734
  ?>
735
  <?php echo $slider_row->css; ?>
736
  <?php
@@ -809,7 +817,6 @@ class WDSViewSlider {
809
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["slide_layers_count"] = 0;
810
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["bg_fit"] = "<?php echo $slider_row->bg_fit; ?>";
811
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["bull_position"] = "<?php echo $bull_position; ?>";
812
- wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["full_width"] = "<?php echo $slider_row->full_width; ?>";
813
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["image_thumb_url"] = "<?php echo (htmlspecialchars_decode($slide_row->thumb_url, ENT_QUOTES)); ?>";
814
  <?php
815
  if (isset($layers_rows[$slide_row->id]) && !empty($layers_rows[$slide_row->id])) {
@@ -1685,6 +1692,7 @@ class WDSViewSlider {
1685
  <?php if(isset($callback_items["onSliderCS"])) echo $callback_items["onSliderCS"]; ?>
1686
  }
1687
  function wds_resize_slider_<?php echo $wds; ?>() {
 
1688
  wds_glb_margin_<?php echo $wds; ?> = parseInt('<?php echo $slider_row->glb_margin; ?>');
1689
  if ('<?php echo $slider_row->bull_butt_img_or_not; ?>' == 'text') {
1690
  wds_set_text_dots_cont(<?php echo $wds; ?>);
@@ -1697,24 +1705,23 @@ class WDSViewSlider {
1697
  slide_width = slide_orig_width;
1698
  }
1699
  var ratio = slide_width / (slide_orig_width + 2 * wds_glb_margin_<?php echo $wds; ?>);
1700
- <?php
1701
- if ($slider_row->full_width) {
1702
- ?>
1703
- ratio = jQuery(window).width() / slide_orig_width;
1704
- /* wds_glb_margin_<?php echo $wds; ?> *= ratio; */
1705
- slide_orig_width = jQuery(window).width()/* - (2 * wds_glb_margin_<?php echo $wds; ?>) */;
1706
- slide_orig_height = <?php echo $image_height + $filmstrip_height; ?> * slide_orig_width / <?php echo $image_width; ?>;
1707
- slide_width = jQuery(window).width()/* - (2 * wds_glb_margin_<?php echo $wds; ?>) */;
1708
- wds_full_width_<?php echo $wds; ?>();
1709
- <?php
1710
  }
1711
- ?>
1712
  wds_glb_margin_<?php echo $wds; ?> = parseInt('<?php echo $slider_row->glb_margin; ?>');
1713
  wds_glb_margin_<?php echo $wds; ?> *= ratio;
1714
- if ('<?php echo $slider_row->full_width; ?>' == 0) {
1715
  slide_orig_height -= wds_glb_margin_<?php echo $wds; ?>;
1716
  }
1717
- jQuery("#wds_container2_<?php echo $wds; ?>").css("margin", wds_glb_margin_<?php echo $wds; ?> + "px <?php echo $slider_row->full_width ? 0 : ''; ?>");
1718
  var slide_height = slide_orig_height;
1719
  if (slide_orig_width > slide_width) {
1720
  slide_height = Math.floor(slide_width * slide_orig_height / slide_orig_width);
157
  $twoway_slideshow = isset($slider_row->twoway_slideshow) ? (int) $slider_row->twoway_slideshow : 0;
158
  $current_image_url = '';
159
  $hide_on_mobile = (isset($slider_row->hide_on_mobile) ? $slider_row->hide_on_mobile : 0);
160
+ $full_width_for_mobile = isset($slider_row->full_width_for_mobile) ? (int) $slider_row->full_width_for_mobile : 0;
161
  ?>
162
  <style>
163
  .wds_bigplay_<?php echo $wds; ?>,
223
  width: <?php echo 100 - $filmstrip_width_in_percent; ?>%;
224
  height: /*inherit*/100%;
225
  }
 
226
  <?php
227
  foreach ($resolutions as $key => $resolution) {
228
  if ($key) {
276
  <?php
277
  }
278
  ?>
 
279
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_video_<?php echo $wds; ?> {
280
  padding: 0 !important;
281
  margin: 0 !important;
454
  color: #<?php echo $slider_row->hover_color; ?>;
455
  cursor: pointer;
456
  }
 
457
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_none_selectable_<?php echo $wds; ?> {
458
  -webkit-touch-callout: none;
459
  -webkit-user-select: none;
520
  filter: Alpha(opacity=100);
521
  position: absolute;
522
  }
 
523
  /* Dots.*/
524
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_dots_container_<?php echo $wds; ?> {
525
  opacity: <?php echo $bull_hover; ?>;
699
  z-index: 300;
700
  position: relative;
701
  }
 
702
  <?php
703
  }
704
  ?>
 
705
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_image_spun1_<?php echo $wds; ?> {
706
  display: table;
707
  width: /*inherit*/100%;
726
  }
727
  <?php
728
  }
729
+ if ($full_width_for_mobile) {
730
+ ?>
731
+ @media screen and (max-width: <?php echo $full_width_for_mobile; ?>px) {
732
+ #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> {
733
+ margin:<?php echo $slider_row->glb_margin; ?>px 0;
734
+ position: relative;
735
+ }
736
+ #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> .wds_slideshow_image_wrap_<?php echo $wds; ?> {
737
+ position: absolute;
738
+ }
739
+ }
740
+ <?php
741
+ }
742
  ?>
743
  <?php echo $slider_row->css; ?>
744
  <?php
817
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["slide_layers_count"] = 0;
818
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["bg_fit"] = "<?php echo $slider_row->bg_fit; ?>";
819
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["bull_position"] = "<?php echo $bull_position; ?>";
 
820
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["image_thumb_url"] = "<?php echo (htmlspecialchars_decode($slide_row->thumb_url, ENT_QUOTES)); ?>";
821
  <?php
822
  if (isset($layers_rows[$slide_row->id]) && !empty($layers_rows[$slide_row->id])) {
1692
  <?php if(isset($callback_items["onSliderCS"])) echo $callback_items["onSliderCS"]; ?>
1693
  }
1694
  function wds_resize_slider_<?php echo $wds; ?>() {
1695
+ var full_width = (jQuery(window).width() <= parseInt(<?php echo $slider_row->full_width_for_mobile; ?>) || <?php echo $slider_row->full_width; ?>) ? 1 : 0;
1696
  wds_glb_margin_<?php echo $wds; ?> = parseInt('<?php echo $slider_row->glb_margin; ?>');
1697
  if ('<?php echo $slider_row->bull_butt_img_or_not; ?>' == 'text') {
1698
  wds_set_text_dots_cont(<?php echo $wds; ?>);
1705
  slide_width = slide_orig_width;
1706
  }
1707
  var ratio = slide_width / (slide_orig_width + 2 * wds_glb_margin_<?php echo $wds; ?>);
1708
+ if (full_width) {
1709
+ ratio = jQuery(window).width() / slide_orig_width;
1710
+ /* wds_glb_margin_<?php echo $wds; ?> *= ratio; */
1711
+ slide_orig_width = jQuery(window).width()/* - (2 * wds_glb_margin_<?php echo $wds; ?>) */;
1712
+ slide_orig_height = <?php echo $image_height + $filmstrip_height; ?> * slide_orig_width / <?php echo $image_width; ?>;
1713
+ slide_width = jQuery(window).width()/* - (2 * wds_glb_margin_<?php echo $wds; ?>) */;
1714
+ wds_full_width_<?php echo $wds; ?>();
1715
+ }
1716
+ else if (parseInt(<?php echo $slider_row->full_width_for_mobile ?>)) {
1717
+ jQuery(".wds_slideshow_image_wrap_<?php echo $wds; ?>").removeAttr("style");
1718
  }
 
1719
  wds_glb_margin_<?php echo $wds; ?> = parseInt('<?php echo $slider_row->glb_margin; ?>');
1720
  wds_glb_margin_<?php echo $wds; ?> *= ratio;
1721
+ if (!full_width) {
1722
  slide_orig_height -= wds_glb_margin_<?php echo $wds; ?>;
1723
  }
1724
+ jQuery("#wds_container2_<?php echo $wds; ?>").css("margin", wds_glb_margin_<?php echo $wds; ?> + "px " + (full_width ? 0 : '') + "");
1725
  var slide_height = slide_orig_height;
1726
  if (slide_orig_width > slide_width) {
1727
  slide_height = Math.floor(slide_width * slide_orig_height / slide_orig_width);
js/wds.js CHANGED
@@ -57,6 +57,7 @@ function spider_ajax_save(form_id, event) {
57
  slider_data["slider_loop"] = jQuery("input[name=slider_loop]:checked").val();
58
  slider_data["hide_on_mobile"] = jQuery("#hide_on_mobile").val();
59
  slider_data["twoway_slideshow"] = jQuery("input[name=twoway_slideshow]:checked").val();
 
60
 
61
  /* Navigation.*/
62
  slider_data["prev_next_butt"] = jQuery("input[name=prev_next_butt]:checked").val();
57
  slider_data["slider_loop"] = jQuery("input[name=slider_loop]:checked").val();
58
  slider_data["hide_on_mobile"] = jQuery("#hide_on_mobile").val();
59
  slider_data["twoway_slideshow"] = jQuery("input[name=twoway_slideshow]:checked").val();
60
+ slider_data["full_width_for_mobile"] = jQuery("#full_width_for_mobile").val();
61
 
62
  /* Navigation.*/
63
  slider_data["prev_next_butt"] = jQuery("input[name=prev_next_butt]:checked").val();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: easy slider, gallery slider, image slider, images slider, Photo Slider, post slider, responsive slider, slider, slider plugin, video slider, wordpress slider, youtube slider
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
- Stable tag: 1.1.66
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,9 @@ After downloading the ZIP file of the slider plugin,
125
 
126
  == Changelog ==
127
 
 
 
 
128
  = 1.1.66 =
129
  * Fixed: Sanitize folder names in filemanager.
130
 
4
  Tags: easy slider, gallery slider, image slider, images slider, Photo Slider, post slider, responsive slider, slider, slider plugin, video slider, wordpress slider, youtube slider
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.67
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
 
126
  == Changelog ==
127
 
128
+ = 1.1.67 =
129
+ * Added: Full width slider on small screens.
130
+
131
  = 1.1.66 =
132
  * Fixed: Sanitize folder names in filemanager.
133
 
slider-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Slider WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-slider-plugin.html
6
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
7
- * Version: 1.1.66
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -14,7 +14,7 @@ define('WD_S_NAME', plugin_basename(dirname(__FILE__)));
14
  define('WD_S_DIR', WP_PLUGIN_DIR . "/" . WD_S_NAME);
15
  define('WD_S_URL', plugins_url(WD_S_NAME));
16
 
17
- define('WD_S_VERSION', '1.1.66');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -442,8 +442,9 @@ function wds_activate() {
442
  'possib_add_google_fonts' => 0,
443
  'possib_add_ffamily_google' => '',
444
  'slider_loop' => 1,
445
- 'hide_on_mobile' => 1,
446
  'twoway_slideshow' => 0,
 
447
  )
448
  );
449
  }
4
  * Plugin Name: Slider WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-slider-plugin.html
6
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
7
+ * Version: 1.1.67
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
14
  define('WD_S_DIR', WP_PLUGIN_DIR . "/" . WD_S_NAME);
15
  define('WD_S_URL', plugins_url(WD_S_NAME));
16
 
17
+ define('WD_S_VERSION', '1.1.67');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
442
  'possib_add_google_fonts' => 0,
443
  'possib_add_ffamily_google' => '',
444
  'slider_loop' => 1,
445
+ 'hide_on_mobile' => 0,
446
  'twoway_slideshow' => 0,
447
+ 'full_width_for_mobile' => 0,
448
  )
449
  );
450
  }
sliders-insert.php CHANGED
@@ -117,6 +117,7 @@ function wds_insert() {
117
  `slider_loop` tinyint(1) NOT NULL,
118
  `hide_on_mobile` int(4) NOT NULL,
119
  `twoway_slideshow` tinyint(1) NOT NULL,
 
120
  PRIMARY KEY (`id`)
121
  ) DEFAULT CHARSET=utf8;";
122
  $wpdb->query($wdsslider);
117
  `slider_loop` tinyint(1) NOT NULL,
118
  `hide_on_mobile` int(4) NOT NULL,
119
  `twoway_slideshow` tinyint(1) NOT NULL,
120
+ `full_width_for_mobile` int(4) NOT NULL,
121
  PRIMARY KEY (`id`)
122
  ) DEFAULT CHARSET=utf8;";
123
  $wpdb->query($wdsslider);
sliders-update.php CHANGED
@@ -162,5 +162,8 @@ function wds_update($version) {
162
  if (version_compare($version, '1.1.62') == -1) {
163
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `static_layer` tinyint(1) NOT NULL DEFAULT 0");
164
  }
 
 
 
165
  return;
166
  }
162
  if (version_compare($version, '1.1.62') == -1) {
163
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `static_layer` tinyint(1) NOT NULL DEFAULT 0");
164
  }
165
+ if (version_compare($version, '1.1.67') == -1) {
166
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wdsslider ADD `full_width_for_mobile` int(4) NOT NULL DEFAULT 0");
167
+ }
168
  return;
169
  }