Slider by WD – Responsive Slider - Version 1.1.49

Version Description

  • Added: Text layer alignment option.
Download this release

Release Info

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

Code changes from version 1.1.48 to 1.1.49

admin/controllers/WDSControllerSliders_wds.php CHANGED
@@ -474,6 +474,7 @@ class WDSControllerSliders_wds {
474
  $add_class = ((isset($params_array_layer['add_class'])) ? esc_html(stripslashes($params_array_layer['add_class'])) : '');
475
  $layer_callback_list = ((isset($params_array_layer['layer_callback_list'])) ? esc_html(stripslashes($params_array_layer['layer_callback_list'])) : '');
476
  $hover_color_text = ((isset($params_array_layer['hover_color_text'])) ? esc_html(stripslashes($params_array_layer['hover_color_text'])) : '');
 
477
  if ($title) {
478
  if (strpos($layer_id, 'pr_') !== FALSE) {
479
  $save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
@@ -528,6 +529,7 @@ class WDSControllerSliders_wds {
528
  'layer_callback_list' => $layer_callback_list,
529
  'hotspot_text_display' => 0,
530
  'hover_color_text' => $hover_color_text,
 
531
  ));
532
  }
533
  else {
@@ -578,6 +580,7 @@ class WDSControllerSliders_wds {
578
  'add_class' => $add_class,
579
  'layer_callback_list' => $layer_callback_list,
580
  'hover_color_text' => $hover_color_text,
 
581
  ), array('id' => $layer_id));
582
  }
583
  }
@@ -909,6 +912,7 @@ class WDSControllerSliders_wds {
909
  'layer_callback_list' => $layer_id->layer_callback_list,
910
  'hotspot_text_display' => $layer_id->hotspot_text_display,
911
  'hover_color_text' => $layer_id->hover_color_text,
 
912
  ));
913
  }
914
  }
474
  $add_class = ((isset($params_array_layer['add_class'])) ? esc_html(stripslashes($params_array_layer['add_class'])) : '');
475
  $layer_callback_list = ((isset($params_array_layer['layer_callback_list'])) ? esc_html(stripslashes($params_array_layer['layer_callback_list'])) : '');
476
  $hover_color_text = ((isset($params_array_layer['hover_color_text'])) ? esc_html(stripslashes($params_array_layer['hover_color_text'])) : '');
477
+ $text_alignment = ((isset($params_array_layer['text_alignment'])) ? esc_html(stripslashes($params_array_layer['text_alignment'])) : 'center');
478
  if ($title) {
479
  if (strpos($layer_id, 'pr_') !== FALSE) {
480
  $save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
529
  'layer_callback_list' => $layer_callback_list,
530
  'hotspot_text_display' => 0,
531
  'hover_color_text' => $hover_color_text,
532
+ 'text_alignment' => $text_alignment,
533
  ));
534
  }
535
  else {
580
  'add_class' => $add_class,
581
  'layer_callback_list' => $layer_callback_list,
582
  'hover_color_text' => $hover_color_text,
583
+ 'text_alignment' => $text_alignment,
584
  ), array('id' => $layer_id));
585
  }
586
  }
912
  'layer_callback_list' => $layer_id->layer_callback_list,
913
  'hotspot_text_display' => $layer_id->hotspot_text_display,
914
  'hover_color_text' => $layer_id->hover_color_text,
915
+ 'text_alignment' => $layer_id->text_alignment,
916
  ));
917
  }
918
  }
admin/views/WDSViewSliders_wds.php CHANGED
@@ -450,6 +450,11 @@ class WDSViewSliders_wds {
450
  'onSliderBlur' => 'On slide blur',
451
  'onSliderR' => 'On slider resize',
452
  'onSwipeS' => 'On swipe start',
 
 
 
 
 
453
  );
454
  $built_in_watermark_fonts = array();
