Version Description
- Added: Slides order direction (optional).
- Fixed: Filemanager allowed file types.
- Fixed: Zoomfade effect.
Download this release
Release Info
Developer | webdorado |
Plugin | Slider by WD – Responsive Slider |
Version | 1.1.70 |
Comparing to | |
See all releases |
Code changes from version 1.1.69 to 1.1.70
- admin/controllers/WDSControllerSliders_wds.php +5 -2
- admin/models/WDSModelSliders_wds.php +6 -4
- admin/views/WDSViewSliders_wds.php +15 -5
- filemanager/UploadHandler.php +1 -1
- frontend/models/WDSModelSlider.php +2 -2
- frontend/views/WDSViewSlider.php +20 -20
- js/wds.js +1 -0
- readme.txt +6 -1
- slider-wd.php +3 -2
- sliders-insert.php +1 -0
- sliders-update.php +3 -0
admin/controllers/WDSControllerSliders_wds.php
CHANGED
@@ -221,6 +221,7 @@ class WDSControllerSliders_wds {
|
|
221 |
$hide_on_mobile = ((isset($params_array['hide_on_mobile'])) ? (int) esc_html(stripslashes($params_array['hide_on_mobile'])) : 0);
|
222 |
$twoway_slideshow = ((isset($params_array['twoway_slideshow'])) ? (int) esc_html(stripslashes($params_array['twoway_slideshow'])) : 0);
|
223 |
$full_width_for_mobile = ((isset($params_array['full_width_for_mobile'])) ? (int) esc_html(stripslashes($params_array['full_width_for_mobile'])) : 0);
|
|
|
224 |
$data = array(
|
225 |
'name' => $name,
|
226 |
'published' => $published,
|
@@ -336,6 +337,7 @@ class WDSControllerSliders_wds {
|
|
336 |
'hide_on_mobile' => $hide_on_mobile,
|
337 |
'twoway_slideshow' => $twoway_slideshow,
|
338 |
'full_width_for_mobile' => $full_width_for_mobile,
|
|
|
339 |
);
|
340 |
|
341 |
if (!$slider_id) {
|
@@ -630,7 +632,7 @@ class WDSControllerSliders_wds {
|
|
630 |
$image_name = substr($slider_image_dir, $last_slash_pos);
|
631 |
$new_image = $dest_dir . '.original/' . $image_name;
|
632 |
if (!is_dir($dest_dir . '.original')) {
|
633 |
-
mkdir($dest_dir . '.original', 0777);
|
634 |
}
|
635 |
if (!file_exists($new_image)) {
|
636 |
copy($slider_image_dir, $new_image);
|
@@ -650,7 +652,7 @@ class WDSControllerSliders_wds {
|
|
650 |
$image_name = substr($slider_image_dir, $last_slash_pos);
|
651 |
$new_image = $dest_dir . '.original/' . $image_name;
|
652 |
if (!is_dir($dest_dir . '.original')) {
|
653 |
-
mkdir($dest_dir . '.original', 0777);
|
654 |
}
|
655 |
if (!file_exists($new_image)) {
|
656 |
copy($slider_image_dir, $new_image);
|
@@ -866,6 +868,7 @@ class WDSControllerSliders_wds {
|
|
866 |
'keyboard_nav' => $slider_row->keyboard_nav,
|
867 |
'fixed_bg' => $slider_row->fixed_bg,
|
868 |
'full_width_for_mobile' => $slider_row->full_width_for_mobile,
|
|
|
869 |
));
|
870 |
$new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
|
871 |
|
221 |
$hide_on_mobile = ((isset($params_array['hide_on_mobile'])) ? (int) esc_html(stripslashes($params_array['hide_on_mobile'])) : 0);
|
222 |
$twoway_slideshow = ((isset($params_array['twoway_slideshow'])) ? (int) esc_html(stripslashes($params_array['twoway_slideshow'])) : 0);
|
223 |
$full_width_for_mobile = ((isset($params_array['full_width_for_mobile'])) ? (int) esc_html(stripslashes($params_array['full_width_for_mobile'])) : 0);
|
224 |
+
$order_dir = ((isset($params_array['order_dir'])) ? esc_html(stripslashes($params_array['order_dir'])) : 'asc');
|
225 |
$data = array(
|
226 |
'name' => $name,
|
227 |
'published' => $published,
|
337 |
'hide_on_mobile' => $hide_on_mobile,
|
338 |
'twoway_slideshow' => $twoway_slideshow,
|
339 |
'full_width_for_mobile' => $full_width_for_mobile,
|
340 |
+
'order_dir' => $order_dir,
|
341 |
);
|
342 |
|
343 |
if (!$slider_id) {
|
632 |
$image_name = substr($slider_image_dir, $last_slash_pos);
|
633 |
$new_image = $dest_dir . '.original/' . $image_name;
|
634 |
if (!is_dir($dest_dir . '.original')) {
|
635 |
+
mkdir($dest_dir . '.original', 0777, TRUE);
|
636 |
}
|
637 |
if (!file_exists($new_image)) {
|
638 |
copy($slider_image_dir, $new_image);
|
652 |
$image_name = substr($slider_image_dir, $last_slash_pos);
|
653 |
$new_image = $dest_dir . '.original/' . $image_name;
|
654 |
if (!is_dir($dest_dir . '.original')) {
|
655 |
+
mkdir($dest_dir . '.original', 0777, TRUE);
|
656 |
}
|
657 |
if (!file_exists($new_image)) {
|
658 |
copy($slider_image_dir, $new_image);
|
868 |
'keyboard_nav' => $slider_row->keyboard_nav,
|
869 |
'fixed_bg' => $slider_row->fixed_bg,
|
870 |
'full_width_for_mobile' => $slider_row->full_width_for_mobile,
|
871 |
+
'order_dir' => $slider_row->order_dir,
|
872 |
));
|
873 |
$new_slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
|
874 |
|
admin/models/WDSModelSliders_wds.php
CHANGED
@@ -25,9 +25,9 @@ class WDSModelSliders_wds {
|
|
25 |
return $count;
|
26 |
}
|
27 |
|
28 |
-
public function get_slides_row_data($slider_id) {
|
29 |
global $wpdb;
|
30 |
-
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order`
|
31 |
if (!$rows) {
|
32 |
$rows = array();
|
33 |
$rows[0] = new stdClass();
|
@@ -63,9 +63,10 @@ class WDSModelSliders_wds {
|
|
63 |
return $rows;
|
64 |
}
|
65 |
|
66 |
-
public function get_slider_prev_img($slider_id) {
|
67 |
global $wpdb;
|
68 |
-
$
|
|
|
69 |
$prev_img_url = $prev_img_url ? $prev_img_url : WD_S_URL . '/images/no-image.png';
|
70 |
$prev_img_url = str_replace('{site_url}', site_url(), $prev_img_url);
|
71 |
return $prev_img_url;
|
@@ -236,6 +237,7 @@ class WDSModelSliders_wds {
|
|
236 |
$row->hide_on_mobile = 0;
|
237 |
$row->twoway_slideshow = 0;
|
238 |
$row->full_width_for_mobile = 0;
|
|
|
239 |
}
|
240 |
return $row;
|
241 |
}
|
25 |
return $count;
|
26 |
}
|
27 |
|
28 |
+
public function get_slides_row_data($slider_id, $order_dir = 'asc') {
|
29 |
global $wpdb;
|
30 |
+
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` " . esc_sql($order_dir), $slider_id));
|
31 |
if (!$rows) {
|
32 |
$rows = array();
|
33 |
$rows[0] = new stdClass();
|
63 |
return $rows;
|
64 |
}
|
65 |
|
66 |
+
public function get_slider_prev_img($slider_id, $order_dir = 'asc') {
|
67 |
global $wpdb;
|
68 |
+
$slider = $wpdb->get_row($wpdb->prepare("SELECT `thumb_url`, `type` FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` " . esc_sql($order_dir), $slider_id));
|
69 |
+
$prev_img_url = $slider->type == 'video' && ctype_digit($slider->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slider->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slider->thumb_url)) : WD_S_URL . '/images/no-video.png' ) : $slider->thumb_url;
|
70 |
$prev_img_url = $prev_img_url ? $prev_img_url : WD_S_URL . '/images/no-image.png';
|
71 |
$prev_img_url = str_replace('{site_url}', site_url(), $prev_img_url);
|
72 |
return $prev_img_url;
|
237 |
$row->hide_on_mobile = 0;
|
238 |
$row->twoway_slideshow = 0;
|
239 |
$row->full_width_for_mobile = 0;
|
240 |
+
$row->order_dir = 'asc';
|
241 |
}
|
242 |
return $row;
|
243 |
}
|
admin/views/WDSViewSliders_wds.php
CHANGED
@@ -180,7 +180,8 @@ class WDSViewSliders_wds {
|
|
180 |
$alternate = ($alternate == 'class="wds_alternate"') ? '' : 'class="wds_alternate"';
|
181 |
$published_image = (($row_data->published) ? 'publish_slide' : 'unpublish_slide');
|
182 |
$published = (($row_data->published) ? 'unpublish' : 'publish');
|
183 |
-
$
|
|
|
184 |
$slides_count = $this->model->get_slides_count($row_data->id);
|
185 |
?>
|
186 |
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
@@ -255,7 +256,8 @@ class WDSViewSliders_wds {
|
|
255 |
$query_url = wp_nonce_url($query_url, 'addImage', 'nonce_wd');
|
256 |
|
257 |
$row = $this->model->get_row_data($id, $reset);
|
258 |
-
$
|
|
|
259 |
$slide_ids_string = '';
|
260 |
$sub_tab_type = WDW_S_Library::get('sub_tab', '');
|
261 |
|
@@ -728,7 +730,7 @@ class WDSViewSliders_wds {
|
|
728 |
<td class="spider_label"><label>Smart Crop</label></td>
|
729 |
<td>
|
730 |
<input onClick="bwg_enable_disable('', 'tr_crop_pos', 'smart_crop1')" type="radio" id="smart_crop1" name="smart_crop" <?php echo (($row->smart_crop) ? 'checked="checked"' : ''); ?> value="1" /><label <?php echo (($row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop1">Yes</label>
|
731 |
-
<input onClick="bwg_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" /><label for="smart_crop0">No</label>
|
732 |
<div class="spider_description"></div>
|
733 |
</td>
|
734 |
</tr>
|
@@ -761,8 +763,16 @@ class WDSViewSliders_wds {
|
|
761 |
<tr>
|
762 |
<td class="spider_label"><label>Fixed background: </label></td>
|
763 |
<td>
|
764 |
-
<input type="radio" id="fixed_bg1" name="fixed_bg" <?php echo (($row->fixed_bg) ? 'checked="checked"' : ''); ?> value="1" /><label for="fixed_bg1">Yes</label>
|
765 |
-
<input type="radio" id="fixed_bg0" name="fixed_bg" <?php echo (($row->fixed_bg) ? '' : 'checked="checked"'); ?> value="0" /><label for="fixed_bg0">No</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
<div class="spider_description"></div>
|
767 |
</td>
|
768 |
</tr>
|
180 |
$alternate = ($alternate == 'class="wds_alternate"') ? '' : 'class="wds_alternate"';
|
181 |
$published_image = (($row_data->published) ? 'publish_slide' : 'unpublish_slide');
|
182 |
$published = (($row_data->published) ? 'unpublish' : 'publish');
|
183 |
+
$order_dir = isset($row_data->order_dir) ? $row_data->order_dir : 'asc';
|
184 |
+
$prev_img_url = $this->model->get_slider_prev_img($row_data->id, $order_dir);
|
185 |
$slides_count = $this->model->get_slides_count($row_data->id);
|
186 |
?>
|
187 |
<tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
|
256 |
$query_url = wp_nonce_url($query_url, 'addImage', 'nonce_wd');
|
257 |
|
258 |
$row = $this->model->get_row_data($id, $reset);
|
259 |
+
$order_dir = isset($row->order_dir) ? $row->order_dir : 'asc';
|
260 |
+
$slides_row = $this->model->get_slides_row_data($id, $order_dir);
|
261 |
$slide_ids_string = '';
|
262 |
$sub_tab_type = WDW_S_Library::get('sub_tab', '');
|
263 |
|
730 |
<td class="spider_label"><label>Smart Crop</label></td>
|
731 |
<td>
|
732 |
<input onClick="bwg_enable_disable('', 'tr_crop_pos', 'smart_crop1')" type="radio" id="smart_crop1" name="smart_crop" <?php echo (($row->smart_crop) ? 'checked="checked"' : ''); ?> value="1" /><label <?php echo (($row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop1">Yes</label>
|
733 |
+
<input onClick="bwg_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" /><label <?php echo ((!$row->smart_crop) ? 'class="selected_color"' : ''); ?> for="smart_crop0">No</label>
|
734 |
<div class="spider_description"></div>
|
735 |
</td>
|
736 |
</tr>
|
763 |
<tr>
|
764 |
<td class="spider_label"><label>Fixed background: </label></td>
|
765 |
<td>
|
766 |
+
<input type="radio" id="fixed_bg1" name="fixed_bg" <?php echo (($row->fixed_bg) ? 'checked="checked"' : ''); ?> value="1" /><label <?php echo (($row->fixed_bg) ? 'class="selected_color"' : ''); ?> for="fixed_bg1">Yes</label>
|
767 |
+
<input type="radio" id="fixed_bg0" name="fixed_bg" <?php echo (($row->fixed_bg) ? '' : 'checked="checked"'); ?> value="0" /><label <?php echo ((!$row->fixed_bg) ? 'class="selected_color"' : ''); ?> for="fixed_bg0">No</label>
|
768 |
+
<div class="spider_description"></div>
|
769 |
+
</td>
|
770 |
+
</tr>
|
771 |
+
<tr>
|
772 |
+
<td class="spider_label"><label>Slides order direction: </label></td>
|
773 |
+
<td>
|
774 |
+
<input type="radio" id="order_dir1" name="order_dir" <?php echo checked('asc', $row->order_dir); ?> value="asc" /><label <?php echo (($row->order_dir == 'asc') ? 'class="selected_color"' : ''); ?> for="order_dir1">Ascending</label>
|
775 |
+
<input type="radio" id="order_dir0" name="order_dir" <?php checked('desc', $row->order_dir); ?> value="desc" /><label <?php echo (($row->order_dir == 'desc') ? 'class="selected_color"' : ''); ?> for="order_dir0">Descending</label>
|
776 |
<div class="spider_description"></div>
|
777 |
</td>
|
778 |
</tr>
|
filemanager/UploadHandler.php
CHANGED
@@ -24,7 +24,7 @@ $controller = new FilemanagerController();
|
|
24 |
|
25 |
$upload_handler = new wds_UploadHandler(array(
|
26 |
'upload_dir' => $controller->uploads_dir . (isset($_GET['dir']) ? str_replace('\\', '', ($_GET['dir'])) : ''),
|
27 |
-
'accept_file_types' => '/\.(gif|jpe?g|png|
|
28 |
));
|
29 |
|
30 |
class wds_UploadHandler {
|
24 |
|
25 |
$upload_handler = new wds_UploadHandler(array(
|
26 |
'upload_dir' => $controller->uploads_dir . (isset($_GET['dir']) ? str_replace('\\', '', ($_GET['dir'])) : ''),
|
27 |
+
'accept_file_types' => '/\.(gif|jpe?g|png|mp4|flv|webm|aac|m4a|f4a|oga|ogg|mp3|wav|zip)$/i'
|
28 |
));
|
29 |
|
30 |
class wds_UploadHandler {
|
frontend/models/WDSModelSlider.php
CHANGED
@@ -19,9 +19,9 @@ class WDSModelSlider {
|
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
|
22 |
-
public function get_slide_rows_data($id) {
|
23 |
global $wpdb;
|
24 |
-
$rows = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE published=1 AND slider_id="%d" AND image_url<>"" ORDER BY `order`
|
25 |
foreach ($rows as $row) {
|
26 |
$row->image_url = str_replace('{site_url}', site_url(), $row->image_url);
|
27 |
$row->thumb_url = str_replace('{site_url}', site_url(), $row->thumb_url);
|
19 |
// Public Methods //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
|
22 |
+
public function get_slide_rows_data($id, $order_dir = 'asc') {
|
23 |
global $wpdb;
|
24 |
+
$rows = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE published=1 AND slider_id="%d" AND image_url<>"" ORDER BY `order` ' . esc_sql($order_dir), $id));
|
25 |
foreach ($rows as $row) {
|
26 |
$row->image_url = str_replace('{site_url}', site_url(), $row->image_url);
|
27 |
$row->thumb_url = str_replace('{site_url}', site_url(), $row->thumb_url);
|
frontend/views/WDSViewSlider.php
CHANGED
@@ -53,8 +53,8 @@ class WDSViewSlider {
|
|
53 |
$bull_style_active = str_replace('-o', '', $slider_row->bull_style);
|
54 |
$bull_style_deactive = $slider_row->bull_style;
|
55 |
$bull_size_cont = $slider_row->bull_size + $slider_row->bull_margin * ($slider_row->bull_butt_img_or_not == 'text' ? 4 : 2);
|
56 |
-
|
57 |
-
$slide_rows = $this->model->get_slide_rows_data($id);
|
58 |
if (!$slide_rows) {
|
59 |
echo WDW_S_Library::message(__('There are no slides in this slider.', 'wds'), 'wd_error');
|
60 |
return;
|
@@ -1465,13 +1465,6 @@ class WDSViewSlider {
|
|
1465 |
}
|
1466 |
}
|
1467 |
function wds_change_image_when_loaded_<?php echo $wds; ?>(current_key, key, wds_data_<?php echo $wds; ?>, from_effect, btn) {
|
1468 |
-
<?php
|
1469 |
-
if ($slider_row->effect == 'zoomFade') {
|
1470 |
-
?>
|
1471 |
-
wds_genBgPos_<?php echo $wds; ?>();
|
1472 |
-
<?php
|
1473 |
-
}
|
1474 |
-
?>
|
1475 |
/* Pause videos.*/
|
1476 |
jQuery("#wds_slideshow_image_container_<?php echo $wds; ?>").find("iframe").each(function () {
|
1477 |
if (typeof jQuery(this)[0].contentWindow != "undefined") {
|
@@ -1701,6 +1694,13 @@ class WDSViewSlider {
|
|
1701 |
}
|
1702 |
}, wds_duration_for_change_<?php echo $wds; ?>);
|
1703 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1704 |
wds_window_fixed_size<?php echo $wds; ?>(next_image_class);
|
1705 |
<?php if(isset($callback_items["onSliderCS"])) echo $callback_items["onSliderCS"]; ?>
|
1706 |
}
|
@@ -1815,19 +1815,19 @@ class WDSViewSlider {
|
|
1815 |
wds_window_fixed_size<?php echo $wds; ?>("#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val())]["id"]);
|
1816 |
}
|
1817 |
/* Generate background position for Zoom Fade effect.*/
|
1818 |
-
function wds_genBgPos_<?php echo $wds; ?>() {
|
1819 |
var bgSizeArray = [0, 70];
|
1820 |
var bgSize = bgSizeArray[Math.floor(Math.random() * bgSizeArray.length)];
|
1821 |
var bgPosXArray = ['left', 'right'];
|
1822 |
var bgPosYArray = ['top', 'bottom'];
|
1823 |
var bgPosX = bgPosXArray[Math.floor(Math.random() * bgPosXArray.length)];
|
1824 |
var bgPosY = bgPosYArray[Math.floor(Math.random() * bgPosYArray.length)];
|
1825 |
-
jQuery(".wds_slideshow_image_<?php echo $wds; ?>").css({
|
1826 |
backgroundPosition: bgPosX + " " + bgPosY,
|
1827 |
backgroundSize : (100 + bgSize) + "% " + (100 + bgSize) + "%",
|
1828 |
-
webkitAnimation: '<?php echo $slideshow_interval; ?>s linear 0s alternate infinite
|
1829 |
-
mozAnimation: '<?php echo $slideshow_interval; ?>s linear 0s alternate infinite
|
1830 |
-
animation: '<?php echo $slideshow_interval; ?>s linear 0s alternate infinite
|
1831 |
});
|
1832 |
}
|
1833 |
jQuery(window).resize(function () {
|
@@ -1981,7 +1981,7 @@ class WDSViewSlider {
|
|
1981 |
<?php
|
1982 |
if ($slider_row->effect == 'zoomFade') {
|
1983 |
?>
|
1984 |
-
wds_genBgPos_<?php echo $wds; ?>();
|
1985 |
<?php
|
1986 |
}
|
1987 |
if ($image_right_click) {
|
@@ -2237,7 +2237,11 @@ class WDSViewSlider {
|
|
2237 |
}
|
2238 |
if (<?php echo $enable_slideshow_music ?>) {
|
2239 |
document.getElementById("wds_audio_<?php echo $wds; ?>").play();
|
2240 |
-
}
|
|
|
|
|
|
|
|
|
2241 |
}
|
2242 |
/* Effects in part.*/
|
2243 |
function wds_set_layer_effect_in_<?php echo $wds; ?>(j, key) {
|
@@ -2326,10 +2330,6 @@ class WDSViewSlider {
|
|
2326 |
}
|
2327 |
wds_change_image_<?php echo $wds; ?>(parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()), img_index, wds_data_<?php echo $wds; ?>);
|
2328 |
}, parseInt('<?php echo ($slideshow_interval * 1000); ?>') + wds_duration_for_change_<?php echo $wds; ?>);
|
2329 |
-
var next_slide_layers_count = wds_data_<?php echo $wds; ?>[wds_current_key_<?php echo $wds; ?>]["slide_layers_count"];
|
2330 |
-
for (var i = 0; i < next_slide_layers_count; i++) {
|
2331 |
-
wds_set_layer_effect_out_<?php echo $wds; ?>(i, wds_current_key_<?php echo $wds; ?>);
|
2332 |
-
}
|
2333 |
}
|
2334 |
jQuery(window).focus(function() {
|
2335 |
if (!jQuery(".wds_ctrl_btn_<?php echo $wds; ?>").hasClass("fa-play")) {
|
53 |
$bull_style_active = str_replace('-o', '', $slider_row->bull_style);
|
54 |
$bull_style_deactive = $slider_row->bull_style;
|
55 |
$bull_size_cont = $slider_row->bull_size + $slider_row->bull_margin * ($slider_row->bull_butt_img_or_not == 'text' ? 4 : 2);
|
56 |
+
$order_dir = isset($slider_row->order_dir) ? $slider_row->order_dir : 'asc';
|
57 |
+
$slide_rows = $this->model->get_slide_rows_data($id, $order_dir);
|
58 |
if (!$slide_rows) {
|
59 |
echo WDW_S_Library::message(__('There are no slides in this slider.', 'wds'), 'wd_error');
|
60 |
return;
|
1465 |
}
|
1466 |
}
|
1467 |
function wds_change_image_when_loaded_<?php echo $wds; ?>(current_key, key, wds_data_<?php echo $wds; ?>, from_effect, btn) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1468 |
/* Pause videos.*/
|
1469 |
jQuery("#wds_slideshow_image_container_<?php echo $wds; ?>").find("iframe").each(function () {
|
1470 |
if (typeof jQuery(this)[0].contentWindow != "undefined") {
|
1694 |
}
|
1695 |
}, wds_duration_for_change_<?php echo $wds; ?>);
|
1696 |
}
|
1697 |
+
<?php
|
1698 |
+
if ($slider_row->effect == 'zoomFade') {
|
1699 |
+
?>
|
1700 |
+
wds_genBgPos_<?php echo $wds; ?>(next_image_class);
|
1701 |
+
<?php
|
1702 |
+
}
|
1703 |
+
?>
|
1704 |
wds_window_fixed_size<?php echo $wds; ?>(next_image_class);
|
1705 |
<?php if(isset($callback_items["onSliderCS"])) echo $callback_items["onSliderCS"]; ?>
|
1706 |
}
|
1815 |
wds_window_fixed_size<?php echo $wds; ?>("#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val())]["id"]);
|
1816 |
}
|
1817 |
/* Generate background position for Zoom Fade effect.*/
|
1818 |
+
function wds_genBgPos_<?php echo $wds; ?>(current_key) {
|
1819 |
var bgSizeArray = [0, 70];
|
1820 |
var bgSize = bgSizeArray[Math.floor(Math.random() * bgSizeArray.length)];
|
1821 |
var bgPosXArray = ['left', 'right'];
|
1822 |
var bgPosYArray = ['top', 'bottom'];
|
1823 |
var bgPosX = bgPosXArray[Math.floor(Math.random() * bgPosXArray.length)];
|
1824 |
var bgPosY = bgPosYArray[Math.floor(Math.random() * bgPosYArray.length)];
|
1825 |
+
jQuery(current_key + " .wds_slideshow_image_<?php echo $wds; ?>").css({
|
1826 |
backgroundPosition: bgPosX + " " + bgPosY,
|
1827 |
backgroundSize : (100 + bgSize) + "% " + (100 + bgSize) + "%",
|
1828 |
+
webkitAnimation: ' wdszoom' + bgSize + ' <?php echo $slideshow_interval; ?>s linear 0s alternate infinite',
|
1829 |
+
mozAnimation: ' wdszoom' + bgSize + ' <?php echo $slideshow_interval; ?>s linear 0s alternate infinite',
|
1830 |
+
animation: ' wdszoom' + bgSize + ' <?php echo $slideshow_interval; ?>s linear 0s alternate infinite'
|
1831 |
});
|
1832 |
}
|
1833 |
jQuery(window).resize(function () {
|
1981 |
<?php
|
1982 |
if ($slider_row->effect == 'zoomFade') {
|
1983 |
?>
|
1984 |
+
wds_genBgPos_<?php echo $wds; ?>("#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val())]["id"]);
|
1985 |
<?php
|
1986 |
}
|
1987 |
if ($image_right_click) {
|
2237 |
}
|
2238 |
if (<?php echo $enable_slideshow_music ?>) {
|
2239 |
document.getElementById("wds_audio_<?php echo $wds; ?>").play();
|
2240 |
+
}
|
2241 |
+
var next_slide_layers_count = wds_data_<?php echo $wds; ?>[wds_current_key_<?php echo $wds; ?>]["slide_layers_count"];
|
2242 |
+
for (var i = 0; i < next_slide_layers_count; i++) {
|
2243 |
+
wds_set_layer_effect_out_<?php echo $wds; ?>(i, wds_current_key_<?php echo $wds; ?>);
|
2244 |
+
}
|
2245 |
}
|
2246 |
/* Effects in part.*/
|
2247 |
function wds_set_layer_effect_in_<?php echo $wds; ?>(j, key) {
|
2330 |
}
|
2331 |
wds_change_image_<?php echo $wds; ?>(parseInt(jQuery('#wds_current_image_key_<?php echo $wds; ?>').val()), img_index, wds_data_<?php echo $wds; ?>);
|
2332 |
}, parseInt('<?php echo ($slideshow_interval * 1000); ?>') + wds_duration_for_change_<?php echo $wds; ?>);
|
|
|
|
|
|
|
|
|
2333 |
}
|
2334 |
jQuery(window).focus(function() {
|
2335 |
if (!jQuery(".wds_ctrl_btn_<?php echo $wds; ?>").hasClass("fa-play")) {
|
js/wds.js
CHANGED
@@ -58,6 +58,7 @@ function spider_ajax_save(form_id, event) {
|
|
58 |
slider_data["hide_on_mobile"] = jQuery("#hide_on_mobile").val();
|
59 |
slider_data["twoway_slideshow"] = jQuery("input[name=twoway_slideshow]:checked").val();
|
60 |
slider_data["full_width_for_mobile"] = jQuery("#full_width_for_mobile").val();
|
|
|
61 |
|
62 |
/* Navigation.*/
|
63 |
slider_data["prev_next_butt"] = jQuery("input[name=prev_next_butt]:checked").val();
|
58 |
slider_data["hide_on_mobile"] = jQuery("#hide_on_mobile").val();
|
59 |
slider_data["twoway_slideshow"] = jQuery("input[name=twoway_slideshow]:checked").val();
|
60 |
slider_data["full_width_for_mobile"] = jQuery("#full_width_for_mobile").val();
|
61 |
+
slider_data["order_dir"] = jQuery("input[name=order_dir]:checked").val();
|
62 |
|
63 |
/* Navigation.*/
|
64 |
slider_data["prev_next_butt"] = jQuery("input[name=prev_next_butt]:checked").val();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
|
|
4 |
Tags: easy slider, gallery slider, image slider, images slider, Photo Slider, post slider, responsive slider, slider, slider plugin, video slider, wordpress slider, youtube slider
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -125,6 +125,11 @@ After downloading the ZIP file of the slider plugin,
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
= 1.1.69 =
|
129 |
* Fixed: Transition effect bug.
|
130 |
|
4 |
Tags: easy slider, gallery slider, image slider, images slider, Photo Slider, post slider, responsive slider, slider, slider plugin, video slider, wordpress slider, youtube slider
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 1.1.70
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= 1.1.70 =
|
129 |
+
* Added: Slides order direction (optional).
|
130 |
+
* Fixed: Filemanager allowed file types.
|
131 |
+
* Fixed: Zoomfade effect.
|
132 |
+
|
133 |
= 1.1.69 =
|
134 |
* Fixed: Transition effect bug.
|
135 |
|
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.
|
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.
|
18 |
|
19 |
function wds_use_home_url() {
|
20 |
$home_url = str_replace("http://", "", home_url());
|
@@ -445,6 +445,7 @@ function wds_activate() {
|
|
445 |
'hide_on_mobile' => 0,
|
446 |
'twoway_slideshow' => 0,
|
447 |
'full_width_for_mobile' => 0,
|
|
|
448 |
)
|
449 |
);
|
450 |
}
|
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.70
|
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.70');
|
18 |
|
19 |
function wds_use_home_url() {
|
20 |
$home_url = str_replace("http://", "", home_url());
|
445 |
'hide_on_mobile' => 0,
|
446 |
'twoway_slideshow' => 0,
|
447 |
'full_width_for_mobile' => 0,
|
448 |
+
'order_dir' => 'asc',
|
449 |
)
|
450 |
);
|
451 |
}
|
sliders-insert.php
CHANGED
@@ -118,6 +118,7 @@ function wds_insert() {
|
|
118 |
`hide_on_mobile` int(4) NOT NULL,
|
119 |
`twoway_slideshow` tinyint(1) NOT NULL,
|
120 |
`full_width_for_mobile` int(4) NOT NULL,
|
|
|
121 |
PRIMARY KEY (`id`)
|
122 |
) DEFAULT CHARSET=utf8;";
|
123 |
$wpdb->query($wdsslider);
|
118 |
`hide_on_mobile` int(4) NOT NULL,
|
119 |
`twoway_slideshow` tinyint(1) NOT NULL,
|
120 |
`full_width_for_mobile` int(4) NOT NULL,
|
121 |
+
`order_dir` varchar(4) NOT NULL,
|
122 |
PRIMARY KEY (`id`)
|
123 |
) DEFAULT CHARSET=utf8;";
|
124 |
$wpdb->query($wdsslider);
|
sliders-update.php
CHANGED
@@ -169,5 +169,8 @@ function wds_update($version) {
|
|
169 |
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `infinite_in` int(4) NOT NULL DEFAULT 1");
|
170 |
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `infinite_out` int(4) NOT NULL DEFAULT 1");
|
171 |
}
|
|
|
|
|
|
|
172 |
return;
|
173 |
}
|
169 |
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `infinite_in` int(4) NOT NULL DEFAULT 1");
|
170 |
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "wdslayer` ADD `infinite_out` int(4) NOT NULL DEFAULT 1");
|
171 |
}
|
172 |
+
if (version_compare($version, '1.1.70') == -1) {
|
173 |
+
$wpdb->query("ALTER TABLE " . $wpdb->prefix . "wdsslider ADD `order_dir` varchar(4) NOT NULL DEFAULT 'asc'");
|
174 |
+
}
|
175 |
return;
|
176 |
}
|