Slider by WD – Responsive Slider - Version 1.1.77

Version Description

Added: Minimum font size for text layers

Download this release

Release Info

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

Code changes from version 1.1.75 to 1.1.77

admin/controllers/WDSControllerSliders_wds.php CHANGED
@@ -482,6 +482,7 @@ class WDSControllerSliders_wds {
482
  $static_layer = ((isset($params_array_layer['static_layer'])) ? (int) esc_html(stripslashes($params_array_layer['static_layer'])) : 0);
483
  $infinite_in = ((isset($params_array_layer['infinite_in'])) ? (int) esc_html(stripslashes($params_array_layer['infinite_in'])) : 1);
484
  $infinite_out = ((isset($params_array_layer['infinite_out'])) ? (int) esc_html(stripslashes($params_array_layer['infinite_out'])) : 1);
 
485
  if ($title) {
486
  if (strpos($layer_id, 'pr_') !== FALSE || $save_as_copy) {
487
  $save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
@@ -542,6 +543,7 @@ class WDSControllerSliders_wds {
542
  'static_layer' => $static_layer,
543
  'infinite_in' => $infinite_in,
544
  'infinite_out' => $infinite_out,
 
545
  ));
546
  }
547
  else {
@@ -598,6 +600,7 @@ class WDSControllerSliders_wds {
598
  'static_layer' => $static_layer,
599
  'infinite_in' => $infinite_in,
600
  'infinite_out' => $infinite_out,
 
601
  ), array('id' => $layer_id));
602
  }
603
  }
@@ -941,6 +944,7 @@ class WDSControllerSliders_wds {
941
  'static_layer' => $layer_id->static_layer,
942
  'infinite_in' => $layer_id->infinite_in,
943
  'infinite_out' => $layer_id->infinite_out,
 
944
  ));
945
  }
946
  }
@@ -1352,6 +1356,7 @@ class WDSControllerSliders_wds {
1352
  'static_layer' => $layer_id->static_layer,
1353
  'infinite_in' => $layer_id->infinite_in,
1354
  'infinite_out' => $layer_id->infinite_out,
 
1355
  ));
1356
  }
1357
  }
482
  $static_layer = ((isset($params_array_layer['static_layer'])) ? (int) esc_html(stripslashes($params_array_layer['static_layer'])) : 0);
483
  $infinite_in = ((isset($params_array_layer['infinite_in'])) ? (int) esc_html(stripslashes($params_array_layer['infinite_in'])) : 1);
484
  $infinite_out = ((isset($params_array_layer['infinite_out'])) ? (int) esc_html(stripslashes($params_array_layer['infinite_out'])) : 1);
485
+ $min_size = ((isset($params_array_layer['min_size'])) ? (int) esc_html(stripslashes($params_array_layer['min_size'])) : 11);
486
  if ($title) {
487
  if (strpos($layer_id, 'pr_') !== FALSE || $save_as_copy) {
488
  $save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
543
  'static_layer' => $static_layer,
544
  'infinite_in' => $infinite_in,
545
  'infinite_out' => $infinite_out,
546
+ 'min_size' => $min_size,
547
  ));
548
  }
549
  else {
600
  'static_layer' => $static_layer,
601
  'infinite_in' => $infinite_in,
602
  'infinite_out' => $infinite_out,
603
+ 'min_size' => $min_size,
604
  ), array('id' => $layer_id));
605
  }
606
  }
944
  'static_layer' => $layer_id->static_layer,
945
  'infinite_in' => $layer_id->infinite_in,
946
  'infinite_out' => $layer_id->infinite_out,
947
+ 'min_size' => $layer_id->min_size,
948
  ));
949
  }
950
  }
1356
  'static_layer' => $layer_id->static_layer,
1357
  'infinite_in' => $layer_id->infinite_in,
1358
  'infinite_out' => $layer_id->infinite_out,
1359
+ 'min_size' => $layer_id->min_size,
1360
  ));
1361
  }
1362
  }
admin/views/WDSViewGoptions_wds.php CHANGED
@@ -129,23 +129,8 @@ class WDSViewGoptions_wds {
129
  $global_options->register_scripts = get_option("wds_register_scripts", 0);
130
  }
131
  ?>
132
- <div style="clear: both; float: left; width: 99%;">
133
- <div style="float: left; font-size: 14px; font-weight: bold;">
134
- This section allows you to edit global options for sliders.
135
- <a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-slider-wd/adding-images.html">Read More in User Manual</a>
136
- </div>
137
- </div>
138
- <div class="wds_pro_container">
139
- <a class="wds_pro_link wds_pro_text" target="_blank" href="https://web-dorado.com/files/fromslider.php">
140
- <?php
141
- $text = strtoupper(__('Upgrade to paid version', 'wds'));
142
- ?>
143
- <span><?php echo $text; ?></span>
144
- <img class="wds_pro_image" alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo WD_S_URL . '/images/wd_logo.png?v2'; ?>"" />
145
- </a>
146
- </div>
147
  <div class="clear"></div>
148
- <form class="wrap wds_form" id="sliders_form" method="post" action="admin.php?page=goptions_wds" style="width: 99%;" enctype="multipart/form-data">
149
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
150
  <div class="wds-options-page-banner">
151
  <div class="wds-options-logo"></div>
129
  $global_options->register_scripts = get_option("wds_register_scripts", 0);
130
  }
131
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  <div class="clear"></div>
133
+ <form class="wrap wds_form" id="sliders_form" method="post" action="admin.php?page=goptions_wds" style="width: 98%;" enctype="multipart/form-data">
134
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
135
  <div class="wds-options-page-banner">
136
  <div class="wds-options-logo"></div>
admin/views/WDSViewSliders_wds.php CHANGED
@@ -39,12 +39,10 @@ class WDSViewSliders_wds {
39
  'export' => __('Export', 'wds'),
40
  'merge_sliders' => __('Merge', 'wds')
41
  );
42
- ?>
43
- <style>
44
- <?php
45
  global $wp_version;
46
  if (version_compare($wp_version, '4','<')) {
47
  ?>
 
48
  #wpwrap {
49
  background-color: #F1F1F1;
50
  }
@@ -63,26 +61,11 @@ class WDSViewSliders_wds {
63
  display:none;
64
  }
65
  }
 
66
  <?php
67
  }
68
  ?>
69
- </style>
70
- <div style="width: 99%;">
71
- <div style="font-size: 14px; font-weight: bold;">
72
- This section allows you to create, edit and delete sliders.
73
- <a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-slider-wd/adding-images.html">Read More in User Manual</a>
74
- </div>
75
- <div class="wds_pro_container">
76
- <a class="wds_pro_link wds_pro_text" target="_blank" href="https://web-dorado.com/files/fromslider.php">
77
- <?php
78
- $text = strtoupper(__('Upgrade to paid version', 'wds'));
79
- ?>
80
- <span><?php echo $text; ?></span>
81
- <img class="wds_pro_image" alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo WD_S_URL . '/images/wd_logo.png?v2'; ?>"" />
82
- </a>
83
- </div>
84
- </div>
85
- <form class="wrap wds_form" id="sliders_form" method="post" action="admin.php?page=sliders_wds" style="float: left; width: 99%;">
86
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
87
  <div class="wds_opacity_export" onclick="jQuery('.wds_opacity_export').hide();jQuery('.wds_exports').hide();"></div>
88
  <div class="wds_exports">
@@ -476,12 +459,10 @@ class WDSViewSliders_wds {
476
  $fv_message = '';
477
  $fv_title = '';
478
  }
479
- ?>
 
 
480
  <style>
481
- <?php
482
- global $wp_version;
483
- if (version_compare($wp_version, '4','<')) {
484
- ?>
485
  #wpwrap {
486
  background-color:#F1F1F1
487
  }
@@ -543,31 +524,16 @@ class WDSViewSliders_wds {
543
  }
544
 
545
  }
546
- <?php
547
- }
548
- ?>
549
  </style>
 
 
 
550
  <div class="spider_message_cont"></div>
551
  <div class="spider_load">
552
  <div class="spider_load_cont"></div>
553
  <div class="spider_load_icon"><img class="spider_ajax_loading" src="<?php echo WD_S_URL . '/images/ajax_loader_back.gif'; ?>"></div>
554
  </div>
555
- <div style="clear: both; float: left; width: 99%;">
556
- <div style="float: left; font-size: 14px; font-weight: bold;">
557
- This section allows you to add/edit slider.
558
- <a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-slider-wd/adding-images.html">Read More in User Manual</a>
559
- </div>
560
- <div class="wds_pro_container">
561
- <a class="wds_pro_link wds_pro_text" target="_blank" href="https://web-dorado.com/files/fromslider.php">
562
- <?php
563
- $text = strtoupper(__('Upgrade to paid version', 'wds'));
564
- ?>
565
- <span><?php echo $text; ?></span>
566
- <img class="wds_pro_image" alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo WD_S_URL . '/images/wd_logo.png?v2'; ?>"" />
567
- </a>
568
- </div>
569
- </div>
570
- <form class="wrap wds_form" method="post" id="sliders_form" action="admin.php?page=sliders_wds" style="float: left; width: 99%;">
571
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
572
  <span class="slider-icon"></span>
573
  <h2 class="wds_default"><?php echo $page_title; ?></h2>