455
  foreach (scandir(path_join(WD_S_DIR, 'fonts')) as $filename) {
@@ -2323,7 +2328,7 @@ class WDSViewSliders_wds {
2323
  ?>
2324
  <style>#<?php echo $prefix; ?>:hover {color: #<?php echo $layer->hover_color_text; ?> !important;}</style>
2325
  <span id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" data-type="wds_text_parent" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
2326
- style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?><?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>word-break: <?php echo ($layer->image_scale ? 'normal' : 'break-all'); ?>; display: inline-block; position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; color: #<?php echo $layer->color; ?>; font-size: <?php echo $layer->size; ?>px; line-height: 1.25em; font-family: <?php echo $fonts[$layer->ffamily]; ?>; font-weight: <?php echo $layer->fweight; ?>; padding: <?php echo $layer->padding; ?>; background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>"><?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $layer->text); ?></span>
2327
  <?php
2328
  break;
2329
  }
@@ -2704,6 +2709,23 @@ class WDSViewSliders_wds {
2704
  <input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $layer->add_class; ?>" name="<?php echo $prefix; ?>_add_class" />
2705
  </td>
2706
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2707
  </table>
2708
  </td>
2709
  </tr>
450
  'onSliderBlur' => 'On slide blur',
451
  'onSliderR' => 'On slider resize',
452
  'onSwipeS' => 'On swipe start',
453
+ );
454
+ $text_alignments = array(
455
+ 'center' => 'Center',
456
+ 'left' => 'Left',
457
+ 'right' => 'Right',
458
  );
459
  $built_in_watermark_fonts = array();
460
  foreach (scandir(path_join(WD_S_DIR, 'fonts')) as $filename) {
2328
  ?>
2329
  <style>#<?php echo $prefix; ?>:hover {color: #<?php echo $layer->hover_color_text; ?> !important;}</style>
2330
  <span id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" data-type="wds_text_parent" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
2331
+ style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?><?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>word-break: <?php echo ($layer->image_scale ? 'normal' : 'break-all'); ?>; display: inline-block; position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; color: #<?php echo $layer->color; ?>; font-size: <?php echo $layer->size; ?>px; line-height: 1.25em; font-family: <?php echo $fonts[$layer->ffamily]; ?>; font-weight: <?php echo $layer->fweight; ?>; padding: <?php echo $layer->padding; ?>; background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; text-align: <?php echo $layer->text_alignment; ?>"><?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $layer->text); ?></span>
2332
  <?php
2333
  break;
2334
  }
2709
  <input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $layer->add_class; ?>" name="<?php echo $prefix; ?>_add_class" />
2710
  </td>
2711
  </tr>
2712
+ <tr class="wds_layer_tr" >
2713
+ <td class="spider_label">
2714
+ <label for="<?php echo $prefix; ?>_text_alignment">Text alignment: </label>
2715
+ </td>
2716
+ <td>
2717
+ <select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_text_alignment" onchange="jQuery('#<?php echo $prefix; ?>').css({textAlign: jQuery(this).val()})" name="<?php echo $prefix; ?>_text_alignment">
2718
+ <?php
2719
+ foreach ($text_alignments as $key => $text_alignment) {
2720
+ ?>
2721
+ <option value="<?php echo $key; ?>" <?php echo (($layer->text_alignment == $key) ? 'selected="selected"' : ''); ?>><?php echo $text_alignment; ?></option>
2722
+ <?php
2723
+ }
2724
+ ?>
2725
+ </select>
2726
+ <div class="spider_description"></div>
2727
+ </td>
2728
+ </tr>
2729
  </table>
2730
  </td>
2731
  </tr>
frontend/views/WDSViewSlider.php CHANGED
@@ -917,7 +917,8 @@ class WDSViewSlider {
917
  background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>;
918
  border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>;
919
  border-radius: <?php echo $layer->border_radius; ?>;
920
- box-shadow: <?php echo $layer->shadow; ?>"
 
921
  onclick="<?php echo $layer->link ? 'window.open(\'' . $layer->link . '\', \'' . ($layer->target_attr_layer ? '_blank' : '_self') . '\');' : ''; ?>event.stopPropagation();"><?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $from_shortcode ? do_shortcode($layer->text) : $layer->text); ?></span>
922
  <?php
923
  break;
917
  background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>;
918
  border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>;
919
  border-radius: <?php echo $layer->border_radius; ?>;
920
+ box-shadow: <?php echo $layer->shadow; ?>;
921
+ text-align: <?php echo $layer->text_alignment; ?>"
922
  onclick="<?php echo $layer->link ? 'window.open(\'' . $layer->link . '\', \'' . ($layer->target_attr_layer ? '_blank' : '_self') . '\');' : ''; ?>event.stopPropagation();"><?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $from_shortcode ? do_shortcode($layer->text) : $layer->text); ?></span>
923
  <?php
924
  break;
js/wds.js CHANGED
@@ -204,6 +204,7 @@ function spider_ajax_save(form_id, event) {
204
  json_data["shadow"] = jQuery("#" + prefix + "_shadow").val();
205
  json_data["add_class"] = jQuery("#" + prefix + "_add_class").val();
206
  json_data["hover_color_text"] = jQuery("#" + prefix + "_hover_color_text").val();
 
207
  break;
208
  }
