Slider by WD – Responsive Slider - Version 1.0.14

Version Description

Fixed: Disable enter key on text inputs. New: Bulk add images by media uploader.

Download this release

Release Info

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

Code changes from version 1.0.13 to 1.0.14

admin/views/WDSViewSliders_wds.php CHANGED
@@ -415,6 +415,11 @@ class WDSViewSliders_wds {
415
  </a>
416
  <?php
417
  }
 
 
 
 
 
418
  ?>
419
  <input class="button-secondary wds_free_button" type="button" value="Add Posts" onclick="alert('This functionality is disabled in free version.')" />
420
  <input class="button-primary" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
415
  </a>
416
  <?php
417
  }
418
+ else {
419
+ ?>
420
+ <input type="button" class="button-primary" id="button_image_url" onclick="spider_media_uploader('button_image_url', event, true); return false;" value="Add Images" />
421
+ <?php
422
+ }
423
  ?>
424
  <input class="button-secondary wds_free_button" type="button" value="Add Posts" onclick="alert('This functionality is disabled in free version.')" />
425
  <input class="button-primary" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
frontend/views/WDSViewSlider.php CHANGED
@@ -776,7 +776,7 @@ class WDSViewSlider {
776
  $share_image_url = urlencode($is_video ? $slide_row->thumb_url : $slide_row->image_url);
777
  $share_url = add_query_arg(array('action' => 'WDSShare', 'image_id' => $slide_row->id, 'curr_url' => $current_url), admin_url('admin-ajax.php'));
778
  ?>
779
- <span class="wds_slideshow_image<?php echo $image_div_num; ?>_spun_<?php echo $wds; ?>" id="image_id_<?php echo $wds; ?>_<?php echo $slide_row->id; ?>">
780
  <span class="wds_slideshow_image_spun1_<?php echo $wds; ?>">
781
  <span class="wds_slideshow_image_spun2_<?php echo $wds; ?>">
782
  <?php
@@ -1330,8 +1330,8 @@ class WDSViewSlider {
1330
  wds_current_key_<?php echo $wds; ?> = key;
1331
  /* Change image id.*/
1332
  jQuery("div[img_id=wds_slideshow_image_<?php echo $wds; ?>]").attr('image_id', wds_data_<?php echo $wds; ?>[key]["id"]);
1333
- var current_image_class = "#image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[current_key]["id"];
1334
- var next_image_class = "#image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[key]["id"];
1335
  <?php if ($slider_row->preload_images) { ?>
1336
  if (!wds_data_<?php echo $wds; ?>[key]["is_video"]) {
1337
  jQuery(next_image_class).find("div").css("background-image", 'url("' + wds_data_<?php echo $wds; ?>[key]["image_url"] + '")');
776
  $share_image_url = urlencode($is_video ? $slide_row->thumb_url : $slide_row->image_url);
777
  $share_url = add_query_arg(array('action' => 'WDSShare', 'image_id' => $slide_row->id, 'curr_url' => $current_url), admin_url('admin-ajax.php'));
778
  ?>
779
+ <span class="wds_slideshow_image<?php echo $image_div_num; ?>_spun_<?php echo $wds; ?>" id="wds_image_id_<?php echo $wds; ?>_<?php echo $slide_row->id; ?>">
780
  <span class="wds_slideshow_image_spun1_<?php echo $wds; ?>">
781
  <span class="wds_slideshow_image_spun2_<?php echo $wds; ?>">
782
  <?php
1330
  wds_current_key_<?php echo $wds; ?> = key;
1331
  /* Change image id.*/
1332
  jQuery("div[img_id=wds_slideshow_image_<?php echo $wds; ?>]").attr('image_id', wds_data_<?php echo $wds; ?>[key]["id"]);
1333
+ var current_image_class = "#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[current_key]["id"];
1334
+ var next_image_class = "#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[key]["id"];
1335
  <?php if ($slider_row->preload_images) { ?>
1336
  if (!wds_data_<?php echo $wds; ?>[key]["is_video"]) {
1337
  jQuery(next_image_class).find("div").css("background-image", 'url("' + wds_data_<?php echo $wds; ?>[key]["image_url"] + '")');
js/wds.js CHANGED
@@ -1260,7 +1260,10 @@ function spider_set_image_url(id) {
1260
  return true;
1261
  }
1262
 
1263
- function spider_media_uploader(id, e) {
 
 
 
1264
  var custom_uploader;
1265
  e.preventDefault();
1266
  // If the uploader object has already been created, reopen the dialog.
@@ -1274,11 +1277,16 @@ function spider_media_uploader(id, e) {
1274
  title: 'Choose ' + library_type,
1275
  library : { type : library_type},
1276
  button: { text: 'Insert'},
1277
- multiple: false
1278
  });
1279
  // When a file is selected, grab the URL and set it as the text field's value
1280
  custom_uploader.on('select', function() {
1281
- attachment = custom_uploader.state().get('selection').first().toJSON();
 
 
 
 
 
1282
  var image_url = attachment.url;
1283
  var thumb_url = (attachment.sizes && attachment.sizes.thumbnail) ? attachment.sizes.thumbnail.url : image_url;
1284
  switch (id) {
@@ -1325,20 +1333,18 @@ function spider_media_uploader(id, e) {
1325
  jQuery("#right_butt_hov_url").val(image_url);
1326
  break;
1327
  }
1328
-
1329
- case 'bullets_main_but': {
1330
  /* Add image for main button.*/
1331
  jQuery("#bull_img_main").attr("src", image_url);
1332
  jQuery("#bullets_img_main_url").val(image_url);
1333
  break;
1334
  }
1335
- case 'bullets_hov_but': {
1336
  /* Add image for hover button.*/
1337
  jQuery("#bull_img_hov").attr("src", image_url);
1338
  jQuery("#bullets_img_hov_url").val(image_url);
1339
  break;
1340
  }
1341
-
1342
  case 'play_but': {
1343
  /* Add image for play button.*/
1344
  jQuery("#play_butt_img").attr("src", image_url);
@@ -1351,20 +1357,42 @@ function spider_media_uploader(id, e) {
1351
  jQuery("#play_butt_hov_url").val(image_url);
1352
  break;
1353
  }
1354
-
1355
- case 'paus_but': {
1356
  /* Add hover image for play button.*/
1357
  jQuery("#paus_butt_img").attr("src", image_url);
1358
  jQuery("#paus_butt_url").val(image_url);
1359
  break;
1360
  }
1361
- case 'paus_hov_but': {
1362
  /* Add hover image for pause button.*/
1363
  jQuery("#paus_butt_hov_img").attr("src", image_url);
1364
  jQuery("#paus_butt_hov_url").val(image_url);
1365
  break;
1366
  }
1367
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1368
  default: {
1369
  jQuery("#image_url" + id).val(image_url);
1370
  jQuery("#thumb_url" + id).val(thumb_url);
@@ -2073,6 +2101,7 @@ function wds_add_layer(type, id, layerID, duplicate, files, edit) {
2073
  jscolor.bind();
2074
  }
2075
  wds_layer_weights(id);
 
2076
  return layerID;
2077
  }
2078
 
@@ -2341,6 +2370,7 @@ function wds_add_slide() {
2341
  '</script>' +
2342
  '</div>');
2343
  wds_slide_weights();
 
2344
  return slideID;
2345
  }
2346
 
@@ -2514,3 +2544,24 @@ function wds_whr(forfield) {
2514
  jQuery('.wds_preview_wrapper').width(jQuery("#width").val());
2515
  jQuery('.wds_preview_wrapper').height(jQuery("#height").val());
2516
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1260
  return true;
1261
  }
1262
 
1263
+ function spider_media_uploader(id, e, multiple) {
1264
+ if (typeof multiple == "undefined") {
1265
+ var multiple = false;
1266
+ }
1267
  var custom_uploader;
1268
  e.preventDefault();
1269
  // If the uploader object has already been created, reopen the dialog.
1277
  title: 'Choose ' + library_type,
1278
  library : { type : library_type},
1279
  button: { text: 'Insert'},
1280
+ multiple: multiple
1281
  });
1282
  // When a file is selected, grab the URL and set it as the text field's value
1283
  custom_uploader.on('select', function() {
1284
+ if (multiple == false) {
1285
+ attachment = custom_uploader.state().get('selection').first().toJSON();
1286
+ }
1287
+ else {
1288
+ attachment = custom_uploader.state().get('selection').toJSON();
1289
+ }
1290
  var image_url = attachment.url;
1291
  var thumb_url = (attachment.sizes && attachment.sizes.thumbnail) ? attachment.sizes.thumbnail.url : image_url;
1292
  switch (id) {
1333
  jQuery("#right_butt_hov_url").val(image_url);
1334
  break;
1335
  }
1336
+ case 'bullets_main_but': {
 
1337
  /* Add image for main button.*/
1338
  jQuery("#bull_img_main").attr("src", image_url);
1339
  jQuery("#bullets_img_main_url").val(image_url);
1340
  break;
1341
  }
1342
+ case 'bullets_hov_but': {
1343
  /* Add image for hover button.*/
1344
  jQuery("#bull_img_hov").attr("src", image_url);
1345
  jQuery("#bullets_img_hov_url").val(image_url);
1346
  break;
1347
  }
 
1348
  case 'play_but': {
1349
  /* Add image for play button.*/
1350
  jQuery("#play_butt_img").attr("src", image_url);
1357
  jQuery("#play_butt_hov_url").val(image_url);
1358
  break;
1359
  }
1360
+ case 'paus_but': {
 
1361
  /* Add hover image for play button.*/
1362
  jQuery("#paus_butt_img").attr("src", image_url);
1363
  jQuery("#paus_butt_url").val(image_url);
1364
  break;
1365
  }
1366
+ case 'paus_hov_but': {
1367
  /* Add hover image for pause button.*/
1368
  jQuery("#paus_butt_hov_img").attr("src", image_url);
1369
  jQuery("#paus_butt_hov_url").val(image_url);
1370
  break;
1371
  }
1372
+ case 'button_image_url': {
1373
+ /* Delete active slide if it has now image.*/
1374
+ jQuery(".wds_box input[id^='image_url']").each(function () {
1375
+ var slide_id = jQuery(this).attr("id").replace("image_url", "");
1376
+ if (!jQuery("#image_url" + slide_id).val() && !jQuery("#slide" + slide_id + "_layer_ids_string").val()) {
1377
+ wds_remove_slide(slide_id, 0);
1378
+ }
1379
+ });
1380
+ /* Add one or more slides.*/
1381
+ for (var i in attachment) {
1382
+ wds_add_slide();
1383
+ var slides_count = jQuery(".wbs_subtab a[id^='wbs_subtab']").length;
1384
+ var new_slide_id = "pr_" + slides_count;
1385
+ jQuery("#image_url" + new_slide_id).val(attachment[i]['url']);
1386
+ var thumb_url = (attachment[i]['sizes'] && attachment[i]['sizes']['thumbnail']) ? attachment[i]['sizes']['thumbnail']['url'] : attachment[i]['url'];
1387
+ jQuery("#thumb_url" + new_slide_id).val(thumb_url);
1388
+ jQuery("#wds_preview_image" + new_slide_id).css("background-image", 'url("' + attachment[i]['url'] + '")');
1389
+ jQuery("#delete_image_url" + new_slide_id).css("display", "inline-block");
1390
+ jQuery("#wds_preview_image" + new_slide_id).css("display", "inline-block");
1391
+ jQuery("#type" + new_slide_id).val("image");
1392
+ jQuery("#trlink" + new_slide_id).show();
1393
+ }
1394
+ break;
1395
+ }
1396
  default: {
1397
  jQuery("#image_url" + id).val(image_url);
1398
  jQuery("#thumb_url" + id).val(thumb_url);
2101
  jscolor.bind();
2102
  }
2103
  wds_layer_weights(id);
2104
+ wds_onkeypress();
2105
  return layerID;
2106
  }
2107
 
2370
  '</script>' +
2371
  '</div>');
2372
  wds_slide_weights();
2373
+ wds_onkeypress();
2374
  return slideID;
2375
  }
2376
 
2544
  jQuery('.wds_preview_wrapper').width(jQuery("#width").val());
2545
  jQuery('.wds_preview_wrapper').height(jQuery("#height").val());
2546
  }
2547
+
2548
+ function wds_onkeypress() {
2549
+ jQuery("input[type='text']").on("keypress", function (event) {
2550
+ if ((jQuery(this).attr("id") != "search_value") && (jQuery(this).attr("id") != "current_page")) {
2551
+ var chCode1 = event.which || event.paramlist_keyCode;
2552
+ if (chCode1 == 13) {
2553
+ if (event.preventDefault) {
2554
+ event.preventDefault();
2555
+ }
2556
+ else {
2557
+ event.returnValue = false;
2558
+ }
2559
+ }
2560
+ }
2561
+ return true;
2562
+ });
2563
+ }
2564
+
2565
+ jQuery(document).ready(function () {
2566
+ wds_onkeypress();
2567
+ });
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: best slider plugin, carousel, carousel slider, coin slider, content slider, content slideshow, custom video slider, flex slider, free video slider, free video slideshow, Horizontal slider, Image Rotator, image slider, image slideshow, javascript slider, javascript slideshow, jquery slider, jquery slideshow, Photo Slider, posts slider, responsive slider, responsive slideshow, sidebar, slide, slide show, slider, slider plugin, slider widget, slides, slideshow,slideshow manager, slideshow plugin, vertical slider, video slider, video slideshow,vimeo slideshow, vimeo slider, widget slider, widget slideshow, wordpress slider, wordpress slideshow, wp slider, youtube slider, youtube slideshow, post slider, fullscreen Slider, css3 slider, responsive image slider, banner slider, social slider, cycle slider, text slider, revolution slider, thumbnail slider, touch slider, sliders, parallax slider, 3D slider, coinslider, featured-content-slider, image, images, picture, pictures, picture slider, responsive, shortcode, widget, vertical slides, autoplay, auto, jquery, rotate, flexslider, gallery, photo gallery, javascript, rotator, wordpress picture slider, wordpress responsive slider, animation, best slider, fullwidth slider, mobile slider, swipe, layer, layer slider, product slider
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.0.13
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -138,6 +138,10 @@ After downloading the ZIP file of the slider plugin,
138
 
139
  == Changelog ==
140
 
 
 
 
 
141
  = 1.0.13 =
142
  Fixed: Image layer alt.
143
  Fixed: Word break in Chrome.
4
  Tags: best slider plugin, carousel, carousel slider, coin slider, content slider, content slideshow, custom video slider, flex slider, free video slider, free video slideshow, Horizontal slider, Image Rotator, image slider, image slideshow, javascript slider, javascript slideshow, jquery slider, jquery slideshow, Photo Slider, posts slider, responsive slider, responsive slideshow, sidebar, slide, slide show, slider, slider plugin, slider widget, slides, slideshow,slideshow manager, slideshow plugin, vertical slider, video slider, video slideshow,vimeo slideshow, vimeo slider, widget slider, widget slideshow, wordpress slider, wordpress slideshow, wp slider, youtube slider, youtube slideshow, post slider, fullscreen Slider, css3 slider, responsive image slider, banner slider, social slider, cycle slider, text slider, revolution slider, thumbnail slider, touch slider, sliders, parallax slider, 3D slider, coinslider, featured-content-slider, image, images, picture, pictures, picture slider, responsive, shortcode, widget, vertical slides, autoplay, auto, jquery, rotate, flexslider, gallery, photo gallery, javascript, rotator, wordpress picture slider, wordpress responsive slider, animation, best slider, fullwidth slider, mobile slider, swipe, layer, layer slider, product slider
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.0.14
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
138
 
139
  == Changelog ==
140
 
141
+ = 1.0.14 =
142
+ Fixed: Disable enter key on text inputs.
143
+ New: Bulk add images by media uploader.
144
+
145
  = 1.0.13 =
146
  Fixed: Image layer alt.
147
  Fixed: Word break in Chrome.
slider-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Slider WD
5
  * Plugin URI: http://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.0.13
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -324,7 +324,7 @@ register_activation_hook(__FILE__, 'wds_activate');
324
 
325
  function wds_install() {
326
  $version = get_option("wds_version");
327
- $new_version = '1.0.13';
328
  if ($version && version_compare($version, $new_version, '<')) {
329
  require_once WD_S_DIR . "/sliders-update.php";
330
  wds_update($version);
4
  * Plugin Name: Slider WD
5
  * Plugin URI: http://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.0.14
8
  * Author: WebDorado
9
  * Author URI: http://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
324
 
325
  function wds_install() {
326
  $version = get_option("wds_version");
327
+ $new_version = '1.0.14';
328
  if ($version && version_compare($version, $new_version, '<')) {
329
  require_once WD_S_DIR . "/sliders-update.php";
330
  wds_update($version);