Slider by WD – Responsive Slider - Version 1.2.17

Version Description

  • Fixed: Bug on restarting slider.
  • Fixed: Smart crop functionality.
  • Updated: Free users library.
Download this release

Release Info

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

Code changes from version 1.2.16 to 1.2.17

admin/controllers/WDSControllerUninstall_wds.php CHANGED
@@ -5,7 +5,7 @@ class WDSControllerUninstall_wds {
5
  if ( WDS()->is_free ) {
6
  global $wds_options;
7
  if ( !class_exists("TenWebLibConfig") ) {
8
- $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.0', 'path' => WDS()->plugin_dir));
9
  include_once($plugin_dir['path'] . "/wd/config.php");
10
  }
11
  $config = new TenWebLibConfig();
5
  if ( WDS()->is_free ) {
6
  global $wds_options;
7
  if ( !class_exists("TenWebLibConfig") ) {
8
+ $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.1', 'path' => WDS()->plugin_dir));
9
  include_once($plugin_dir['path'] . "/wd/config.php");
10
  }
11
  $config = new TenWebLibConfig();
admin/views/Sliders.php CHANGED
@@ -361,7 +361,7 @@ class SlidersView_wds extends AdminView_bwg {
361
  <label <?php echo (($row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop1"><?php _e('Yes', WDS()->prefix); ?></label>
362
  <input onClick="wds_enable_disable('none', 'tr_crop_pos', 'smart_crop0')" type="radio" id="smart_crop0" name="smart_crop" <?php echo (($row->smart_crop) ? '' : 'checked="checked"'); ?> value="0" />
363
  <label <?php echo ((!$row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop0"><?php _e('No', WDS()->prefix); ?></label>
364
- <p class="description"></p>
365
  </span>
366
  <span class="wd-group" id="tr_crop_pos">
367
  <label class="wd-label" for="smart_crop"><?php _e('Crop Image Position', WDS()->prefix); ?></label>
@@ -2048,9 +2048,15 @@ class SlidersView_wds extends AdminView_bwg {
2048
  height: inherit;
2049
  background-color: <?php echo WDW_S_Library::spider_hex2rgba($row->background_color, (100 - $row->background_transparent) / 100); ?>;
2050
  background-image: url("<?php echo $slide_row->type != 'image' ? ($slide_row->type == 'video' && ctype_digit($slide_row->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) : WDS()->plugin_url . '/images/no-video.png') : $slide_row->thumb_url) : $slide_row->image_url . '?date=' . date('Y-m-d H:i:s'); ?>");
2051
- <?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fill') { ?>
 
 
 
 
 
 
2052
  background-size: cover;
2053
- background-position: center center;
2054
  background-repeat: no-repeat;
2055
  <?php } ?>
2056
  <?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fit') { ?>
361
  <label <?php echo (($row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop1"><?php _e('Yes', WDS()->prefix); ?></label>
362
  <input onClick="wds_enable_disable('none', 'tr_crop_pos', 'smart_crop0')" type="radio" id="smart_crop0" name="smart_crop" <?php echo (($row->smart_crop) ? '' : 'checked="checked"'); ?> value="0" />
363
  <label <?php echo ((!$row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop0"><?php _e('No', WDS()->prefix); ?></label>
364
+ <p class="description"><?php _e('To use Smart Crop, please edit your slides and make sure Fillmode is set to Fill in Slide Options.', WDS()->prefix); ?></p>
365
  </span>
366
  <span class="wd-group" id="tr_crop_pos">
367
  <label class="wd-label" for="smart_crop"><?php _e('Crop Image Position', WDS()->prefix); ?></label>
2048
  height: inherit;
2049
  background-color: <?php echo WDW_S_Library::spider_hex2rgba($row->background_color, (100 - $row->background_transparent) / 100); ?>;
2050
  background-image: url("<?php echo $slide_row->type != 'image' ? ($slide_row->type == 'video' && ctype_digit($slide_row->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) : WDS()->plugin_url . '/images/no-video.png') : $slide_row->thumb_url) : $slide_row->image_url . '?date=' . date('Y-m-d H:i:s'); ?>");
2051
+ <?php
2052
+ if ( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fill' ) {
2053
+ $bg_pos = array('center', 'center');
2054
+ if ( $row->smart_crop ) {
2055
+ $bg_pos = explode(" ", $row->crop_image_position);
2056
+ }
2057
+ ?>
2058
  background-size: cover;
2059
+ background-position: <?php echo $bg_pos[0]; ?> <?php echo $bg_pos[1]; ?>;
2060
  background-repeat: no-repeat;
2061
  <?php } ?>
2062
  <?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fit') { ?>
admin/views/WDSViewUninstall_wds.php CHANGED
@@ -91,8 +91,8 @@ class WDSViewUninstall_wds {
91
  global $wpdb;
92
  $this->model->delete_db_tables();
93
  $prefix = $wpdb->prefix;
94
- $deactivate_url = add_query_arg(array('action' => 'deactivate', 'plugin' => WDS()->main_file . '/slider-wd.php'), admin_url('plugins.php'));
95
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WDS()->main_file . '/slider-wd.php');
96
  ?>
97
  <div id="message" class="wd_updated fade">
98
  <p><?php _e('The following Database Tables successfully deleted:', WDS()->prefix);?></p>
91
  global $wpdb;
92
  $this->model->delete_db_tables();
93
  $prefix = $wpdb->prefix;
94
+ $deactivate_url = add_query_arg(array('action' => 'deactivate', 'plugin' => WDS()->main_file), admin_url('plugins.php'));
95
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WDS()->main_file);
96
  ?>
97
  <div id="message" class="wd_updated fade">
98
  <p><?php _e('The following Database Tables successfully deleted:', WDS()->prefix);?></p>
framework/WDW_S_Library.php CHANGED
@@ -2209,11 +2209,19 @@ class WDW_S_Library {
2209
  }
2210
  ?>
2211
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> #wds_image_id_<?php echo $wds .'_'. $slide_row->id; ?> .wds_slideshow_image_<?php echo $wds; ?> {
2212
- <?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fill') { ?>
 
 
 
 
 
 
2213
  background-size: cover;
2214
- background-position: center center;
2215
  background-repeat: no-repeat;
2216
- <?php } ?>
 
 
2217
  <?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fit') { ?>
2218
  background-size: contain;
2219
  background-position: center center;
2209
  }
2210
  ?>
2211
  #wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> #wds_image_id_<?php echo $wds .'_'. $slide_row->id; ?> .wds_slideshow_image_<?php echo $wds; ?> {
2212
+ <?php
2213
+ if ( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fill') {
2214
+ $bg_pos = array('center', 'center');
2215
+ if ( $slider_row->smart_crop ) {
2216
+ $bg_pos = explode(" ", $slider_row->crop_image_position);
2217
+ }
2218
+ ?>
2219
  background-size: cover;
2220
+ background-position: <?php echo $bg_pos[0]; ?> <?php echo $bg_pos[1]; ?>;
2221
  background-repeat: no-repeat;
2222
+ <?php
2223
+ }
2224
+ ?>
2225
  <?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'fit') { ?>
2226
  background-size: contain;
2227
  background-position: center center;
js/wds.js CHANGED
@@ -1177,7 +1177,11 @@ function wds_change_fillmode_type(that, id) {
1177
  jQuery(that).addClass('selected');
1178
  jQuery('#wds_fillmode_preview-'+ id).show();
1179
  if ( title == 'fill' ) {
1180
- jQuery('.wds_box.wds_sub_active div[id^=\'wds_preview_image\']').css({ 'background-size': 'cover', 'background-position': 'center center', 'background-repeat': 'no-repeat' });
 
 
 
 
1181
  }
1182
  if ( title == 'fit' ) {
1183
  jQuery('.wds_box.wds_sub_active div[id^=\'wds_preview_image\']').css({ 'background-size': 'contain', 'background-position': 'center center', 'background-repeat': 'no-repeat' });
@@ -3436,6 +3440,10 @@ function wds_add_slide() {
3436
  '</div>';
3437
  jQuery("#slide_ids_string").val(jQuery("#slide_ids_string").val() + slideID + ',');
3438
  jQuery(".wds_slides_box *").removeClass("wds_sub_active");
 
 
 
 
3439
  jQuery(
3440
  '<div id="wds_subtab_wrap' + slideID + '" class="wds_subtab_wrap connectedSortable"><div id="wbs_subtab' + slideID + '" class="tab_link wds_sub_active" style="display:block !important; width:149px; height:140px; padding:0; margin-right: 25px;">' +
3441
  '<div class="tab_image" id="wds_tab_image' + slideID + '">' +
@@ -3533,7 +3541,7 @@ function wds_add_slide() {
3533
  '<div id="wds_preview_image' + slideID + '" class="wds_preview_image' + slideID + '" ' +
3534
  'style="background-color: ' + wds_hex_rgba(jQuery("#background_color").val(), (100 - jQuery("#background_transparent").val())) + '; ' +
3535
  'background-image: url(\'\'); ' +
3536
- 'background-position: center center; ' +
3537
  'background-repeat: no-repeat; ' +
3538
  'background-size: cover;' +
3539
  'border-width: ' + jQuery('#glb_border_width').val() + 'px; ' +
1177
  jQuery(that).addClass('selected');
1178
  jQuery('#wds_fillmode_preview-'+ id).show();
1179
  if ( title == 'fill' ) {
1180
+ var bg_pos = {0 : 'center', 1 : 'center'};
1181
+ if ( jQuery("input[name='smart_crop']:checked").val() == 1 ) {
1182
+ bg_pos = jQuery("input[name='crop_image_position']:checked").val().split(" ");
1183
+ }
1184
+ jQuery('.wds_box.wds_sub_active div[id^=\'wds_preview_image\']').css({ 'background-size': 'cover', 'background-position': bg_pos[0] + ' ' + bg_pos[1], 'background-repeat': 'no-repeat' });
1185
  }
1186
  if ( title == 'fit' ) {
1187
  jQuery('.wds_box.wds_sub_active div[id^=\'wds_preview_image\']').css({ 'background-size': 'contain', 'background-position': 'center center', 'background-repeat': 'no-repeat' });
3440
  '</div>';
3441
  jQuery("#slide_ids_string").val(jQuery("#slide_ids_string").val() + slideID + ',');
3442
  jQuery(".wds_slides_box *").removeClass("wds_sub_active");
3443
+ var bg_pos = {0 : 'center', 1 : 'center'};
3444
+ if ( jQuery("input[name='smart_crop']:checked").val() == 1 ) {
3445
+ bg_pos = jQuery("input[name='crop_image_position']:checked").val().split(" ");
3446
+ }
3447
  jQuery(
3448
  '<div id="wds_subtab_wrap' + slideID + '" class="wds_subtab_wrap connectedSortable"><div id="wbs_subtab' + slideID + '" class="tab_link wds_sub_active" style="display:block !important; width:149px; height:140px; padding:0; margin-right: 25px;">' +
3449
  '<div class="tab_image" id="wds_tab_image' + slideID + '">' +
3541
  '<div id="wds_preview_image' + slideID + '" class="wds_preview_image' + slideID + '" ' +
3542
  'style="background-color: ' + wds_hex_rgba(jQuery("#background_color").val(), (100 - jQuery("#background_transparent").val())) + '; ' +
3543
  'background-image: url(\'\'); ' +
3544
+ 'background-position: ' + bg_pos[0] + ' ' + bg_pos[1] + '; ' +
3545
  'background-repeat: no-repeat; ' +
3546
  'background-size: cover;' +
3547
  'border-width: ' + jQuery('#glb_border_width').val() + 'px; ' +
js/wds_frontend.js CHANGED
@@ -65,7 +65,7 @@ function wds_resize() {
65
  /* ready slider. */
66
  function wds_slider_ready() {
67
  jQuery(".wds_slider_cont").each(function () {
68
- wds = jQuery(this).attr("data-wds");
69
  if (wds_params[wds].current_image_url != '') {
70
  jQuery('<img />').attr("src", wds_params[wds].current_image_url).on('load', function () {
71
  jQuery(this).remove();
65
  /* ready slider. */
66
  function wds_slider_ready() {
67
  jQuery(".wds_slider_cont").each(function () {
68
+ var wds = jQuery(this).attr("data-wds");
69
  if (wds_params[wds].current_image_url != '') {
70
  jQuery('<img />').attr("src", wds_params[wds].current_image_url).on('load', function () {
71
  jQuery(this).remove();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gall
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
  Requires PHP: 5.2
7
- Stable tag: 1.2.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -442,6 +442,10 @@ The plugin takes the full width of the widget area if the **Boxed Layout** in **
442
 
443
  == Changelog ==
444
 
 
 
 
 
445
 
446
  = 1.2.16 =
447
  * Fixed: Rendering in Elementor builder.
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
  Requires PHP: 5.2
7
+ Stable tag: 1.2.17
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
442
 
443
  == Changelog ==
444
 
445
+ = 1.2.17 =
446
+ * Fixed: Bug on restarting slider.
447
+ * Fixed: Smart crop functionality.
448
+ * Updated: Free users library.
449
 
450
  = 1.2.16 =
451
  * Fixed: Rendering in Elementor builder.
slider-wd.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Slider by 10Web
4
  * Plugin URI: https://10web.io/plugins/wordpress-slider/
5
  * 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.
6
- * Version: 1.2.16
7
  * Author: 10Web
8
  * Author URI: https://10web.io/pricing/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -78,8 +78,8 @@ final class WDS {
78
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
79
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
80
  $this->main_file = plugin_basename(__FILE__);
81
- $this->plugin_version = '1.2.16';
82
- $this->db_version = '1.2.16';
83
  $this->prefix = 'wds';
84
  $this->nicename = __('Slider', $this->prefix);
85
  $this->use_home_url();
@@ -534,7 +534,6 @@ final class WDS {
534
  $url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
535
  wp_enqueue_style('wds_googlefonts_' . $i, $url, null, null);
536
  }
537
- wp_enqueue_style('wds_deactivate-css', $this->plugin_url . '/wd/assets/css/deactivate_popup.css', array(), $this->plugin_version);
538
  }
539
 
540
  /**
@@ -764,16 +763,6 @@ final class WDS {
764
  'video_disabled_in_free_version' => __('You can`t add video slide in free version', $this->prefix),
765
  )
766
  ));
767
-
768
- wp_enqueue_script('wds-deactivate-popup', $this->plugin_url.'/wd/assets/js/deactivate_popup.js', array(), $this->plugin_version, true );
769
- $admin_data = wp_get_current_user();
770
-
771
- wp_localize_script( 'wds-deactivate-popup', 'wdsWDDeactivateVars', array(
772
- "prefix" => $this->prefix ,
773
- "deactivate_class" => 'wds_deactivate_link',
774
- "email" => $admin_data->data->user_email,
775
- "plugin_wd_url" => "https://10web.io/plugins/wordpress-slider/",
776
- ));
777
  }
778
 
779
  function language_load() {
@@ -887,7 +876,7 @@ final class WDS {
887
 
888
  public function tenweb_lib_path($path) {
889
  // The version of WD Lib
890
- $version = '1.1.0';
891
  if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
892
  $path['version'] = $version;
893
  $path['path'] = $this->plugin_dir;
@@ -898,7 +887,7 @@ final class WDS {
898
  public function wds_overview() {
899
  if (is_admin() && !isset($_REQUEST['ajax'])) {
900
  if (!class_exists("TenWebLib")) {
901
- $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.0', 'path' => $this->plugin_dir));
902
  require_once($plugin_dir['path'] . '/wd/start.php');
903
  }
904
  global $wds_options;
3
  * Plugin Name: Slider by 10Web
4
  * Plugin URI: https://10web.io/plugins/wordpress-slider/
5
  * 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.
6
+ * Version: 1.2.17
7
  * Author: 10Web
8
  * Author URI: https://10web.io/pricing/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
78
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
79
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
80
  $this->main_file = plugin_basename(__FILE__);
81
+ $this->plugin_version = '1.2.17';
82
+ $this->db_version = '1.2.17';
83
  $this->prefix = 'wds';
84
  $this->nicename = __('Slider', $this->prefix);
85
  $this->use_home_url();
534
  $url = 'https://fonts.googleapis.com/css?family=' . $query . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic';
535
  wp_enqueue_style('wds_googlefonts_' . $i, $url, null, null);
536
  }
 
537
  }
538
 
539
  /**
763
  'video_disabled_in_free_version' => __('You can`t add video slide in free version', $this->prefix),
764
  )
765
  ));
 
 
 
 
 
 
 
 
 
 
766
  }
767
 
768
  function language_load() {
876
 
877
  public function tenweb_lib_path($path) {
878
  // The version of WD Lib
879
+ $version = '1.1.1';
880
  if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
881
  $path['version'] = $version;
882
  $path['path'] = $this->plugin_dir;
887
  public function wds_overview() {
888
  if (is_admin() && !isset($_REQUEST['ajax'])) {
889
  if (!class_exists("TenWebLib")) {
890
+ $plugin_dir = apply_filters('tenweb_free_users_lib_path', array('version' => '1.1.1', 'path' => $this->plugin_dir));
891
  require_once($plugin_dir['path'] . '/wd/start.php');
892
  }
893
  global $wds_options;
wd/README.md CHANGED
@@ -12,7 +12,7 @@ Copy and paste wd library into your plugin folder.
12
 
13
  public function tenweb_lib_path($path) {
14
  // The version of WD Lib
15
- $version = '1.1.0';
16
  if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
17
  $path['version'] = $version;
18
  $path['path'] = $this->plugin_dir;
12
 
13
  public function tenweb_lib_path($path) {
14
  // The version of WD Lib
15
+ $version = '1.1.1';
16
  if (!isset($path['version']) || version_compare($path['version'], $version) === -1) {
17
  $path['version'] = $version;
18
  $path['path'] = $this->plugin_dir;
wd/includes/deactivate.php CHANGED
@@ -54,8 +54,9 @@ class TenWebLibDeactivate
54
  add_action('admin_init', array($this, 'submit_and_deactivate'));
55
 
56
 
57
- add_action('admin_enqueue_scripts', array($this, 'scripts'));
58
-
 
59
 
60
  }
61
  ////////////////////////////////////////////////////////////////////////////////////////
54
  add_action('admin_init', array($this, 'submit_and_deactivate'));
55
 
56
 
57
+ // add_action('admin_enqueue_scripts', array($this, 'scripts'));
58
+ // Just enqueue styles/scripts and they will be in the footer.
59
+ $this->scripts();
60
 
61
  }
62
  ////////////////////////////////////////////////////////////////////////////////////////
wd/templates/display_subscribe.php CHANGED
@@ -5,7 +5,7 @@
5
  <h2><?php _e( "Hi there!", $wd_options->prefix ); ?></h2>
6
  <h5><?php _e( "Allow 10Web to collect some usage data", $wd_options->prefix ); ?></h5>
7
  <p>
8
- <?php echo sprintf( __( "This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will stil work just fine.", $wd_options->prefix ), $wd_options->plugin_title ); ?>
9
  </p>
10
  </div>
11
  <div class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></div>
5
  <h2><?php _e( "Hi there!", $wd_options->prefix ); ?></h2>
6
  <h5><?php _e( "Allow 10Web to collect some usage data", $wd_options->prefix ); ?></h5>
7
  <p>
8
+ <?php echo sprintf( __( "This will allow you to get more out of your plugin experience - get awesome customer support, receive exclusive deals and discounts on premium products and more. You can choose to skip this step, %s will still work just fine.", $wd_options->prefix ), $wd_options->plugin_title ); ?>
9
  </p>
10
  </div>
11
  <div class="permissions"><?php _e( "What data is being collected?" , $wd_options->prefix ); ?></div>
wd/wd.php CHANGED
@@ -17,7 +17,7 @@
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
- private $version = "1.1.0";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //
17
  public $overview_instance;
18
  public $subscribe_instance;
19
  public $config;
20
+ private $version = "1.1.1";
21
 
22
  ////////////////////////////////////////////////////////////////////////////////////////
23
  // Constructor & Destructor //