209
  case "image": {
@@ -1857,6 +1858,11 @@ function wds_duplicate_layer(type, id, layerID, new_id) {
1857
  jQuery(this).attr("selected", "selected");
1858
  }
1859
  });
 
 
 
 
 
1860
  if (jQuery("#" + prefix + "_google_fonts1").is(":checked")) {
1861
  jQuery("#" + new_prefix + "_google_fonts1").attr("checked", "checked");
1862
  }
@@ -1881,6 +1887,7 @@ function wds_duplicate_layer(type, id, layerID, new_id) {
1881
  "background-color: " + wds_hex_rgba(jQuery("#" + prefix+ "_fbgcolor").val(), (100 - jQuery("#" + prefix+ "_transparent").val())) + "; " +
1882
  "border: " + jQuery("#" + prefix + "_border_width").val() + "px " + jQuery("#" + prefix+ "_border_style").val() + " #" + jQuery("#" + prefix+ "_border_color").val() + "; " +
1883
  "border-radius: " + jQuery("#" + prefix + "_border_radius").val() + ";" +
 
1884
  "position: absolute;"
1885
  });
1886
  jQuery("#" + new_prefix).hover(function() { jQuery(this).css("color", jQuery("#" + prefix + "_hover_color_text").val()); }, function() { jQuery(this).css("color", jQuery("#" + prefix + "_color").val()); });
@@ -2084,7 +2091,13 @@ function wds_add_layer(type, id, layerID, duplicate, files, edit) {
2084
 
2085
  var prefix = "slide" + id + "_layer" + layerID;
2086
  var tbodyID = prefix + "_tbody";
2087
-
 
 
 
 
 
 
2088
  jQuery(".wds_slide" + id + "> table").append(jQuery("<tbody />").attr("id", tbodyID));
2089
  jQuery('#' + tbodyID).attr('style',"background-color:#fff");
2090
  jQuery('#' + tbodyID).addClass("layer_table_count");
@@ -2194,6 +2207,10 @@ function wds_add_layer(type, id, layerID, duplicate, files, edit) {
2194
  '</span>' +
2195
  '<div class="spider_description spider_free_version">Some effects are disabled in free version.</div>' +
2196
  '</td>';
 
 
 
 
2197
 
2198
  switch(type) {
2199
  case 'text': {
@@ -2258,6 +2275,8 @@ function wds_add_layer(type, id, layerID, duplicate, files, edit) {
2258
  shadow +
2259
  '</tr><tr class="wds_layer_tr">' +
2260
  add_class +
 
 
2261
  '</tr>' +
2262
  '</table>'+
2263
  '</td></tr>' + layer_type
204
  json_data["shadow"] = jQuery("#" + prefix + "_shadow").val();
205
  json_data["add_class"] = jQuery("#" + prefix + "_add_class").val();
206
  json_data["hover_color_text"] = jQuery("#" + prefix + "_hover_color_text").val();
207
+ json_data["text_alignment"] = jQuery("#" + prefix + "_text_alignment").val();
208
  break;
209
  }
210
  case "image": {
1858
  jQuery(this).attr("selected", "selected");
1859
  }
1860
  });
1861
+ jQuery("#" + new_prefix + "_text_alignment option").each(function() {
1862
+ if (jQuery(this).val() == jQuery("#" + prefix + "_text_alignment").val()) {
1863
+ jQuery(this).attr("selected", "selected");
1864
+ }
1865
+ });
1866
  if (jQuery("#" + prefix + "_google_fonts1").is(":checked")) {
1867
  jQuery("#" + new_prefix + "_google_fonts1").attr("checked", "checked");
1868
  }
1887
  "background-color: " + wds_hex_rgba(jQuery("#" + prefix+ "_fbgcolor").val(), (100 - jQuery("#" + prefix+ "_transparent").val())) + "; " +
1888
  "border: " + jQuery("#" + prefix + "_border_width").val() + "px " + jQuery("#" + prefix+ "_border_style").val() + " #" + jQuery("#" + prefix+ "_border_color").val() + "; " +
1889
  "border-radius: " + jQuery("#" + prefix + "_border_radius").val() + ";" +
1890
+ "text-align: " + jQuery("#" + prefix + "_text_alignment").val() + ";" +
1891
  "position: absolute;"
1892
  });
1893
  jQuery("#" + new_prefix).hover(function() { jQuery(this).css("color", jQuery("#" + prefix + "_hover_color_text").val()); }, function() { jQuery(this).css("color", jQuery("#" + prefix + "_color").val()); });
2091
 
2092
  var prefix = "slide" + id + "_layer" + layerID;
2093
  var tbodyID = prefix + "_tbody";