@@ -2397,14 +2363,14 @@ class WDSViewSliders_wds {
2397
  if (!$spider_uploader) {
2398
  ?>
2399
  <div class="layer_add_buttons_wrap">
2400
- <button class="action_buttons add_image_layer <?php echo !$fv ? "" : " wds_free_button"; ?> button-small" onclick="<?php echo !$fv ? "wds_add_layer('image', '" . $slide_row->id . "', '', event)" : "alert('This functionality is disabled in free version.')"; ?>; return false;" >Add Image Layer</button>
2401
  </div>
2402
  <?php
2403
  }
2404
  else {
2405
  ?>
2406
  <div class="layer_add_buttons_wrap">
2407
- <a href="<?php echo !$fv ? add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_layer', 'slide_id' => $slide_row->id, 'TB_iframe' => '1'), $query_url) : ''; ?>" onclick="<?php echo !$fv ? '' : "alert('This functionality is disabled in free version.')"; ?>; return false;" class="action_buttons add_image_layer <?php echo !$fv ? "thickbox thickbox-preview" : "wds_free_button"; ?> button-small" title="Add Image Layer">
2408
  Add Image layer
2409
  </a>
2410
  </div>
@@ -2496,15 +2462,20 @@ class WDSViewSliders_wds {
2496
  <input id="<?php echo $prefix; ?>_align_layer" type="checkbox" name="<?php echo $prefix; ?>_align_layer" <?php echo checked(1, $layer->align_layer ); ?> value="1" onchange="wds_position_left_disabled('<?php echo $prefix; ?>')" /><label for="<?php echo $prefix; ?>_align_layer">Fixed step (left, center, right)</label>
2497
  </td>
2498
  </tr>
2499
- <tr class="wds_layer_tr" >
2500
  <td class="spider_label">
2501
  <label for="<?php echo $prefix; ?>_size">Size: </label>
2502
  </td>
2503
  <td>
2504
- <input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $layer->size; ?>" name="<?php echo $prefix; ?>_size" /> px
2505
- <div class="spider_description"></div>
2506
- </td>
2507
- </tr>
 
 
 
 
 
2508
  <tr class="wds_layer_tr" >
2509
  <td class="spider_label">
2510
  <label for="<?php echo $prefix; ?>_color">Color: </label>
39
  'export' => __('Export', 'wds'),
40
  'merge_sliders' => __('Merge', 'wds')
41
  );
 
 
 
42
  global $wp_version;
43
  if (version_compare($wp_version, '4','<')) {
44
  ?>
45
+ <style>
46
  #wpwrap {
47
  background-color: #F1F1F1;
48
  }
61
  display:none;
62
  }
63
  }
64
+ </style>
65
  <?php
66
  }
67
  ?>
68
+ <form class="wrap wds_form" id="sliders_form" method="post" action="admin.php?page=sliders_wds" style="float: left; width: 98%;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
70
  <div class="wds_opacity_export" onclick="jQuery('.wds_opacity_export').hide();jQuery('.wds_exports').hide();"></div>
71
  <div class="wds_exports">
459
  $fv_message = '';
460
  $fv_title = '';
461
  }
462
+ global $wp_version;
463
+ if (version_compare($wp_version, '4','<')) {
464
+ ?>
465
  <style>
 
 
 
 
466
  #wpwrap {
467
  background-color:#F1F1F1
468
  }
524
  }
525
 
526
  }
 
 
 
527
  </style>
528
+ <?php
529
+ }
530
+ ?>
531
  <div class="spider_message_cont"></div>
532
  <div class="spider_load">
533
  <div class="spider_load_cont"></div>
534
  <div class="spider_load_icon"><img class="spider_ajax_loading" src="<?php echo WD_S_URL . '/images/ajax_loader_back.gif'; ?>"></div>
535
  </div>
536
+ <form class="wrap wds_form" method="post" id="sliders_form" action="admin.php?page=sliders_wds" style="float: left; width: 98%;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
538
  <span class="slider-icon"></span>
539
  <h2 class="wds_default"><?php echo $page_title; ?></h2>
2363
  if (!$spider_uploader) {
2364
  ?>
2365
  <div class="layer_add_buttons_wrap">
2366
+ <button class="action_buttons add_image_layer <?php echo " wds_free_button"; ?> button-small" onclick="<?php echo "alert('This functionality is disabled in free version.')"; ?>; return false;" >Add Image Layer</button>
2367
  </div>
2368
  <?php
2369
  }
