Slider by WD – Responsive Slider - Version 1.1.85

Version Description

  • Fixed: Do not insert a shortcode if no slider is selected.
Download this release

Release Info

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

Code changes from version 1.1.84 to 1.1.85

Files changed (3) hide show
  1. admin/views/WDSViewWDSShortcode.php +32 -29
  2. readme.txt +9 -6
  3. slider-wd.php +4 -2
admin/views/WDSViewWDSShortcode.php CHANGED
@@ -1,27 +1,12 @@
1
  <?php
2
 
3
  class WDSViewWDSShortcode {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
  private $model;
14
 
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
  public function __construct($model) {
20
  $this->model = $model;
21
  }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
  $rows = $this->model->get_row_data();
27
  wp_print_scripts('jquery');
@@ -65,9 +50,37 @@ class WDSViewWDSShortcode {
65
  <input type="submit" id="insert" name="insert" value="<?php _e('Insert', 'wds');?>" onClick="wds_insert_shortcode();" />
66
  </div>
67
  </div>
68
- <script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  function wds_insert_shortcode() {
70
- if (document.getElementById("wds_id").value) {
71
  window.parent.send_to_editor('[wds id="' + document.getElementById('wds_id').value + '"]');
72
  }
73
  window.parent.tb_remove();
@@ -76,14 +89,4 @@ class WDSViewWDSShortcode {
76
  <?php
77
  die();
78
  }
79
-
80
- ////////////////////////////////////////////////////////////////////////////////////////
81
- // Getters & Setters //
82
- ////////////////////////////////////////////////////////////////////////////////////////
83
- ////////////////////////////////////////////////////////////////////////////////////////
84
- // Private Methods //
85
- ////////////////////////////////////////////////////////////////////////////////////////
86
- ////////////////////////////////////////////////////////////////////////////////////////
87
- // Listeners //
88
- ////////////////////////////////////////////////////////////////////////////////////////
89
- }
1
  <?php
2
 
3
  class WDSViewWDSShortcode {
 
 
 
 
 
 
 
 
 
4
  private $model;
5
 
 
 
 
 
6
  public function __construct($model) {
7
  $this->model = $model;
8
  }
9
+
 
 
10
  public function display() {
11
  $rows = $this->model->get_row_data();
12
  wp_print_scripts('jquery');
50
  <input type="submit" id="insert" name="insert" value="<?php _e('Insert', 'wds');?>" onClick="wds_insert_shortcode();" />
51
  </div>
52
  </div>
53
+ <script>
54
+ var short_code = get_params("wds");
55
+ if (short_code['id']) {
56
+ document.getElementById("wds_id").value = short_code['id'];
57
+ }
58
+
59
+ // Get shortcodes attributes.
60
+ function get_params(module_name) {
61
+ var selected_text = top.tinyMCE.activeEditor.selection.getContent();
62
+ var module_start_index = selected_text.indexOf("[" + module_name);
63
+ var module_end_index = selected_text.indexOf("]", module_start_index);
64
+ var module_str = "";
65
+ if ((module_start_index == 0) && (module_end_index > 0)) {
66
+ module_str = selected_text.substring(module_start_index + 1, module_end_index);
67
+ }
68
+ else {
69
+ return false;
70
+ }
71
+ var params_str = module_str.substring(module_str.indexOf(" ") + 1);
72
+ var key_values = params_str.split(" ");
73
+ var short_code_attr = new Array();
74
+ for (var key in key_values) {
75
+ var short_code_index = key_values[key].split('=')[0];
76
+ var short_code_value = key_values[key].split('=')[1];
77
+ short_code_value = short_code_value.substring(1, short_code_value.length - 1);
78
+ short_code_attr[short_code_index] = short_code_value;
79
+ }
80
+ return short_code_attr;
81
+ }
82
  function wds_insert_shortcode() {
83
+ if (document.getElementById("wds_id").value && document.getElementById("wds_id").value != 0) {
84
  window.parent.send_to_editor('[wds id="' + document.getElementById('wds_id').value + '"]');
85
  }
86
  window.parent.tb_remove();
89
  <?php
90
  die();
91
  }
92
+ }
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gallery slider, images slider, Photo Slider, post slider, slider plugin
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
- Stable tag: 1.1.84
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -20,11 +20,11 @@ Slider WD WordPress Plugin
20
 
21
  Create responsive, highly configurable wordpress sliders with various effects for your WordPress site. Download for FREE!
22
 
23
- [WordPress Slider Plugin](http://web-dorado.com/products/wordpress-slider-plugin.html)
24
  [Demo](http://wpdemo.web-dorado.com/slider/)
25
  [Demo Admin](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=sliders_wds)
26
- [User Manual](http://web-dorado.com/wordpress-slider-wd-guide-step-1.html)
27
- [Support Forum](http://web-dorado.com/forum/slider-plugin.html)
28
  [How to change and modify Slider WD Settings](https://www.youtube.com/watch?v=Peny_dkHaMo&list=PLnxWPiY5tLFWQf5XaEYYPZj0gdggUrVxP&index=3)
29
 
30
  Slider WD is an effective tool for adding responsive slider to your website. The WordPress slider plugin can be added both as a widget and plugin, as well as be included in the theme for displaying the slider within the theme using PHP function. Slider WD allows adding both images and videos (currently supporting YouTube and Vimeo to be displayed as slider slides). The numerous transition effects and layer support enhance the functionality of the WordPress slider plugin.
@@ -58,7 +58,7 @@ The number of the slides for each slider is not limited. Various layers can be a
58
  * Fixed background slider
59
  * Slider widget
60
 
61
- Upgrade to [WordPress Slider Pro](http://web-dorado.com/products/wordpress-slider-plugin.html) to add features:
62
 
63
  * 26 transition effects for Slider
64
  * 38 layer effects
@@ -90,7 +90,7 @@ If you don’t want to limit yourself with one of these types of sliders, then y
90
 
91
 
92
  ###IMPORTANT:
93
- If you think you found a bug in Slider WD or have any problem/question concerning the plugin, please check out [WordPress Slider Support Forum](http://web-dorado.com/forum/slider-plugin.html) in our website. If you do not find a solution here, do not hesitate to [click here to contact us](https://web-dorado.com/support/contact-us.html).
94
 
95
  *If you need language of Slider WD which is not included in this list, please contact us and we will do the translation of Slider WD within 3 days. If you find any mistakes in the translation, please contact us and we will make relevant corrections within 3 days. *
96
 
@@ -129,6 +129,9 @@ After downloading the ZIP file of the slider plugin,
129
 
130
  == Changelog ==
131
 
 
 
 
132
  = 1.1.84 =
133
  * Improved: Translatable backend
134
  * Improved: Compatibility with jQurey 3.2.1
4
  Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gallery slider, images slider, Photo Slider, post slider, slider plugin
5
  Requires at least: 3.4
6
  Tested up to: 4.8
7
+ Stable tag: 1.1.85
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
20
 
21
  Create responsive, highly configurable wordpress sliders with various effects for your WordPress site. Download for FREE!
22
 
23
+ [WordPress Slider Plugin](https://web-dorado.com/products/wordpress-slider-plugin.html)
24
  [Demo](http://wpdemo.web-dorado.com/slider/)
25
  [Demo Admin](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=sliders_wds)
26
+ [User Manual](https://web-dorado.com/wordpress-slider-wd-guide-step-1.html)
27
+ [Support Forum](https://web-dorado.com/forum/slider-plugin.html)
28
  [How to change and modify Slider WD Settings](https://www.youtube.com/watch?v=Peny_dkHaMo&list=PLnxWPiY5tLFWQf5XaEYYPZj0gdggUrVxP&index=3)
29
 
30
  Slider WD is an effective tool for adding responsive slider to your website. The WordPress slider plugin can be added both as a widget and plugin, as well as be included in the theme for displaying the slider within the theme using PHP function. Slider WD allows adding both images and videos (currently supporting YouTube and Vimeo to be displayed as slider slides). The numerous transition effects and layer support enhance the functionality of the WordPress slider plugin.
58
  * Fixed background slider
59
  * Slider widget
60
 
61
+ Upgrade to [WordPress Slider Pro](https://web-dorado.com/products/wordpress-slider-plugin.html) to add features:
62
 
63
  * 26 transition effects for Slider
64
  * 38 layer effects
90
 
91
 
92
  ###IMPORTANT:
93
+ If you think you found a bug in Slider WD or have any problem/question concerning the plugin, please check out [WordPress Slider Support Forum](https://web-dorado.com/forum/slider-plugin.html) in our website. If you do not find a solution here, do not hesitate to [click here to contact us](https://web-dorado.com/support/contact-us.html).
94
 
95
  *If you need language of Slider WD which is not included in this list, please contact us and we will do the translation of Slider WD within 3 days. If you find any mistakes in the translation, please contact us and we will make relevant corrections within 3 days. *
96
 
129
 
130
  == Changelog ==
131
 
132
+ = 1.1.85 =
133
+ * Fixed: Do not insert a shortcode if no slider is selected.
134
+
135
  = 1.1.84 =
136
  * Improved: Translatable backend
137
  * Improved: Compatibility with jQurey 3.2.1
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.84
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.84');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -219,6 +219,7 @@ function wds_preview() {
219
  }
220
 
221
  function wds_media_button($context) {
 
222
  global $pagenow;
223
  if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php', 'admin-ajax.php'))) {
224
  $context .= '
@@ -229,6 +230,7 @@ function wds_media_button($context) {
229
  }
230
  return $context;
231
  }
 
232
  add_filter('media_buttons_context', 'wds_media_button');
233
 
234
  // Add the Slider button to editor.
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.85
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.85');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
219
  }
220
 
221
  function wds_media_button($context) {
222
+
223
  global $pagenow;
224
  if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php', 'admin-ajax.php'))) {
225
  $context .= '
230
  }
231
  return $context;
232
  }
233
+
234
  add_filter('media_buttons_context', 'wds_media_button');
235
 
236
  // Add the Slider button to editor.