2094
+
2095
+ var text_alignments_option = "";
2096
+ var text_alignments = {'center' : 'Center', 'left' : 'Left', 'right' : 'Right'};
2097
+ for (var i in text_alignments) {
2098
+ text_alignments_option += '<option value="' + i + '">' + text_alignments[i] + '</option>';
2099
+ }
2100
+
2101
  jQuery(".wds_slide" + id + "> table").append(jQuery("<tbody />").attr("id", tbodyID));
2102
  jQuery('#' + tbodyID).attr('style',"background-color:#fff");
2103
  jQuery('#' + tbodyID).addClass("layer_table_count");
2207
  '</span>' +
2208
  '<div class="spider_description spider_free_version">Some effects are disabled in free version.</div>' +
2209
  '</td>';
2210
+ var add_class = '<td class="spider_label"><label for="' + prefix + '_add_class">Add class: </label></td>' +
2211
+ '<td><input type="text" name="' + prefix + '_add_class" id="' + prefix + '_add_class" value="" class="spider_char_input" /><div class="spider_description"></div></td>';
2212
+ var text_alignment = '<td class="spider_label"><label for="' + prefix + '_text_alignment">Text alignment: </label></td>' +
2213
+ '<td><select class="select_icon" style="width: 70px;" name="' + prefix + '_text_alignment" id="' + prefix + '_text_alignment" onchange="jQuery(\'#' + prefix + '\').css({textAlign: jQuery(this).val()})">' + text_alignments_option + '</select><div class="spider_description"></div></td>';
2214
 
2215
  switch(type) {
2216
  case 'text': {
2275
  shadow +
2276
  '</tr><tr class="wds_layer_tr">' +
2277
  add_class +
2278
+ '</tr><tr class="wds_layer_tr">' +
2279
+ text_alignment +
2280
  '</tr>' +
2281
  '</table>'+
2282
  '</td></tr>' + layer_type
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: image slider, slider, slideshow, image, images, responsive, shortcode, widget, jquery, gallery, swipe, layer
5
  Requires at least: 3.4
6
  Tested up to: 4.6
7
- Stable tag: 1.1.48
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -160,6 +160,9 @@ After downloading the ZIP file of the slider plugin,
160
 
161
  == Changelog ==
162
 
 
 
 
163
  = 1.1.48 =
164
  * Fixed: Preview popup.
165
  * Fixed: Add posts popup styles.
4
  Tags: image slider, slider, slideshow, image, images, responsive, shortcode, widget, jquery, gallery, swipe, layer
5
  Requires at least: 3.4
6
  Tested up to: 4.6
7
+ Stable tag: 1.1.49
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
160
 
161
  == Changelog ==
162
 
163
+ = 1.1.49 =
164
+ * Added: Text layer alignment option.
165
+
166
  = 1.1.48 =
167
  * Fixed: Preview popup.
168
  * Fixed: Add posts popup styles.
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.48
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.48');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
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.49
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.49');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
sliders-insert.php CHANGED
@@ -187,6 +187,7 @@ function wds_insert() {
187
  `layer_callback_list` varchar(32) NOT NULL,
188
  `hotspot_text_display` varchar(8) NOT NULL,
189
  `hover_color_text` varchar(8) NOT NULL,
 
190
  PRIMARY KEY (`id`)
191
  ) DEFAULT CHARSET=utf8;";
192
  $wpdb->query($wdslayer);
187
  `layer_callback_list` varchar(32) NOT NULL,
188
  `hotspot_text_display` varchar(8) NOT NULL,
189
  `hover_color_text` varchar(8) NOT NULL,
190
+ `text_alignment` varchar(8) NOT NULL,
191
  PRIMARY KEY (`id`)
192
  ) DEFAULT CHARSET=utf8;";
193
  $wpdb->query($wdslayer);
sliders-update.php CHANGED
@@ -140,6 +140,9 @@ function wds_update($version) {
140
  if (version_compare($version, '1.1.41') == -1) {
141
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wdslayer ADD `hover_color_text` varchar(8) NOT NULL DEFAULT ''");
142
  }
 
 
 
143
  return;
144
  }
145
 
140
  if (version_compare($version, '1.1.41') == -1) {
141
  $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wdslayer ADD `hover_color_text` varchar(8) NOT NULL DEFAULT ''");
142
  }
143
+ if (version_compare($version, '1.1.49') == -1) {
144
+ $wpdb->query("ALTER TABLE " . $wpdb->prefix . "wdslayer ADD `text_alignment` varchar(8) NOT NULL DEFAULT 'center'");
145
+ }
146
  return;
147
  }
148