2370
  else {
2371
  ?>
2372
  <div class="layer_add_buttons_wrap">
2373
+ <a href="<?php echo $fv ? add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_layer', 'slide_id' => $slide_row->id, 'TB_iframe' => '1'), $query_url) : ''; ?>" onclick="<?php echo "alert('This functionality is disabled in free version.')"; ?>; return false;" class="action_buttons add_image_layer <?php echo " wds_free_button"; ?> button-small" title="Add Image Layer">
2374
  Add Image layer
2375
  </a>
2376
  </div>
2462
  <input id="<?php echo $prefix; ?>_align_layer" type="checkbox" name="<?php echo $prefix; ?>_align_layer" <?php echo checked(1, $layer->align_layer ); ?> value="1" onchange="wds_position_left_disabled('<?php echo $prefix; ?>')" /><label for="<?php echo $prefix; ?>_align_layer">Fixed step (left, center, right)</label>
2463
  </td>
2464
  </tr>
2465
+ <tr class="wds_layer_tr">
2466
  <td class="spider_label">
2467
  <label for="<?php echo $prefix; ?>_size">Size: </label>
2468
  </td>
2469
  <td>
2470
+ <span style="display: table-cell">
2471
+ <input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $layer->size; ?>" name="<?php echo $prefix; ?>_size" /> px
2472
+ </span>
2473
+ <span style="display: table-cell;">
2474
+ <input id="<?php echo $prefix; ?>_min_size" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" value="<?php echo $layer->min_size; ?>" name="<?php echo $prefix; ?>_min_size" /> px
2475
+ <div class="spider_description">Minimum size</div>
2476
+ </span>
2477
+ </td>
2478
+ </tr>
2479
  <tr class="wds_layer_tr" >
2480
  <td class="spider_label">
2481
  <label for="<?php echo $prefix; ?>_color">Color: </label>
frontend/models/WDSModelSlider.php CHANGED
@@ -33,7 +33,12 @@ class WDSModelSlider {
33
  global $wpdb;
34
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
35
  if ($row) {
36
- $row->music_url = str_replace('{site_url}', site_url(), $row->music_url);
 
 
 
 
 
37
  $row->right_butt_url = str_replace('{site_url}', site_url(), $row->right_butt_url);
38
  $row->left_butt_url = str_replace('{site_url}', site_url(), $row->left_butt_url);
39
  $row->right_butt_hov_url = str_replace('{site_url}', site_url(), $row->right_butt_hov_url);
33
  global $wpdb;
34
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
35
  if ($row) {
36
+ if ($row->music_url != '' && file_exists(str_replace('{site_url}', ABSPATH, $row->music_url))) {
37
+ $row->music_url = str_replace('{site_url}', site_url(), $row->music_url);
38
+ }
39
+ else {
40
+ $row->music_url = '';
41
+ }
42
  $row->right_butt_url = str_replace('{site_url}', site_url(), $row->right_butt_url);
43
  $row->left_butt_url = str_replace('{site_url}', site_url(), $row->left_butt_url);
44
  $row->right_butt_hov_url = str_replace('{site_url}', site_url(), $row->right_butt_hov_url);
frontend/views/WDSViewSlider.php CHANGED
@@ -103,7 +103,6 @@ class WDSViewSlider {
103
  }
104
  $enable_slideshow_music = $slider_row->music;
105
  $slideshow_music_url = $slider_row->music_url;
106
-
107
  $filmstrip_direction = ($slider_row->film_pos == 'right' || $slider_row->film_pos == 'left') ? 'vertical' : 'horizontal';
108
  $filmstrip_position = 'none';
109
  $filmstrip_thumb_margin_hor = 2 * $slider_row->film_tmb_margin;
@@ -833,6 +832,9 @@ class WDSViewSlider {
833
  if (!isset($layer->infinite_out)) {
834
  $layer->infinite_out = 1;
835
  }
 
 
 
836
  ?>
837
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["layer_<?php echo $layer_key; ?>_id"] = "<?php echo $layer->id; ?>";
838
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["layer_<?php echo $layer_key; ?>_layer_effect_in"] = "<?php echo $layer->layer_effect_in; ?>";
@@ -965,7 +967,7 @@ class WDSViewSlider {
965
  switch ($layer->type) {
966
  case 'text': {
967
  ?>
968
- <span class="wds_layer_<?php echo $layer->id; ?>" data-class="<?php echo $layer_add_class; ?>" data-type="wds_text_parent" data-row-key="<?php echo $key;?>" data-layer-key="<?php echo $layer_key;?>" id="<?php echo $prefix; ?>" wds_fsize="<?php echo $layer->size; ?>"
969
  style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?>
970
  <?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>
971
  word-break: <?php echo ($layer->image_scale ? 'normal' : 'break-all'); ?>;
@@ -1788,13 +1790,27 @@ class WDSViewSlider {
1788
  }
1789
  });
1790
  jQuery(".wds_slideshow_image_<?php echo $wds; ?> span, .wds_slideshow_image_<?php echo $wds; ?> i").each(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1791
  jQuery(this).css({
1792
- fontSize: (parseFloat(jQuery(this).attr("wds_fsize")) * ratio) + "px",
1793
  lineHeight: "1.25em",
1794
- paddingLeft: (parseFloat(jQuery(this).attr("wds_fpaddingl")) * ratio) + "px",
1795
- paddingRight: (parseFloat(jQuery(this).attr("wds_fpaddingr")) * ratio) + "px",
1796
- paddingTop: (parseFloat(jQuery(this).attr("wds_fpaddingt")) * ratio) + "px",
1797
- paddingBottom: (parseFloat(jQuery(this).attr("wds_fpaddingb")) * ratio) + "px",
1798
  });
1799
  });
1800
  jQuery(".wds_slideshow_image_<?php echo $wds; ?> [data-type='wds_text_parent']").each(function () {
@@ -2056,7 +2072,9 @@ class WDSViewSlider {
2056
  }
2057
  play_<?php echo $wds; ?>();
2058
  if (<?php echo $enable_slideshow_music ?>) {
2059
- document.getElementById("wds_audio_<?php echo $wds; ?>").play();
 
 
2060
  }
2061
  }
2062
  else {
@@ -2138,7 +2156,9 @@ class WDSViewSlider {
2138
  jQuery(".wds_slideshow_play_pause_<?php echo $wds; ?>").attr("title", "<?php echo __('Pause', 'wds'); ?>");
2139
  jQuery(".wds_slideshow_play_pause_<?php echo $wds; ?>").attr("class", "wds_ctrl_btn_<?php echo $wds; ?> wds_slideshow_play_pause_<?php echo $wds; ?> fa fa-pause");
2140
  if (<?php echo $enable_slideshow_music ?>) {
2141
- document.getElementById("wds_audio_<?php echo $wds; ?>").play();
 
 
2142
  }
2143
  if ('<?php echo $slider_row->timer_bar_type; ?>' != 'none') {
2144
  if ('<?php echo $slider_row->timer_bar_type; ?>' != 'top') {
@@ -2239,7 +2259,9 @@ class WDSViewSlider {
2239
  }
2240
  }
2241
  if (<?php echo $enable_slideshow_music ?>) {
2242
- document.getElementById("wds_audio_<?php echo $wds; ?>").play();
 
 
2243
  }
2244
  var next_slide_layers_count = wds_data_<?php echo $wds; ?>[wds_current_key_<?php echo $wds; ?>]["slide_layers_count"];
2245
  for (var i = 0; i < next_slide_layers_count; i++) {
@@ -2316,8 +2338,22 @@ class WDSViewSlider {
2316
  wds_playInterval_<?php echo $wds; ?> = setInterval(function () {
2317
  var curr_img_index = parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val());
2318
  if ('<?php echo $slider_loop; ?>' == 0) {
2319
- if (curr_img_index == <?php echo $slides_count - 1; ?>) {
2320
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2321
  }
2322
  }
2323
  var iterator = 1;
@@ -2327,9 +2363,9 @@ class WDSViewSlider {
2327
  }
2328
  else if (<?php echo $twoway_slideshow; ?>) {
2329
  if (wds_global_btn_<?php echo $wds; ?> == "left") {
2330
- iterator = -1;
2331
- img_index = (parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()) + iterator) >= 0 ? (parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()) + iterator) % wds_data_<?php echo $wds; ?>.length : wds_data_<?php echo $wds; ?>.length - 1;
2332
- }
2333
  }
2334
  wds_change_image_<?php echo $wds; ?>(parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()), img_index, wds_data_<?php echo $wds; ?>);
2335
  }, parseInt('<?php echo ($slideshow_interval * 1000); ?>') + wds_duration_for_change_<?php echo $wds; ?>);
103
  }
104
  $enable_slideshow_music = $slider_row->music;
105
  $slideshow_music_url = $slider_row->music_url;
 
106
  $filmstrip_direction = ($slider_row->film_pos == 'right' || $slider_row->film_pos == 'left') ? 'vertical' : 'horizontal';
107
  $filmstrip_position = 'none';
108
  $filmstrip_thumb_margin_hor = 2 * $slider_row->film_tmb_margin;
832
  if (!isset($layer->infinite_out)) {
833
  $layer->infinite_out = 1;
834
  }
835
+ if (!isset($layer->min_size)) {
836
+ $layer->min_size = 11;
837
+ }
838
  ?>
839
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["layer_<?php echo $layer_key; ?>_id"] = "<?php echo $layer->id; ?>";
840
  wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["layer_<?php echo $layer_key; ?>_layer_effect_in"] = "<?php echo $layer->layer_effect_in; ?>";
967
  switch ($layer->type) {
968
  case 'text': {
969
  ?>
970
+ <span class="wds_layer_<?php echo $layer->id; ?>" data-class="<?php echo $layer_add_class; ?>" data-type="wds_text_parent" data-row-key="<?php echo $key;?>" data-layer-key="<?php echo $layer_key;?>" id="<?php echo $prefix; ?>" wds_fsize="<?php echo $layer->size; ?>" wds_fmin_size="<?php echo $layer->min_size; ?>"
971
  style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?>
972
  <?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>
973
  word-break: <?php echo ($layer->image_scale ? 'normal' : 'break-all'); ?>;
1790
  }
1791
  });
1792
  jQuery(".wds_slideshow_image_<?php echo $wds; ?> span, .wds_slideshow_image_<?php echo $wds; ?> i").each(function () {
1793
+ var font_size;
1794
+ var ratio_new;
1795
+ var font_size_new;
1796
+ var min_font_size;
1797
+ font_size = parseFloat(jQuery(this).attr("wds_fsize")) * ratio;
1798
+ font_size_new = font_size;
1799
+ ratio_new = ratio;
1800
+ if (jQuery(this).attr('data-type') == 'wds_text_parent') {
1801
+ min_font_size = jQuery(this).attr("wds_fmin_size");
1802
+ if (min_font_size > font_size) {
1803
+ font_size_new = min_font_size;
1804
+ ratio_new = ratio * font_size_new / font_size;
1805
+ }
1806
+ }
1807
  jQuery(this).css({
1808
+ fontSize: (font_size_new) + "px",
1809
  lineHeight: "1.25em",
1810
+ paddingLeft: (parseFloat(jQuery(this).attr("wds_fpaddingl")) * ratio_new) + "px",
1811
+ paddingRight: (parseFloat(jQuery(this).attr("wds_fpaddingr")) * ratio_new) + "px",
1812
+ paddingTop: (parseFloat(jQuery(this).attr("wds_fpaddingt")) * ratio_new) + "px",
1813
+ paddingBottom: (parseFloat(jQuery(this).attr("wds_fpaddingb")) * ratio_new) + "px",
1814
  });
1815
  });
1816
  jQuery(".wds_slideshow_image_<?php echo $wds; ?> [data-type='wds_text_parent']").each(function () {
2072
  }
2073
  play_<?php echo $wds; ?>();
2074
  if (<?php echo $enable_slideshow_music ?>) {
2075
+ if ('<?php echo $slideshow_music_url; ?>' != '') {
2076
+ document.getElementById("wds_audio_<?php echo $wds; ?>").play();
2077
+ }
2078
  }
2079
  }
2080
  else {
2156
  jQuery(".wds_slideshow_play_pause_<?php echo $wds; ?>").attr("title", "<?php echo __('Pause', 'wds'); ?>");
2157
  jQuery(".wds_slideshow_play_pause_<?php echo $wds; ?>").attr("class", "wds_ctrl_btn_<?php echo $wds; ?> wds_slideshow_play_pause_<?php echo $wds; ?> fa fa-pause");
2158
  if (<?php echo $enable_slideshow_music ?>) {
2159
+ if ('<?php echo $slideshow_music_url; ?>' != '') {
2160
+ document.getElementById("wds_audio_<?php echo $wds; ?>").play();
2161
+ }
2162
  }
2163
  if ('<?php echo $slider_row->timer_bar_type; ?>' != 'none') {
2164
  if ('<?php echo $slider_row->timer_bar_type; ?>' != 'top') {
2259
  }
2260
  }
2261
  if (<?php echo $enable_slideshow_music ?>) {
2262
+ if ('<?php echo $slideshow_music_url; ?>' != '') {
2263
+ document.getElementById("wds_audio_<?php echo $wds; ?>").play();
2264
+ }
2265
  }
2266
  var next_slide_layers_count = wds_data_<?php echo $wds; ?>[wds_current_key_<?php echo $wds; ?>]["slide_layers_count"];
2267
  for (var i = 0; i < next_slide_layers_count; i++) {
2338
  wds_playInterval_<?php echo $wds; ?> = setInterval(function () {
2339
  var curr_img_index = parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val());
2340
  if ('<?php echo $slider_loop; ?>' == 0) {
2341
+ if (<?php echo $twoway_slideshow; ?>) {
2342
+ if (wds_global_btn_<?php echo $wds; ?> == "left") {
2343
+ if (curr_img_index == 0) {
2344
+ return false;
2345
+ }
2346
+ }
2347
+ else {
2348
+ if (curr_img_index == <?php echo $slides_count - 1; ?>) {
2349
+ return false;
2350
+ }
2351
+ }
2352
+ }
2353
+ else {
2354
+ if (curr_img_index == <?php echo $slides_count - 1; ?>) {
2355
+ return false;
2356
+ }
2357
  }
2358
  }
2359
  var iterator = 1;
2363
  }
2364
  else if (<?php echo $twoway_slideshow; ?>) {
2365
  if (wds_global_btn_<?php echo $wds; ?> == "left") {
2366
+ iterator = -1;
2367
+ img_index = (parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()) + iterator) >= 0 ? (parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()) + iterator) % wds_data_<?php echo $wds; ?>.length : wds_data_<?php echo $wds; ?>.length - 1;
2368
+ }
2369
  }
2370
  wds_change_image_<?php echo $wds; ?>(parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()), img_index, wds_data_<?php echo $wds; ?>);
2371
  }, parseInt('<?php echo ($slideshow_interval * 1000); ?>') + wds_duration_for_change_<?php echo $wds; ?>);
images/notice.png DELETED
Binary file
images/support.png ADDED
Binary file
images/wd_logo.png DELETED
Binary file
js/wds.js CHANGED
@@ -225,6 +225,7 @@ function spider_ajax_save(form_id, event) {
225
  json_data["layer_callback_list"] = jQuery("#" + prefix + "_layer_callback_list").val();
226
  json_data["link_to_slide"] = jQuery("#" + prefix + "_link_to_slide").val();
227
  json_data["align_layer"] = jQuery("input[name=" + prefix + "_align_layer]:checked").val();
 
228
  break;
229
  }
230
  case "image": {
@@ -1827,6 +1828,7 @@ function wds_duplicate_layer(type, id, layerID, new_id) {
1827
  jQuery("#" + new_prefix + "_hover_color_text").val(jQuery("#" + prefix + "_hover_color_text").val());
1828
  jQuery("#" + new_prefix + "_infinite_in").val(jQuery("#" + prefix + "_infinite_in").val());
1829
  jQuery("#" + new_prefix + "_infinite_out").val(jQuery("#" + prefix + "_infinite_out").val());
 
1830
  if (jQuery("#" + prefix + "_published1").is(":checked")) {
1831
  jQuery("#" + new_prefix + "_published1").attr("checked", "checked");
1832
  }
@@ -2193,7 +2195,15 @@ function wds_add_layer(type, id, layerID, duplicate, files, edit) {
2193
  var hover_color_text = '<td class="spider_label"><label for="' + prefix + '_hover_color_text">Hover Color: </label></td>' +
2194
  '<td><input type="text" name="' + prefix + '_hover_color_text" id="' + prefix + '_hover_color_text" value="" class="color" onchange="jQuery(\'#' + prefix + '\').hover(function() { jQuery(this).css({color: \'#\' + jQuery(\'#' + prefix + '_hover_color_text\').val()}); }, function() { jQuery(this).css({color: \'#\' + jQuery(\'#' + prefix + '_color\').val()}); })" /><div class="spider_description"></div></td>';
2195
  var size = '<td class="spider_label"><label for="' + prefix + '_size">Size: </label></td>' +
2196
- '<td><input type="text" name="' + prefix + '_size" id="' + prefix + '_size" value="18" class="spider_int_input" onkeypress="return spider_check_isnum(event)" onchange="jQuery(\'#' + prefix + '\').css({fontSize: jQuery(this).val() + \'px\', lineHeight: jQuery(this).val() + \'px\'})" /> px<div class="spider_description"></div></td>';
 
 
 
 
 
 
 
 
2197
  var ffamily = '<td class="spider_label"><label for="' + prefix + '_ffamily">Font family: </label></td>' +
2198
  '<td><select class="select_icon" style="width: 200px;" name="' + prefix + '_ffamily" id="' + prefix + '_ffamily" onchange="wds_change_fonts(\'' + prefix + '\', 1)"></select>' +
2199
  '<input type="radio" id="' + prefix + '_google_fonts1" name="' + prefix + '_google_fonts" value="1" onchange="wds_change_fonts(\'' + prefix + '\');" ' +((laydef_options.default_layer_google_fonts == 1) ? "checked='checked'" : "")+ ' /><label for="' + prefix + '_google_fonts1">Google fonts</label>' +
@@ -2653,13 +2663,13 @@ function wds_add_slide() {
2653
  slide_upload_by = ' <a href="' + uploader_href_for_add_slide + '" class="action_buttons edit_slide thickbox thickbox-preview" title="Add/Edit Image" onclick="return false;">Add/Edit Image</a>';
2654
  update_thumb_by = ' <input type="button" class="action_buttons edit_thumb wds_free_button" id="button_image_url' + slideID + '" onclick="alert(\'This functionality is disabled in free version.\'); return false;" value="Edit Thumbnail" />';
2655
  edit_slide_by = ' <a href="' + uploader_href_for_add_slide + '" class="wds_change_thumbnail thickbox thickbox-preview" title="Add/Edit Image" onclick="return false;"></a>';
2656
- img_layer_upload_by = ' <a href="' + (!fv ? uploader_href_for_add_layer : "") + '" class="' + (!fv ? "" : "wds_free_button") + ' action_buttons add_image_layer button-small" title="Add Image Layer" onclick="' + (!fv ? "" : "alert('This functionality is disabled in free version.')") + '; return false;">Add Image Layer</a>';
2657
  }
2658
  else {
2659
  slide_upload_by = ' <input id="button_image_url' + slideID + '" class="action_buttons edit_slide" type="button" value="Add/Edit Image" onclick="spider_media_uploader(\'' + slideID + '\', event); return false;" />';
2660
  edit_slide_by = ' <span class="wds_change_thumbnail" type="button" value="Add/Edit Image" onclick="spider_media_uploader(\'' + slideID + '\', event); return false;" ></span>';
2661
  update_thumb_by = ' <input type="button" class="action_buttons edit_thumb wds_free_button" id="button_image_url' + slideID + '" onclick="alert(\'This functionality is disabled in free version.\'); return false;" value="Edit Thumbnail" />';
2662
- img_layer_upload_by = ' <input class="action_buttons add_image_layer ' + (!fv ? "" : "secondary wds_free_button") + ' button-small" type="button" value="Add Image Layer" onclick="' + (!fv ? "wds_add_layer(\'image\', \'' + slideID + '\', \'\', event)" : "alert('This functionality is disabled in free version.')") + '; return false;" />';
2663
  }
2664
  jQuery("#slide_ids_string").val(jQuery("#slide_ids_string").val() + slideID + ',');
2665
  jQuery(".wds_slides_box *").removeClass("wds_sub_active");
@@ -2714,7 +2724,7 @@ function wds_add_slide() {
2714
  '<input id="target_attr_slide' + slideID + '" type="checkbox" name="target_attr_slide' + slideID + '" value="1" checked="checked" /><label for="target_attr_slide' + slideID + '"> Open in a new window</label>' +
2715
  '</td>' +
2716
  '</tr></table></td></tr><tr class="bgcolor"><td colspan="4">' +
2717
- '<div class="layer_add_buttons_wrap"><input class="action_buttons add_text_layer ' + (!fv ? "" : " wds_free_button") + ' button-small" type="button" value="Add Text Layer" onclick="' + (!fv ? "wds_add_layer(\'text\', \'' + slideID + '\')" : "alert('This functionality is disabled in free version.')") + '; return false;">' +
2718
  img_layer_upload_by +
2719
  '</div><div class="layer_add_buttons_wrap"><input class="action_buttons add_video_layer button-small wds_free_button" type="button" onclick="alert(\'This functionality is disabled in free version.\'); return false;" value="Add Video Layer" />' +
2720
  '</div><div class="layer_add_buttons_wrap"><input class="action_buttons add_embed_layer button-small wds_free_button" type="button" value="Embed Media Layer" onclick="alert(\'This functionality is disabled in free version.\'); return false;" />' +
225
  json_data["layer_callback_list"] = jQuery("#" + prefix + "_layer_callback_list").val();
226
  json_data["link_to_slide"] = jQuery("#" + prefix + "_link_to_slide").val();
227
  json_data["align_layer"] = jQuery("input[name=" + prefix + "_align_layer]:checked").val();
228
+ json_data["min_size"] = jQuery("#" + prefix + "_min_size").val();
229
  break;
230
  }
231
  case "image": {
1828
  jQuery("#" + new_prefix + "_hover_color_text").val(jQuery("#" + prefix + "_hover_color_text").val());
1829
  jQuery("#" + new_prefix + "_infinite_in").val(jQuery("#" + prefix + "_infinite_in").val());
1830
  jQuery("#" + new_prefix + "_infinite_out").val(jQuery("#" + prefix + "_infinite_out").val());
1831
+ jQuery("#" + new_prefix + "_min_size").val(jQuery("#" + prefix + "_min_size").val());
1832
  if (jQuery("#" + prefix + "_published1").is(":checked")) {
1833
  jQuery("#" + new_prefix + "_published1").attr("checked", "checked");
1834
  }
2195
  var hover_color_text = '<td class="spider_label"><label for="' + prefix + '_hover_color_text">Hover Color: </label></td>' +
2196
  '<td><input type="text" name="' + prefix + '_hover_color_text" id="' + prefix + '_hover_color_text" value="" class="color" onchange="jQuery(\'#' + prefix + '\').hover(function() { jQuery(this).css({color: \'#\' + jQuery(\'#' + prefix + '_hover_color_text\').val()}); }, function() { jQuery(this).css({color: \'#\' + jQuery(\'#' + prefix + '_color\').val()}); })" /><div class="spider_description"></div></td>';
2197
  var size = '<td class="spider_label"><label for="' + prefix + '_size">Size: </label></td>' +
2198
+ '<td>' +
2199
+ '<span style="display:table-cell;">' +
2200
+ '<input type="text" name="' + prefix + '_size" id="' + prefix + '_size" value="18" class="spider_int_input" onkeypress="return spider_check_isnum(event)" onchange="jQuery(\'#' + prefix + '\').css({fontSize: jQuery(this).val() + \'px\', lineHeight: jQuery(this).val() + \'px\'})" /> px' +
2201
+ '</span>' +
2202
+ '<span style="display:table-cell;">' +
2203
+ '<input type="text" name="' + prefix + '_min_size" id="' + prefix + '_min_size" value="11" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px' +
2204
+ '<div class="spider_description">Minimum size</div>' +
2205
+ '</span>' +
2206
+ '</td>';
2207
  var ffamily = '<td class="spider_label"><label for="' + prefix + '_ffamily">Font family: </label></td>' +
2208
  '<td><select class="select_icon" style="width: 200px;" name="' + prefix + '_ffamily" id="' + prefix + '_ffamily" onchange="wds_change_fonts(\'' + prefix + '\', 1)"></select>' +
2209
  '<input type="radio" id="' + prefix + '_google_fonts1" name="' + prefix + '_google_fonts" value="1" onchange="wds_change_fonts(\'' + prefix + '\');" ' +((laydef_options.default_layer_google_fonts == 1) ? "checked='checked'" : "")+ ' /><label for="' + prefix + '_google_fonts1">Google fonts</label>' +
2663
  slide_upload_by = ' <a href="' + uploader_href_for_add_slide + '" class="action_buttons edit_slide thickbox thickbox-preview" title="Add/Edit Image" onclick="return false;">Add/Edit Image</a>';
2664
  update_thumb_by = ' <input type="button" class="action_buttons edit_thumb wds_free_button" id="button_image_url' + slideID + '" onclick="alert(\'This functionality is disabled in free version.\'); return false;" value="Edit Thumbnail" />';
2665
  edit_slide_by = ' <a href="' + uploader_href_for_add_slide + '" class="wds_change_thumbnail thickbox thickbox-preview" title="Add/Edit Image" onclick="return false;"></a>';
2666
+ img_layer_upload_by = ' <a href="' + (fv ? uploader_href_for_add_layer : "") + '" class="' + (" wds_free_button") + ' action_buttons add_image_layer button-small" title="Add Image Layer" onclick="' + ("alert('This functionality is disabled in free version.')") + '; return false;">Add Image Layer</a>';
2667
  }
2668
  else {
2669
  slide_upload_by = ' <input id="button_image_url' + slideID + '" class="action_buttons edit_slide" type="button" value="Add/Edit Image" onclick="spider_media_uploader(\'' + slideID + '\', event); return false;" />';
2670
  edit_slide_by = ' <span class="wds_change_thumbnail" type="button" value="Add/Edit Image" onclick="spider_media_uploader(\'' + slideID + '\', event); return false;" ></span>';
2671
  update_thumb_by = ' <input type="button" class="action_buttons edit_thumb wds_free_button" id="button_image_url' + slideID + '" onclick="alert(\'This functionality is disabled in free version.\'); return false;" value="Edit Thumbnail" />';
2672
+ img_layer_upload_by = ' <input class="action_buttons add_image_layer ' + (" wds_free_button") + ' button-small" type="button" value="Add Image Layer" onclick="' + ("alert('This functionality is disabled in free version.')") + '; return false;" />';
2673
  }
2674
  jQuery("#slide_ids_string").val(jQuery("#slide_ids_string").val() + slideID + ',');
2675
  jQuery(".wds_slides_box *").removeClass("wds_sub_active");
2724
  '<input id="target_attr_slide' + slideID + '" type="checkbox" name="target_attr_slide' + slideID + '" value="1" checked="checked" /><label for="target_attr_slide' + slideID + '"> Open in a new window</label>' +
2725
  '</td>' +
2726
  '</tr></table></td></tr><tr class="bgcolor"><td colspan="4">' +
2727
+ '<div class="layer_add_buttons_wrap"><input class="action_buttons add_text_layer ' + (!fv ? "" : " wds_free_button") + ' button-small" type="button" value="Add Text Layer" onclick="' + (!fv ? "wds_add_layer(\'text\', \'" + slideID + "\')" : "alert('This functionality is disabled in free version.')") + '; return false;">' +
2728
  img_layer_upload_by +
2729
  '</div><div class="layer_add_buttons_wrap"><input class="action_buttons add_video_layer button-small wds_free_button" type="button" onclick="alert(\'This functionality is disabled in free version.\'); return false;" value="Add Video Layer" />' +
2730
  '</div><div class="layer_add_buttons_wrap"><input class="action_buttons add_embed_layer button-small wds_free_button" type="button" value="Embed Media Layer" onclick="alert(\'This functionality is disabled in free version.\'); return false;" />' +
licensing/licensing.php CHANGED
@@ -80,15 +80,6 @@
80
  <span class="yes"></span>
81
  </div>
82
  </div>
83
- <div class="wds_pro_container">
84
- <a class="wds_pro_link wds_pro_text" target="_blank" href="https://web-dorado.com/files/fromslider.php">
85
- <?php
86
- $text = strtoupper(__('Upgrade to paid version', 'wds'));
87
- ?>
88
- <span><?php echo $text; ?></span>
89
- <img class="wds_pro_image" alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo WD_S_URL . '/images/wd_logo.png?v2'; ?>"" />
90
- </a>
91
- </div>
92
  <div style="float: left; clear: both;">
93
  <p>After purchasing the commercial version follow these steps:</p>
94
  <ol>
80
  <span class="yes"></span>
81
  </div>
82
  </div>
 
 
 
 
 
 
 
 
 
83
  <div style="float: left; clear: both;">
84
  <p>After purchasing the commercial version follow these steps:</p>
85
  <ol>
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Slider by WD – Responsive Slider for WordPress ===
2
  Contributors: webdorado
3
  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, video slider, youtube slider,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 slideshow, javascript slider, javascript slideshow, jquery slider, jquery slideshow, posts slider, responsive slideshow, sidebar, slide, slide show, slider, slider widget, slides, slideshow manager, slideshow plugin, vertical slider, video slideshow,vimeo slideshow, vimeo slider, widget slider, widget slideshow, wordpress slideshow, wp slider, youtube slideshow, 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.7
7
  Stable tag: 1.1.77
@@ -129,6 +129,9 @@ After downloading the ZIP file of the slider plugin,
129
 
130
  == Changelog ==
131
 
 
 
 
132
  = 1.1.76 =
133
  * Added: Support forum link.
134
 
@@ -754,7 +757,7 @@ There are three types of layers that can be added to the slides: text, image and
754
 
755
  The layer buttons are located on the lower left corner of each slide.
756
 
757
- You can add more than one layer to your content slideshow. These layers can be of different or same type.
758
 
759
  3.1 Add Text Layer. You can add custom text to be set as layer over the specific slide. This is specifically handy when it comes to testimonial slider or carousel slider options.
760
 
@@ -782,8 +785,9 @@ Shadow. Get a shadow for the text layer using CSS type values.
782
  Published. Choose whether to publish the layer or not.
783
 
784
 
785
- 3.2 Add Image Layer. You can add images of various dimensions to be set as layers. This is used when you plan to have photo slideshow or
786
 
 
787
  Dimensions. Set the dimensions of the image. Note that it will be best to select dimensions which correspond to the ratio of the original image, so that the image will not be distorted.
788
  Scale. By checking the box the image will be automatically scaled taking the provided width and keeping the original ratio of the image.
789
  Alt. Set the HTML attribute specified in the IMG tag to provide alternate text when an image on a Web page cannot be displayed.
@@ -821,7 +825,7 @@ Duration- Define the duration of the effect in ms.
821
  Color. Set the color for the social sharing button.
822
  Hover color. Set the color for the social sharing button when hovered.
823
 
824
- 3.4 Add Video Layer. You can add YouTube or Vimeo videos as video layers for the slider. To do so, it is required to provide the link to the video and press Add button.
825
  Dimensions. Set the dimensions of the video layer thumbnail image with be used in slider. The thumbnail will appear with a default dimension, which can be further altered.
826
  Position. Provide the values of x and y axis to position the video thumbnail. In addition you can drag and drop the layer to a desired position.
827
  Effect in. Apply an effect which will be used when the video layer appears over the slider.
@@ -880,7 +884,7 @@ Border . Select the type, size, as well as the color of border for the navigatio
880
  Border radius. Set border radius for the navigation buttons using CSS type values.
881
  Background color. Select the background color for the navigation buttons using the color picker. In addition you can set the transparency level of the background for the slider.
882
 
883
- 4.3 Bullets. In addition to navigation buttons, you can also use bullets for the navigation within the slider images. Upon hitting the bullet the slider image in the corresponding position will be displayed.
884
 
885
  Enable bullets. Choose whether to have slider naviagation bullets or not.
886
  Position. Select the position for the slider navigation bullets.
@@ -890,17 +894,17 @@ Color. Select the color for the navigation bullets.
890
  Active color. Select the color for the bullet, which is currently displaying a corresponding slider image.
891
  Margin. Set the margin for the navigation bullets in pixels.
892
 
893
- 4.4 Filmstrip. You can add a filmstrip for the slider images.This way the entire list of the slider images will be displayed and the user can navigate immidiately to the desired slider image.
894
 
895
  Enable filmstrip. Choose whether to have thumbnails of the slides displayed as a filmstrip or not.
896
- Position. Set the position of the filmstrip between 4 possible options.
897
  Thumbnail dimensions. Define the dimensions of the filmstrip thumbnails.
898
  Background color. Select the background color for the filmstrip.
899
  Thumbnail margin. Set the margin for the thumbnails in pixels.
900
  Active border. The thumbnail for the currently displayed image will have a border. You can set its size, type and color.
901
  Deactive transparency. You can set a transparency level for the inactive filmstrip items.
902
 
903
- 4.5 Timer Bar. You can add a bar displaying the timing left to switching to the next slide. This is commonly used when using autoplay for the slider.
904
 
905
  Enable timer bar. Choose whether to display a timer bar over the slider images or not.
906
  Type. Choose the type of the timer bar to be used within the slider.
@@ -911,10 +915,10 @@ Color. Select the color and the transparency level of the timer bar.
911
 
912
  Please note that the Fill and Contain options of the slider will work fine with Watermark option regardless of the slider image dimensions, whereas for the Cover option you should have the slider image identical to the size set in the Dimensions setting. If you have uploaded the image with another dimension, you will need to resize the image and upload it again.
913
 
914
- Watermark Type. Choose what kind of watermark you want to use with the slider from provided 2 options (text, image) or not to use watermarks over your slides.
915
  Text
916
- * Watermark text. Provide the text which will be displayed over the slides.
917
- * Watermark font size. Specify the font size of the watermark in pixels.
918
  * Watermark font style. Specify the font family for the watermark text.
919
  * Watermark color. Select the watermark text font color, as well as the watermark transparency using CSS type values.
920
  * Watermark position. Choose the positioning of the watermark from the available 9 options.
@@ -923,7 +927,10 @@ Image
923
  * Watermark image size. Define the size (in percentage for the responsive look) of the image used for the watermark.
924
  * Watermark position. Choose the positioning of the watermark from the available 9 options.
925
 
926
- 4.7 CSS. You can add custom CSS in the box below to apply custom changes to the slider. The changes will override the original styles coming as default with the slider.
 
 
 
927
 
928
  Step 5: Publishing the created Slider.
929
  To insert the Slider into a Page or a Post:
@@ -932,21 +939,21 @@ You can insert the created Slider into a page or post. Go to the mentioned Post
932
 
933
  In addition, you can insert the shortcode of the slider manually. The corresponding shortcode is displayed next to the created slider in Slider WD>Sliders section under Shortcode column.
934
 
935
- To insert the Slider within the Theme.
936
 
937
- You can insert the created Slider into the theme calling it with PHP function. This feature is commonly used for adding the code to header.php for displaying the slider within the header position of the website. You can find the function located in Slider WD>Sliders section under PHP function column.
938
 
939
  To insert the Slider as a widget.
940
 
941
- Go to Appearance>Widgets>Slider. Select a position for the slider widget and press Save button. Then provide the title for the slider and select the corresponding slider using the drop-down list.
942
 
943
  4.7 Carousel Slider.
944
- You can display the slider images in a carousel view, which displays a larger image within the center and descending size images before and after the main image.
945
  Carousel. Choose whether to use carousel display of slider or not.
946
- Number of images for slider carousel. Define the number of visible images whenever using carousel display.
947
  Carousel image ratio. Define the proportions between the main image and images preceding and following the main image on the slider.
948
  Container fit. If you activate the option the distance between the images will be identical so that the images fill the container, otherwise the distance between the images will depend on the ratio.
949
- Fixed Width. Define the maximum width of the slider display.
950
 
951
 
952
  = Step 5: Publishing the created Slider. =
@@ -954,18 +961,18 @@ To insert the Slider into a Page or a Post:
954
  You can insert the created Slider into a page or post. Go to the Post or Page. Here you will see “Insert Slider” button with a Slider icon. Press the button, Select the slider and press Insert.
955
  In addition, you can insert the shortcode manually. The corresponding shortcode is displayed next to the created slider in Slider WD>Sliders section under Shortcode column.
956
  To insert the Slider within the Theme.
957
- You can insert the created Slider into the theme calling it with PHP function. This feature is commonly used for adding the code to header.php for displaying the slider within the header position of the website. You can find the function located in Slider WD>Sliders section under PHP function column.
958
  To insert the Slider as a widget.
959
- Go to Appearance>Widgets>Slider. Select a position for the slider widget and press Save button. Then provide the title for the slider and select the corresponding slider using the drop-down list.
960
 
961
  = Step 6: Importing/Exporting Sliders. =
962
  If you plan to move the sliders from one site to another you can use this feature. Make sure that you have installed the Slider WD to the destination site.
963
 
964
  Exporting Slider
965
- Select the Slider you want to export using the checkbox and press Export slider button. You can choose whether to transfer the slider with images and settings, or only the settings adding your own slides afterwards.
966
 
967
  Importing Slider
968
- Select the file to import and press Import button. The slider will be added automatically.
969
 
970
  Try demo sliders
971
  [DOWNLOAD LAYER SLIDER](http://wpdemo.web-dorado.com/layer-slider)
1
  === Slider by WD – Responsive Slider for WordPress ===
2
  Contributors: webdorado
3
  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.7
7
  Stable tag: 1.1.77
129
 
130
  == Changelog ==
131
 
132
+ = 1.1.77 =
133
+ Added: Minimum font size for text layers
134
+
135
  = 1.1.76 =
136
  * Added: Support forum link.
137
 
757
 
758
  The layer buttons are located on the lower left corner of each slide.
759
 
760
+ You can add more than one layer to your content slideshow. These layers can be of different or same type. You can uses flexslider, cycleslider,css3slider all features, create social slider with social layers, add 3D effect to get Image Rotator or text rotate effects. Rotator feature will be no less interesting wit parallax slider (coinslider/flexslider) or vertical slides.
761
 
762
  3.1 Add Text Layer. You can add custom text to be set as layer over the specific slide. This is specifically handy when it comes to testimonial slider or carousel slider options.
763
 
785
  Published. Choose whether to publish the layer or not.
786
 
787
 
788
+ 3.2 Add Image Layer. You can add images of various dimensions to be set as layers. This is used when you plan to have photo slideshow, gallery, photo gallery or banner slider options.
789
 
790
+
791
  Dimensions. Set the dimensions of the image. Note that it will be best to select dimensions which correspond to the ratio of the original image, so that the image will not be distorted.
792
  Scale. By checking the box the image will be automatically scaled taking the provided width and keeping the original ratio of the image.
793
  Alt. Set the HTML attribute specified in the IMG tag to provide alternate text when an image on a Web page cannot be displayed.
825
  Color. Set the color for the social sharing button.
826
  Hover color. Set the color for the social sharing button when hovered.
827
 
828
+ 3.4 Add Video Layer. You can add YouTube or Vimeo videos as video layers to created wordpress picture slider files. To do so, it is required to provide the link to the video and press Add button.
829
  Dimensions. Set the dimensions of the video layer thumbnail image with be used in slider. The thumbnail will appear with a default dimension, which can be further altered.
830
  Position. Provide the values of x and y axis to position the video thumbnail. In addition you can drag and drop the layer to a desired position.
831
  Effect in. Apply an effect which will be used when the video layer appears over the slider.
884
  Border radius. Set border radius for the navigation buttons using CSS type values.
885
  Background color. Select the background color for the navigation buttons using the color picker. In addition you can set the transparency level of the background for the slider.
886
 
887
+ 4.3 Bullets. In addition to navigation buttons, you can also use bullets for the navigation within the slider images most likely used for the slideshow display of the slider. Upon hitting the bullet the slider image will be shifted to the next image in the slide show in the corresponding position. This turns the best slider plugin into slideshow manager. Slideshow plugin currently also uses lightbox option to display jquery slideshows in pop-up. This turns this revolutions slider into a great choice among wordpress slideshow, javascript slideshow and jquery slider options available in the market.
888
 
889
  Enable bullets. Choose whether to have slider naviagation bullets or not.
890
  Position. Select the position for the slider navigation bullets.
894
  Active color. Select the color for the bullet, which is currently displaying a corresponding slider image.
895
  Margin. Set the margin for the navigation bullets in pixels.
896
 
897
+ 4.4 Filmstrip. You can add a filmstrip for this wordpress responsive slider images.This way the entire list of the slider images will be displayed and the user can navigate immidiately to the desired slider image. Note that in case of fullscreen slider and 3D slider options this will turn into more of thumbnail slider, since the image icons will be smaller.
898
 
899
  Enable filmstrip. Choose whether to have thumbnails of the slides displayed as a filmstrip or not.
900
+ Position. Set the position of the filmstrip between 4 possible slides options.
901
  Thumbnail dimensions. Define the dimensions of the filmstrip thumbnails.
902
  Background color. Select the background color for the filmstrip.
903
  Thumbnail margin. Set the margin for the thumbnails in pixels.
904
  Active border. The thumbnail for the currently displayed image will have a border. You can set its size, type and color.
905
  Deactive transparency. You can set a transparency level for the inactive filmstrip items.
906
 
907
+ 4.5 Timer Bar. You can add a bar displaying the timing sidebar left to switching to the next slide. This is commonly used when using autoplay for the slider, plus it kind of adds animation to product slider or posts slider (to get featured-content-slider) which are lacking active data. When the user presses next button the autoplay is being automatically disabled and auto change is being continued with the next slide.
908
 
909
  Enable timer bar. Choose whether to display a timer bar over the slider images or not.
910
  Type. Choose the type of the timer bar to be used within the slider.
915
 
916
  Please note that the Fill and Contain options of the slider will work fine with Watermark option regardless of the slider image dimensions, whereas for the Cover option you should have the slider image identical to the size set in the Dimensions setting. If you have uploaded the image with another dimension, you will need to resize the image and upload it again.
917
 
918
+ Watermark Type. Choose what kind of watermark you want to use with the slider from provided 2 options (text, image) or not to use watermarks over your slides. This is an alternative option for creating a copyright layer slider. Watermark layers allow keeping up the author rides for the images and any content filled in you responsive image slider.
919
  Text
920
+ * Watermark text. Provide the text which will be displayed over the coin slider slides.
921
+ * Watermark font size. Specify the font size of the watermark in pixels for the text slider.
922
  * Watermark font style. Specify the font family for the watermark text.
923
  * Watermark color. Select the watermark text font color, as well as the watermark transparency using CSS type values.
924
  * Watermark position. Choose the positioning of the watermark from the available 9 options.
927
  * Watermark image size. Define the size (in percentage for the responsive look) of the image used for the watermark.
928
  * Watermark position. Choose the positioning of the watermark from the available 9 options.
929
 
930
+ 4.7 CSS. You can add custom CSS in the box below to apply custom changes to the css3 slider. The changes will override the original styles coming as default with the slider.
931
+
932
+ Note that you should consider the fact that this is only applicable for content slideshow and jquery slideshow, custom video slider options such as youtube slider and vimeo slider cannot be used for this, since it is a video slider integration, we do not copy any content from external sources. Free video slider and free video slideshow options are also not included. Those come with pro version only.
933
+
934
 
935
  Step 5: Publishing the created Slider.
936
  To insert the Slider into a Page or a Post:
939
 
940
  In addition, you can insert the shortcode of the slider manually. The corresponding shortcode is displayed next to the created slider in Slider WD>Sliders section under Shortcode column.
941
 
942
+ To insert the Javascriipt Slider within the Theme.
943
 
944
+ You can insert the created image slideshow Slider into the theme calling it with PHP function. This feature is commonly used for adding the javascript slider code to header.php for displaying the slider within the header position of the website. You can find the function located in Slider WD>Sliders section under PHP function column.
945
 
946
  To insert the Slider as a widget.
947
 
948
+ Go to Appearance>Widgets>Slider. Select a position for the slider widget and press Save button. Then provide the title for the slider and select the corresponding slider using the drop-down list. The widget slider is ready to go. Note that youtube slideshow, vimeo slideshow and overall video slideshow are also supported with widget slideshow.
949
 
950
  4.7 Carousel Slider.
951
+ You can display the wp slider images in a carousel view, which displays a larger image within the center and descending size carousel images before and after the main image.
952
  Carousel. Choose whether to use carousel display of slider or not.
953
+ Number of images for slider carousel. Define the number of visible images whenever using carousel slider.
954
  Carousel image ratio. Define the proportions between the main image and images preceding and following the main image on the slider.
955
  Container fit. If you activate the option the distance between the images will be identical so that the images fill the container, otherwise the distance between the images will depend on the ratio.
956
+ Fixed Width. Define the maximum width of the slider display. Not that this feature is supported only for cases if you do not want to have fullwidth slider. Note that this is great when you have horizontal slider or vertical slider options.
957
 
958
 
959
  = Step 5: Publishing the created Slider. =
961
  You can insert the created Slider into a page or post. Go to the Post or Page. Here you will see “Insert Slider” button with a Slider icon. Press the button, Select the slider and press Insert.
962
  In addition, you can insert the shortcode manually. The corresponding shortcode is displayed next to the created slider in Slider WD>Sliders section under Shortcode column.
963
  To insert the Slider within the Theme.
964
+ You can insert the created jquery slider into the theme calling it with PHP function. This feature is commonly used for adding the javascript code to header.php for displaying the slider within the header position of the website. You can find the function located in Slider WD>Sliders section under PHP function column.
965
  To insert the Slider as a widget.
966
+ Go to Appearance>Widgets>Slider. Select a position for the slider widget and press Save button. Then provide the title for the slider and select the corresponding slider using the drop-down list. Note that as a result you wil get fully responsive image slider with responsive pictures and swipe opportunity for mobile slider (touch slider). Thus there is no difference if you choose to add it as a page shortcode of widget.
967
 
968
  = Step 6: Importing/Exporting Sliders. =
969
  If you plan to move the sliders from one site to another you can use this feature. Make sure that you have installed the Slider WD to the destination site.
970
 
971
  Exporting Slider
972
+ Select the Slider you want to export using the checkbox and press Export slider button. You can choose whether to transfer the slider with pictures and settings, or only the settings of the picture slider adding your own slides afterwards.
973
 
974
  Importing Slider
975
+ Select the file of the content slider/ image slider to import and press Import button. The slider will be added automatically.
976
 
977
  Try demo sliders
978
  [DOWNLOAD LAYER SLIDER](http://wpdemo.web-dorado.com/layer-slider)
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.75
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.75');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -156,6 +156,7 @@ function wds_shortcode($params) {
156
  }
157
  else {
158
  return str_replace(array("\r\n", "\n", "\r"), '', ob_get_clean());
 
159
  }
160
  }
161
  add_shortcode('wds', 'wds_shortcode');
@@ -586,11 +587,6 @@ function wds_language_load() {
586
  }
587
  add_action('init', 'wds_language_load');
588
 
589
- if (is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX)) {
590
- include_once(WD_S_DIR . '/sliders-notices.php');
591
- new WDS_Notices();
592
- }
593
-
594
  function wds_get_sliders() {
595
  global $wpdb;
596
  $results = $wpdb->get_results("SELECT `id`,`name` FROM `" . $wpdb->prefix . "wdsslider`", OBJECT_K);
@@ -688,4 +684,116 @@ function wds_overview() {
688
  dorado_web_init($wds_options);
689
  }
690
  }
691
- add_action('init', 'wds_overview');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.77
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.77');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
156
  }
157
  else {
158
  return str_replace(array("\r\n", "\n", "\r"), '', ob_get_clean());
159
+ // return ob_get_clean();
160
  }
161
  }
162
  add_shortcode('wds', 'wds_shortcode');
587
  }
588
  add_action('init', 'wds_language_load');
589
 
 
 
 
 
 
590
  function wds_get_sliders() {
591
  global $wpdb;
592
  $results = $wpdb->get_results("SELECT `id`,`name` FROM `" . $wpdb->prefix . "wdsslider`", OBJECT_K);
684
  dorado_web_init($wds_options);
685
  }
686
  }
