Slider by WD – Responsive Slider - Version 1.1.55

Version Description

  • Added: Merge sliders.
  • Fixed: Double quotes in custom javascript.
Download this release

Release Info

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

Code changes from version 1.1.54 to 1.1.55

admin/controllers/WDSControllerSliders_wds.php CHANGED
@@ -208,7 +208,7 @@ class WDSControllerSliders_wds {
208
  $fixed_bg = ((isset($params_array['fixed_bg'])) ? (int) esc_html(stripslashes($params_array['fixed_bg'])) : 0);
209
  $smart_crop = ((isset($params_array['smart_crop'])) ? (int) esc_html(stripslashes($params_array['smart_crop'])) : 0);
210
  $crop_image_position = ((isset($params_array['crop_image_position'])) ? esc_html(stripslashes($params_array['crop_image_position'])) : 'middle-center');
211
- $javascript = ((isset($params_array['javascript'])) ? esc_html(stripslashes($params_array['javascript'])) : '');
212
  $carousel_degree = ((isset($params_array['carousel_degree'])) ? (int) esc_html(stripslashes($params_array['carousel_degree'])) : 0);
213
  $carousel_grayscale = ((isset($params_array['carousel_grayscale'])) ? (int) esc_html(stripslashes($params_array['carousel_grayscale'])) : 0);
214
  $carousel_transparency = ((isset($params_array['carousel_transparency'])) ? (int) esc_html(stripslashes($params_array['carousel_transparency'])) : 0);
@@ -726,14 +726,15 @@ class WDSControllerSliders_wds {
726
  $this->display();
727
  }
728
 
729
- public function duplicate_tables($slider_id) {
730
  global $wpdb;
731
  if ($slider_id) {
732
- $slider_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider where id="%d"', $slider_id));
733
- }
734
  if ($slider_row) {
 
735
  $save = $wpdb->insert($wpdb->prefix . 'wdsslider', array(
736
- 'name' => $slider_row->name,
737
  'published' => $slider_row->published,
738
  'full_width' => $slider_row->full_width,
739
  'width' => $slider_row->width,
@@ -838,7 +839,7 @@ class WDSControllerSliders_wds {
838
  'bull_hover' => $slider_row->bull_hover,
839
  'show_thumbnail' => $slider_row->show_thumbnail,
840
  'thumb_size' => $slider_row->thumb_size,
841
- 'hide_on_mobile' => $slider_row->hide_on_mobile,
842
  ));
843
  $new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
844
 
@@ -1208,6 +1209,122 @@ class WDSControllerSliders_wds {
1208
  }
1209
  $this->display();
1210
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1211
 
1212
  ////////////////////////////////////////////////////////////////////////////////////////
1213
  // Getters & Setters //
208
  $fixed_bg = ((isset($params_array['fixed_bg'])) ? (int) esc_html(stripslashes($params_array['fixed_bg'])) : 0);
209
  $smart_crop = ((isset($params_array['smart_crop'])) ? (int) esc_html(stripslashes($params_array['smart_crop'])) : 0);
210
  $crop_image_position = ((isset($params_array['crop_image_position'])) ? esc_html(stripslashes($params_array['crop_image_position'])) : 'middle-center');
211
+ $javascript = ((isset($params_array['javascript'])) ? $params_array['javascript'] : '');
212
  $carousel_degree = ((isset($params_array['carousel_degree'])) ? (int) esc_html(stripslashes($params_array['carousel_degree'])) : 0);
213
  $carousel_grayscale = ((isset($params_array['carousel_grayscale'])) ? (int) esc_html(stripslashes($params_array['carousel_grayscale'])) : 0);
214
  $carousel_transparency = ((isset($params_array['carousel_transparency'])) ? (int) esc_html(stripslashes($params_array['carousel_transparency'])) : 0);
726
  $this->display();
727
  }
728
 
729
+ public function duplicate_tables($slider_id, $new_slider_name = "") {
730
  global $wpdb;
731
  if ($slider_id) {
732
+ $slider_row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider where id="%d"', $slider_id));
733
+ }
734
  if ($slider_row) {
735
+ $name = $new_slider_name ? $new_slider_name : $slider_row->name;
736
  $save = $wpdb->insert($wpdb->prefix . 'wdsslider', array(
737
+ 'name' => $name,
738
  'published' => $slider_row->published,
739
  'full_width' => $slider_row->full_width,
740
  'width' => $slider_row->width,
839
  'bull_hover' => $slider_row->bull_hover,
840
  'show_thumbnail' => $slider_row->show_thumbnail,
841
  'thumb_size' => $slider_row->thumb_size,
842
+ 'hide_on_mobile' => $slider_row->hide_on_mobile,
843
  ));
844
  $new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
845
 
1209
  }
1210
  $this->display();
1211
  }
1212
+
1213
+ public function merge_sliders($id) {
1214
+ global $wpdb;
1215
+ $flag = FALSE;
1216
+ $check_sliders = array();
1217
+ $sliders_names = array();
1218
+ $sliders_ids_col = $wpdb->get_results('SELECT id, name FROM ' . $wpdb->prefix . 'wdsslider ORDER BY id');
1219
+ $name = "Merged sliders of ";
1220
+ foreach ($sliders_ids_col as $slider_id) {
1221
+ if (isset($_POST['check_' . $slider_id->id])) {
1222
+ $check_sliders[] = $slider_id->id;
1223
+ $sliders_names[] = $slider_id->name;
1224
+ }
1225
+ }
1226
+ if (count($check_sliders) > 1) {
1227
+ $name .= implode(",",$sliders_names);
1228
+ $last_slider_id = $check_sliders[count($check_sliders) - 1];
1229
+ $new_slider_id = $this->duplicate_tables($last_slider_id, $name);
1230
+ $max_order = $wpdb->get_var($wpdb->prepare('SELECT MAX(`order`) FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"',$new_slider_id));
1231
+ array_pop($check_sliders);
1232
+ $this->insert_slides($new_slider_id, $check_sliders, $max_order);
1233
+ $flag = TRUE;
1234
+ echo WDW_S_Library::message('The selected items are merged as a new slider.', 'wd_updated');
1235
+ }
1236
+ else {
1237
+ echo WDW_S_Library::message('You should select at least 2 sliders to merge them.', 'wd_error');
1238
+ }
1239
+ $this->display();
1240
+ }
1241
+
1242
+ public function insert_slides($slider_id, $check_sliders, $max_order) {
1243
+ global $wpdb;
1244
+ if ($slider_id) {
1245
+ $slides = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id In ('.implode(",", $check_sliders).')');
1246
+ }
1247
+ if ($slides) {
1248
+ foreach ($slides as $single_slide) {
1249
+ $max_order++;
1250
+ $save = $wpdb->insert($wpdb->prefix . 'wdsslide', array(
1251
+ 'slider_id' => $slider_id,
1252
+ 'title' => $single_slide->title,
1253
+ 'type' => $single_slide->type,
1254
+ 'order' => $max_order,
1255
+ 'published' => $single_slide->published,
1256
+ 'link' => $single_slide->link,
1257
+ 'image_url' => $single_slide->image_url,
1258
+ 'thumb_url' => $single_slide->thumb_url,
1259
+ 'target_attr_slide' => $single_slide->target_attr_slide,
1260
+ 'youtube_rel_video' => $single_slide->youtube_rel_video,
1261
+ 'video_loop' => $single_slide->video_loop,
1262
+ ));
1263
+ $new_slide_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslide');
1264
+ $slider_layer = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdslayer where slide_id="%d"', $single_slide->id));
1265
+ if ($slider_layer) {
1266
+ foreach ($slider_layer as $layer_id) {
1267
+ if ($layer_id) {
1268
+ $save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
1269
+ 'slide_id' => $new_slide_id,
1270
+ 'title' => $layer_id->title,
1271
+ 'type' => $layer_id->type,
1272
+ 'depth' => $layer_id->depth,
1273
+ 'text' => $layer_id->text,
1274
+ 'link' => $layer_id->link,
1275
+ 'left' => $layer_id->left,
1276
+ 'top' => $layer_id->top,
1277
+ 'start' => $layer_id->start,
1278
+ 'end' => $layer_id->end,
1279
+ 'published' => $layer_id->published,
1280
+ 'color' => $layer_id->color,
1281
+ 'size' => $layer_id->size,
1282
+ 'ffamily' => $layer_id->ffamily,
1283
+ 'fweight' => $layer_id->fweight,
1284
+ 'padding' => $layer_id->padding,
1285
+ 'fbgcolor' => $layer_id->fbgcolor,
1286
+ 'transparent' => $layer_id->transparent,
1287
+ 'border_width' => $layer_id->border_width,
1288
+ 'border_style' => $layer_id->border_style,
1289
+ 'border_color' => $layer_id->border_color,
1290
+ 'border_radius' => $layer_id->border_radius,
1291
+ 'shadow' => $layer_id->shadow,
1292
+ 'image_url' => $layer_id->image_url,
1293
+ 'image_width' => $layer_id->image_width,
1294
+ 'image_height' => $layer_id->image_height,
1295
+ 'image_scale' => $layer_id->image_scale,
1296
+ 'alt' => $layer_id->alt,
1297
+ 'imgtransparent' => $layer_id->imgtransparent,
1298
+ 'social_button' => $layer_id->social_button,
1299
+ 'hover_color' => $layer_id->hover_color,
1300
+ 'layer_effect_in' => $layer_id->layer_effect_in,
1301
+ 'layer_effect_out' => $layer_id->layer_effect_out,
1302
+ 'duration_eff_in' => $layer_id->duration_eff_in,
1303
+ 'duration_eff_out' => $layer_id->duration_eff_out,
1304
+ 'target_attr_layer' => $layer_id->target_attr_layer,
1305
+ 'hotp_width' => $layer_id->hotp_width,
1306
+ 'hotp_fbgcolor' => $layer_id->hotp_fbgcolor,
1307
+ 'hotp_border_width' => $layer_id->hotp_border_width,
1308
+ 'hotp_border_style' => $layer_id->hotp_border_style,
1309
+ 'hotp_border_color' => $layer_id->hotp_border_color,
1310
+ 'hotp_border_radius' => $layer_id->hotp_border_radius,
1311
+ 'hotp_text_position' => $layer_id->hotp_text_position,
1312
+ 'google_fonts' => $layer_id->google_fonts,
1313
+ 'add_class' => $layer_id->add_class,
1314
+ 'layer_video_loop' => $layer_id->layer_video_loop,
1315
+ 'youtube_rel_layer_video' => $layer_id->youtube_rel_layer_video,
1316
+ 'hotspot_animation' => $layer_id->hotspot_animation,
1317
+ 'layer_callback_list' => $layer_id->layer_callback_list,
1318
+ 'hotspot_text_display' => $layer_id->hotspot_text_display,
1319
+ 'hover_color_text' => $layer_id->hover_color_text,
1320
+ ));
1321
+ }
1322
+ }
1323
+ }
1324
+ }
1325
+ }
1326
+ return $slider_id;
1327
+ }
1328
 
1329
  ////////////////////////////////////////////////////////////////////////////////////////
1330
  // Getters & Setters //
admin/views/WDSViewSliders_wds.php CHANGED
@@ -37,7 +37,8 @@ class WDSViewSliders_wds {
37
  'unpublish_all' => __('Unpublish', 'wds'),
38
  'delete_all' => __('Delete', 'wds'),
39
  'duplicate_all' => __('Duplicate', 'wds'),
40
- 'export' => __('Export', 'wds')
 
41
  );
42
  ?>
43
  <style>
37
  'unpublish_all' => __('Unpublish', 'wds'),
38
  'delete_all' => __('Delete', 'wds'),
39
  'duplicate_all' => __('Duplicate', 'wds'),
40
+ 'export' => __('Export', 'wds'),
41
+ 'merge_sliders' => __('Merge', 'wds')
42
  );
43
  ?>
44
  <style>
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.54
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,8 +122,13 @@ After downloading the ZIP file of the slider plugin,
122
 
123
  == Changelog ==
124
 
 
 
 
 
 
125
  = 1.1.54 =
126
- * Fixed: Layer RotatInDownRight effect saving.
127
 
128
  = 1.1.53 =
129
  * Fixed: Slider add new button under the message.
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.55
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+
126
+ = 1.1.55 =
127
+ * Added: Merge sliders.
128
+ * Fixed: Double quotes in custom javascript.
129
+
130
  = 1.1.54 =
131
+ * Fixed: Layer RotatInDownRight effect saving.
132
 
133
  = 1.1.53 =
134
  * Fixed: Slider add new button under the message.
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.54
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.54');
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.55
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.55');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());