687
+ add_action('init', 'wds_overview');
688
+
689
+ function wds_topic() {
690
+ $page = isset($_GET['page']) ? $_GET['page'] : '';
691
+ $user_guide_link = 'https://web-dorado.com/wordpress-slider-wd/';
692
+ $support_forum_link = 'https://wordpress.org/support/plugin/slider-wd';
693
+ $pro_link = 'https://web-dorado.com/files/fromslider.php';
694
+ $support_icon = WD_S_URL . '/images/support.png';
695
+ $prefix = 'wds';
696
+ $is_free = TRUE;
697
+ switch ($page) {
698
+ case 'sliders_wds': {
699
+ $help_text = 'create, edit and delete sliders';
700
+ $user_guide_link .= 'adding-images.html';
701
+ break;
702
+ }
703
+ case 'goptions_wds': {
704
+ $help_text = 'edit global options for sliders';
705
+ $user_guide_link .= 'adding-images.html';
706
+ break;
707
+ }
708
+ case 'licensing_wds': {
709
+ $help_text = '';
710
+ $user_guide_link .= 'adding-images.html';
711
+ break;
712
+ }
713
+ default: {
714
+ return '';
715
+ break;
716
+ }
717
+ }
718
+ ob_start();
719
+ ?>
720
+ <style>
721
+ .wd_topic {
722
+ background-color: #ffffff;
723
+ border: none;
724
+ box-sizing: border-box;
725
+ clear: both;
726
+ color: #6e7990;
727
+ font-size: 14px;
728
+ font-weight: bold;
729
+ line-height: 30px;
730
+ padding: 10px 15px;
731
+ vertical-align: middle;
732
+ width: 98%;
733
+ }
734
+ .wd_topic .wd_help_topic {
735
+ float: left;
736
+ }
737
+ .wd_topic .wd_help_topic a {
738
+ color: #0073aa;
739
+ }
740
+ .wd_topic .wd_help_topic a:hover {
741
+ color: #00A0D2;
742
+ }
743
+ .wd_topic .wd_support {
744
+ float: right;
745
+ margin: 0 10px;
746
+ }
747
+ .wd_topic .wd_support img {
748
+ vertical-align: middle;
749
+ }
750
+ .wd_topic .wd_support a {
751
+ text-decoration: none;
752
+ color: #6E7990;
753
+ }
754
+ .wd_topic .wd_pro {
755
+ float: right;
756
+ background-color: #45A6B7;
757
+ padding: 0 10px;
758
+ }
759
+ .wd_topic .wd_pro a {
760
+ border: none;
761
+ box-shadow: none !important;
762
+ color: #FFFFFF;
763
+ text-decoration: none;
764
+ }
765
+ </style>
766
+ <div class="update-nag wd_topic">
767
+ <?php
768
+ if ($help_text) {
769
+ ?>
770
+ <span class="wd_help_topic">
771
+ <?php echo sprintf(__('This section allows you to %s.', $prefix), $help_text); ?>
772
+ <a target="_blank" href="<?php echo $user_guide_link; ?>">
773
+ <?php _e('Read More in User Manual', $prefix); ?>
774
+ </a>
775
+ </span>
776
+ <?php
777
+ }
778
+ if ($is_free) {
779
+ $text = strtoupper(__('Upgrade to paid version', $prefix));
780
+ ?>
781
+ <span class="wd_pro">
782
+ <a target="_blank" href="<?php echo $pro_link; ?>">
783
+ <span><?php echo $text; ?></span>
784
+ </a>
785
+ </span>
786
+ <?php
787
+ }
788
+ ?>
789
+ <span class="wd_support">
790
+ <a target="_blank" href="<?php echo $support_forum_link; ?>">
791
+ <img src="<?php echo $support_icon; ?>" />
792
+ <?php _e('Support Forum', $prefix); ?>
793
+ </a>
794
+ </span>
795
+ </div>
796
+ <?php
797
+ echo ob_get_clean();
798
+ }
799
+ add_action('admin_notices', 'wds_topic', 11);
sliders-insert.php CHANGED
@@ -197,6 +197,7 @@ function wds_insert() {
197
  `static_layer` tinyint(1) NOT NULL,
198
  `infinite_in` int(4) NOT NULL,
199
  `infinite_out` int(4) NOT NULL,
 
200
  PRIMARY KEY (`id`)
201
  ) DEFAULT CHARSET=utf8;";
202
  $wpdb->query($wdslayer);
197
  `static_layer` tinyint(1) NOT NULL,
198
  `infinite_in` int(4) NOT NULL,
199
  `infinite_out` int(4) NOT NULL,
200
+ `min_size` int(4) NOT NULL,
201
  PRIMARY KEY (`id`)
202
  ) DEFAULT CHARSET=utf8;";
203
  $wpdb->query($wdslayer);
sliders-notices.php DELETED
@@ -1,234 +0,0 @@
1
- <?php
2
- if (!defined('ABSPATH')) {
3
- exit;
4
- }
5
-
6
- class WDS_Notices {
7
- protected $prefix = 'wds';
8
- protected $plugin_url = WD_S_URL;
9
- protected $plugin_version = "wds_version";
10
- protected $plugin_name = 'Slider WD';
11
- protected $promo_link = 'https://web-dorado.com/products/wordpress-slider-plugin.html?source=promo';
12
-
13
- public $notice_spam = 0;
14
- public $notice_spam_max = 1;
15
-
16
- // Basic actions to run
17
- public function __construct() {
18
- // Runs the admin notice ignore function incase a dismiss button has been clicked
19
- add_action('admin_init', array($this, 'admin_notice_ignore'));
20
- // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
21
- add_action('admin_init', array($this, 'admin_notice_temp_ignore'));
22
- add_action('admin_notices', array($this, 'wd_admin_notices'));
23
- }
24
-
25
- // Checks to ensure notices aren't disabled and the user has the correct permissions.
26
- public function wd_admin_notice() {
27
- $settings = get_option($this->prefix . '_admin_notice');
28
- if (!isset($settings['disable_admin_notices']) || (isset($settings['disable_admin_notices']) && $settings['disable_admin_notices'] == 0)) {
29
- if (current_user_can('manage_options')) {
30
- return true;
31
- }
32
- }
33
- return false;
34
- }
35
-
36
- // Primary notice function that can be called from an outside function sending necessary variables
37
- public function admin_notice($admin_notices) {
38
- // Check options
39
- if (!$this->wd_admin_notice()) {
40
- return false;
41
- }
42
- foreach ($admin_notices as $slug => $admin_notice) {
43
- // Call for spam protection
44
- if ($this->anti_notice_spam()) {
45
- return false;
46
- }
47
-
48
- // Check for proper page to display on
49
- if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
50
- if (!$this->admin_notice_pages($admin_notices[$slug]['pages'])) {
51
- return false;
52
- }
53
- }
54
-
55
- // Check for required fields
56
- if (!$this->required_fields($admin_notices[$slug])) {
57
- // Get the current date then set start date to either passed value or current date value and add interval
58
- $current_date = current_time("n/j/Y");
59
- $start = (isset($admin_notices[$slug]['start']) ? $admin_notices[$slug]['start'] : $current_date);
60
- $start = date("n/j/Y", strtotime($start));
61
- $end = (isset($admin_notices[$slug]['end']) ? $admin_notices[$slug]['end'] : $start);
62
- $end = date("n/j/Y", strtotime($end));
63
- $date_array = explode('/', $start);
64
- $interval = (isset($admin_notices[$slug]['int']) ? $admin_notices[$slug]['int'] : 0);
65
- $date_array[1] += $interval;
66
- $start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
67
-
68
- // This is the main notices storage option
69
- $admin_notices_option = get_option($this->prefix . '_admin_notice', array());
70
- // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
71
- if (!array_key_exists( $slug, $admin_notices_option)) {
72
- $admin_notices_option[$slug]['start'] = $start;
73
- $admin_notices_option[$slug]['int'] = $interval;
74
- update_option($this->prefix . '_admin_notice', $admin_notices_option);
75
- }
76
-
77
- // Sanity check to ensure we have accurate information
78
- // New date information will not overwrite old date information
79
- $admin_display_check = (isset($admin_notices_option[$slug]['dismissed']) ? $admin_notices_option[$slug]['dismissed'] : 0);
80
- $admin_display_start = (isset($admin_notices_option[$slug]['start']) ? $admin_notices_option[$slug]['start'] : $start);
81
- $admin_display_interval = (isset($admin_notices_option[$slug]['int']) ? $admin_notices_option[$slug]['int'] : $interval);
82
- $admin_display_msg = (isset($admin_notices[$slug]['msg']) ? $admin_notices[$slug]['msg'] : '');
83
- $admin_display_title = (isset($admin_notices[$slug]['title']) ? $admin_notices[$slug]['title'] : '');
84
- $admin_display_link = (isset($admin_notices[$slug]['link']) ? $admin_notices[$slug]['link'] : '');
85
- $output_css = FALSE;
86
- // Ensure the notice hasn't been hidden and that the current date is after the start date
87
- if ($admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date)) {
88
- // Get remaining query string
89
- $query_str = (isset($admin_notices[$slug]['later_link']) ? $admin_notices[$slug]['later_link'] : esc_url(add_query_arg($this->prefix . '_admin_notice_ignore', $slug)));
90
- if (strpos($slug, 'promo') === FALSE) {
91
- // Admin notice display output
92
- echo '<div class="update-nag wd-admin-notice">
93
- <div class="' . $this->prefix . '-notice-logo"></div>
94
- <p class="wd-notice-title">' . $admin_display_title . '</p>
95
- <p class="wd-notice-body">' . $admin_display_msg . '</p>
96
- <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
97
- <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
98
- </div>';
99
- }
100
- else {
101
- if (strtotime($end) >= strtotime($current_date)) {
102
- echo '<div class="admin-notice-promo">';
103
- echo $admin_display_msg;
104
- echo '<ul class="notice-body-promo blue">
105
- ' . $admin_display_link . '
106
- </ul>';
107
- echo '<a href="' . $query_str . '" class="dashicons dashicons-dismiss close-promo"></a>';
108
- echo '</div>';
109
- }
110
- }
111
- $this->notice_spam += 1;
112
- $output_css = true;
113
- }
114
- if ($output_css) {
115
- wp_enqueue_style($this->prefix . '-admin-notices', $this->plugin_url . '/css/notices.css', array(), get_option($this->plugin_version));
116
- }
117
- }
118
- }
119
- }
120
-
121
- // Spam protection check
122
- public function anti_notice_spam() {
123
- if ($this->notice_spam >= $this->notice_spam_max) {
124
- return true;
125
- }
126
- return false;
127
- }
128
-
129
- // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
130
- public function admin_notice_ignore() {
131
- // If user clicks to ignore the notice, update the option to not show it again
132
- if (isset($_GET[$this->prefix . '_admin_notice_ignore'])) {
133
- $admin_notices_option = get_option($this->prefix . '_admin_notice', array());
134
- $admin_notices_option[$_GET[$this->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
135
- update_option($this->prefix . '_admin_notice', $admin_notices_option);
136
- $query_str = remove_query_arg($this->prefix . '_admin_notice_ignore');
137
- wp_redirect($query_str);
138
- exit;
139
- }
140
- }
141
-
142
- // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
143
- public function admin_notice_temp_ignore() {
144
- // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
145
- if (isset($_GET[$this->prefix . '_admin_notice_temp_ignore'])) {
146
- $admin_notices_option = get_option($this->prefix . '_admin_notice', array());
147
- $current_date = current_time("n/j/Y");
148
- $date_array = explode('/', $current_date);
149
- $interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
150
- $date_array[1] += $interval;
151
- $new_start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
152
-
153
- $admin_notices_option[$_GET[$this->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
154
- $admin_notices_option[$_GET[$this->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
155
- update_option($this->prefix . '_admin_notice', $admin_notices_option);
156
- $query_str = remove_query_arg(array($this->prefix . '_admin_notice_temp_ignore', 'wd_int'));
157
- wp_redirect( $query_str );
158
- exit;
159
- }
160
- }
161
-
162
- public function admin_notice_pages($pages) {
163
- foreach ($pages as $key => $page) {
164
- if (is_array($page)) {
165
- if (isset($_GET['page']) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1]) {
166
- return true;
167
- }
168
- }
169
- else {
170
- if ($page == 'all') {
171
- return true;
172
- }
173
- if (get_current_screen()->id === $page) {
174
- return true;
175
- }
176
- if (isset($_GET['page']) && $_GET['page'] == $page) {
177
- return true;
178
- }
179
- }
180
- return false;
181
- }
182
- }
183
-
184
- // Required fields check
185
- public function required_fields( $fields ) {
186
- if (!isset( $fields['msg']) || (isset($fields['msg']) && empty($fields['msg']))) {
187
- return true;
188
- }
189
- if (!isset( $fields['title']) || (isset($fields['title']) && empty($fields['title']))) {
190
- return true;
191
- }
192
- return false;
193
- }
194
-
195
- // Special parameters function that is to be used in any extension of this class
196
- public function special_parameters($admin_notices) {
197
- // Intentionally left blank
198
- }
199
-
200
- public function wd_admin_notices() {
201
- $two_week_review_ignore = add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'two_week_review'));
202
- $two_week_review_temp = add_query_arg(array($this->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14));
203
- $one_week_support = add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'one_week_support'));
204
- $promo_close = add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'new_year_promo'));
205
- $notices['new_year_promo'] = array(
206
- 'title' => __('Hey! How\'s It Going?', $this->prefix),
207
- 'msg' => '<div class="hny" style=""><a href="' . $this->promo_link . '" target="_blank"></a></div>',
208
- 'link' => '<li><span class="dashicons dashicons-dismiss"></span><a href="' . $promo_close . '">' . __('Never show again', $this->prefix) . '</a></li>',
209
- 'start' => '2015-12-31',
210
- 'end' => '2016-01-01',
211
- 'int' => 0
212
- );
213
- $notices['two_week_review'] = array(
214
- 'title' => __('Leave A Review?', $this->prefix),
215
- 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $this->prefix), $this->plugin_name),
216
- 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/slider-wd?filter=5" target="_blank">' . __('Sure! I\'d love to!', $this->prefix) . '</a></li>
217
- <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $this->prefix) . '</a></li>
218
- <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $this->prefix) . '</a></li>
219
- <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $this->prefix) . '</a></li>',
220
- 'later_link' => $two_week_review_temp,
221
- 'int' => 14
222
- );
223
- $one_week_support = add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'one_week_support'));
224
- $notices['one_week_support'] = array(
225
- 'title' => __('Hey! How\'s It Going?', $this->prefix),
226
- 'msg' => sprintf(__('Thank you for using WordPress %s! We hope that you\'ve found everything you need, but if you have any questions:', $this->prefix), $this->plugin_name),
227
- 'link' => '<li><span class="dashicons dashicons-media-text"></span><a target="_blank" href="https://web-dorado.com/wordpress-slider-wd/installing.html">' . __('Check out User Guide', $this->prefix) . '</a></li>
228
- <li><span class="dashicons dashicons-sos"></span><a target="_blank" href="https://web-dorado.com/forum/slider-plugin.html">' . __('Get Some Help', $this->prefix) . '</a></li>
229
- <li><span class="dashicons dashicons-dismiss"></span><a href="' . $one_week_support . '">' . __('Never show again', $this->prefix) . '</a></li>',
230
- 'int' => 7
231
- );
232
- $this->admin_notice($notices);
233
- }
234
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sliders-update.php CHANGED
@@ -204,5 +204,8 @@ function wds_update($version) {
204
  $global_options = json_encode($global_options);
205
  update_option('wds_global_options', $global_options);
206
  }
 
 
 
207
  return;
208
  }
204
  $global_options = json_encode($global_options);
205
  update_option('wds_global_options', $global_options);
206
  }
207
+ if (version_compare($version, '1.1.77') == -1) {
208
+ $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `min_size` int(4) NOT NULL DEFAULT 0");
209
+ }
210
  return;
211
  }