Version Description
New: Slider preview in admin.
Changed: Improved slide load.
Fixed: Play/pause button.
Download this release
Release Info
Developer | webdorado |
Plugin | Slider by WD – Responsive Slider |
Version | 1.0.27 |
Comparing to | |
See all releases |
Code changes from version 1.0.26 to 1.0.27
- admin/controllers/WDSControllerSliders_wds.php +4 -4
- admin/views/WDSViewSliders_wds.php +5 -2
- css/wds_frontend.css +11 -0
- filemanager/UploadHandler.php +2 -2
- frontend/views/WDSViewSlider.php +28 -36
- js/wds.js +9 -1
- readme.txt +8 -2
- slider-wd.php +31 -2
admin/controllers/WDSControllerSliders_wds.php
CHANGED
@@ -1166,7 +1166,7 @@ class WDSControllerSliders_wds {
|
|
1166 |
$left = ($width - $watermark_sizes['width']) / 2;
|
1167 |
break;
|
1168 |
}
|
1169 |
-
ini_set('memory_limit', '-1');
|
1170 |
if ($type == 2) {
|
1171 |
$image = imagecreatefromjpeg($original_filename);
|
1172 |
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
@@ -1193,7 +1193,7 @@ class WDSControllerSliders_wds {
|
|
1193 |
imagedestroy($image);
|
1194 |
}
|
1195 |
imagedestroy($watermark_image);
|
1196 |
-
ini_restore('memory_limit');
|
1197 |
}
|
1198 |
|
1199 |
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
@@ -1226,7 +1226,7 @@ class WDSControllerSliders_wds {
|
|
1226 |
$left = ($width - $watermark_width) / 2;
|
1227 |
break;
|
1228 |
}
|
1229 |
-
ini_set('memory_limit', '-1');
|
1230 |
if ($type_watermark == 2) {
|
1231 |
$watermark_image = imagecreatefromjpeg($watermark_url);
|
1232 |
}
|
@@ -1275,7 +1275,7 @@ class WDSControllerSliders_wds {
|
|
1275 |
imagedestroy($tempimage);
|
1276 |
}
|
1277 |
imagedestroy($watermark_image);
|
1278 |
-
ini_restore('memory_limit');
|
1279 |
}
|
1280 |
|
1281 |
public function delete($id) {
|
1166 |
$left = ($width - $watermark_sizes['width']) / 2;
|
1167 |
break;
|
1168 |
}
|
1169 |
+
@ini_set('memory_limit', '-1');
|
1170 |
if ($type == 2) {
|
1171 |
$image = imagecreatefromjpeg($original_filename);
|
1172 |
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1193 |
imagedestroy($image);
|
1194 |
}
|
1195 |
imagedestroy($watermark_image);
|
1196 |
+
@ini_restore('memory_limit');
|
1197 |
}
|
1198 |
|
1199 |
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
1226 |
$left = ($width - $watermark_width) / 2;
|
1227 |
break;
|
1228 |
}
|
1229 |
+
@ini_set('memory_limit', '-1');
|
1230 |
if ($type_watermark == 2) {
|
1231 |
$watermark_image = imagecreatefromjpeg($watermark_url);
|
1232 |
}
|
1275 |
imagedestroy($tempimage);
|
1276 |
}
|
1277 |
imagedestroy($watermark_image);
|
1278 |
+
@ini_restore('memory_limit');
|
1279 |
}
|
1280 |
|
1281 |
public function delete($id) {
|
admin/views/WDSViewSliders_wds.php
CHANGED
@@ -410,7 +410,9 @@ class WDSViewSliders_wds {
|
|
410 |
spider_set_input_value('task', 'duplicate');
|
411 |
spider_set_input_value('sub_tab', '');
|
412 |
spider_ajax_save('sliders_form', event);" value="Save as Copy" />
|
413 |
-
<input type="button" class="button-
|
|
|
|
|
414 |
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel" />
|
415 |
</div>
|
416 |
<div class="wds_tabs">
|
@@ -1880,7 +1882,7 @@ class WDSViewSliders_wds {
|
|
1880 |
?>
|
1881 |
<input type="button" class="button-secondary button button-small wds_free_button" onclick="alert('This functionality is disabled in free version.'); return false;" value="Embed Media Layer" />
|
1882 |
<input type="button" class="button-secondary button button-small wds_free_button" onclick="alert('This functionality is disabled in free version.'); return false;" value="Add Social Button Layer" />
|
1883 |
-
|
1884 |
</td>
|
1885 |
</tr>
|
1886 |
</tbody>
|
@@ -2457,6 +2459,7 @@ class WDSViewSliders_wds {
|
|
2457 |
</div>
|
2458 |
<input id="task" name="task" type="hidden" value="" />
|
2459 |
<script>
|
|
|
2460 |
var uploader_href = '<?php echo add_query_arg(array('action' => 'addImage', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'wds_add_image', 'image_for' => 'add_update_slide', 'slide_id' => 'slideID', 'layer_id' => 'layerID', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>';
|
2461 |
var fv = '<?php echo $fv; ?>';
|
2462 |
jQuery(document).ready(function() {
|
410 |
spider_set_input_value('task', 'duplicate');
|
411 |
spider_set_input_value('sub_tab', '');
|
412 |
spider_ajax_save('sliders_form', event);" value="Save as Copy" />
|
413 |
+
<input type="button" class="button-primary" value="Preview"
|
414 |
+
onclick="if (wds_check_required('name', 'Name')) { return false;}; spider_set_input_value('task', 'preview'); spider_ajax_save('sliders_form', event); return false;" />
|
415 |
+
<input type="button" class="button-secondary wds_free_button" onclick="alert('This functionality is disabled in free version.')" value="Export" />
|
416 |
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel" />
|
417 |
</div>
|
418 |
<div class="wds_tabs">
|
1882 |
?>
|
1883 |
<input type="button" class="button-secondary button button-small wds_free_button" onclick="alert('This functionality is disabled in free version.'); return false;" value="Embed Media Layer" />
|
1884 |
<input type="button" class="button-secondary button button-small wds_free_button" onclick="alert('This functionality is disabled in free version.'); return false;" value="Add Social Button Layer" />
|
1885 |
+
<input type="button" class="button-secondary button button-small wds_free_button" onclick="alert('This functionality is disabled in free version.'); return false;" value="Add Hotspot Layer" />
|
1886 |
</td>
|
1887 |
</tr>
|
1888 |
</tbody>
|
2459 |
</div>
|
2460 |
<input id="task" name="task" type="hidden" value="" />
|
2461 |
<script>
|
2462 |
+
var wds_preview_url = "<?php echo add_query_arg(array('action' => 'WDSPreview', 'slider_id' => $id ? $id : 'sliderID', 'width' => '700', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>";
|
2463 |
var uploader_href = '<?php echo add_query_arg(array('action' => 'addImage', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'wds_add_image', 'image_for' => 'add_update_slide', 'slide_id' => 'slideID', 'layer_id' => 'layerID', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>';
|
2464 |
var fv = '<?php echo $fv; ?>';
|
2465 |
jQuery(document).ready(function() {
|
css/wds_frontend.css
CHANGED
@@ -70,6 +70,17 @@ div[id^="wds_container"] .wds_right_btn_cont {
|
|
70 |
margin-right: 10px;
|
71 |
}
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
@-webkit-keyframes wdszoom0 { 100% { background-size: 170%; }}
|
74 |
@-webkit-keyframes wdszoom70 { 100% { background-size: 100%; }}
|
75 |
@-moz-keyframes wdszoom0 { 100% { background-size: 170%; }}
|
70 |
margin-right: 10px;
|
71 |
}
|
72 |
|
73 |
+
.wds_preview_cont1 {
|
74 |
+
display: table;
|
75 |
+
height: 100%;
|
76 |
+
width: 100%;
|
77 |
+
}
|
78 |
+
|
79 |
+
.wds_preview_cont2 {
|
80 |
+
display: table-cell;
|
81 |
+
vertical-align: middle;
|
82 |
+
}
|
83 |
+
|
84 |
@-webkit-keyframes wdszoom0 { 100% { background-size: 170%; }}
|
85 |
@-webkit-keyframes wdszoom70 { 100% { background-size: 100%; }}
|
86 |
@-moz-keyframes wdszoom0 { 100% { background-size: 170%; }}
|
filemanager/UploadHandler.php
CHANGED
@@ -315,7 +315,7 @@ class UploadHandler {
|
|
315 |
$max_width / $img_width,
|
316 |
$max_height / $img_height
|
317 |
);
|
318 |
-
ini_set('memory_limit', '-1');
|
319 |
if (($scale >= 1) || (($max_width == NULL) && ($max_height == NULL))) {
|
320 |
if ($file_path !== $new_file_path) {
|
321 |
return copy($file_path, $new_file_path);
|
@@ -541,7 +541,7 @@ class UploadHandler {
|
|
541 |
if (!in_array($orientation, array(3, 6, 8))) {
|
542 |
return false;
|
543 |
}
|
544 |
-
ini_set('memory_limit', '-1');
|
545 |
$image = @imagecreatefromjpeg($file_path);
|
546 |
switch ($orientation) {
|
547 |
case 3:
|
315 |
$max_width / $img_width,
|
316 |
$max_height / $img_height
|
317 |
);
|
318 |
+
@ini_set('memory_limit', '-1');
|
319 |
if (($scale >= 1) || (($max_width == NULL) && ($max_height == NULL))) {
|
320 |
if ($file_path !== $new_file_path) {
|
321 |
return copy($file_path, $new_file_path);
|
541 |
if (!in_array($orientation, array(3, 6, 8))) {
|
542 |
return false;
|
543 |
}
|
544 |
+
@ini_set('memory_limit', '-1');
|
545 |
$image = @imagecreatefromjpeg($file_path);
|
546 |
switch ($orientation) {
|
547 |
case 3:
|
frontend/views/WDSViewSlider.php
CHANGED
@@ -25,14 +25,14 @@ class WDSViewSlider {
|
|
25 |
public function display($id, $from_shortcode = 0, $wds = 0) {
|
26 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
27 |
$slider_row = $this->model->get_slider_row_data($id);
|
28 |
-
if (!$slider_row->published) {
|
29 |
-
return;
|
30 |
-
}
|
31 |
-
$resolutions = array(320, 480, 640, 768, 800, 1024, 1366, 1824, 3000);
|
32 |
if (!$slider_row) {
|
33 |
echo WDW_S_Library::message(__('There is no slider selected or the slider was deleted.', 'wds'), 'error');
|
34 |
return;
|
35 |
}
|
|
|
|
|
|
|
|
|
36 |
$image_right_click = $slider_row->image_right_click;
|
37 |
|
38 |
$bull_position = $slider_row->bull_position;
|
@@ -43,6 +43,7 @@ class WDSViewSlider {
|
|
43 |
$slide_rows = $this->model->get_slide_rows_data($id);
|
44 |
if (!$slide_rows) {
|
45 |
echo WDW_S_Library::message(__('There are no slides in this slider.', 'wds'), 'error');
|
|
|
46 |
}
|
47 |
|
48 |
$image_width = $slider_row->width;
|
@@ -130,6 +131,7 @@ class WDSViewSlider {
|
|
130 |
global $wp;
|
131 |
$current_url = add_query_arg($wp->query_string, '', home_url($wp->request));
|
132 |
|
|
|
133 |
?>
|
134 |
<style>
|
135 |
#wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> {
|
@@ -664,7 +666,7 @@ class WDSViewSlider {
|
|
664 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["id"] = "<?php echo $slide_row->id; ?>";
|
665 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo addslashes(htmlspecialchars_decode ($slide_row->image_url,ENT_QUOTES)); ?>";
|
666 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo addslashes(htmlspecialchars_decode ($slide_row->thumb_url,ENT_QUOTES)); ?>";
|
667 |
-
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["is_video"] = "<?php echo $slide_row->type
|
668 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["slide_layers_count"] = 0;
|
669 |
<?php
|
670 |
$layers_row = $this->model->get_layers_row_data($slide_row->id);
|
@@ -762,41 +764,24 @@ class WDSViewSlider {
|
|
762 |
<div class="wds_slider_<?php echo $wds; ?>">
|
763 |
<?php
|
764 |
foreach ($slide_rows as $key => $slide_row) {
|
765 |
-
$is_video = $slide_row->type == "YOUTUBE" || $slide_row->type == "VIMEO";
|
766 |
if ($slide_row->id == $current_image_id) {
|
767 |
-
|
768 |
-
|
769 |
-
}
|
770 |
-
else {
|
771 |
-
$play_pause_button_display = '';
|
772 |
-
}
|
773 |
$current_key = $key;
|
774 |
$image_div_num = '';
|
775 |
}
|
776 |
else {
|
777 |
$image_div_num = '_second';
|
778 |
}
|
779 |
-
$share_image_url = urlencode($is_video ? $slide_row->thumb_url : $slide_row->image_url);
|
780 |
-
$share_url = add_query_arg(array('action' => 'WDSShare', 'image_id' => $slide_row->id, 'curr_url' => $current_url), admin_url('admin-ajax.php'));
|
781 |
?>
|
782 |
<span class="wds_slideshow_image<?php echo $image_div_num; ?>_spun_<?php echo $wds; ?>" id="wds_image_id_<?php echo $wds; ?>_<?php echo $slide_row->id; ?>">
|
783 |
<span class="wds_slideshow_image_spun1_<?php echo $wds; ?>">
|
784 |
<span class="wds_slideshow_image_spun2_<?php echo $wds; ?>">
|
785 |
-
<?php
|
786 |
-
if (!$is_video) {
|
787 |
-
?>
|
788 |
<div img_id="wds_slideshow_image<?php echo $image_div_num; ?>_<?php echo $wds; ?>"
|
789 |
class="wds_slideshow_image_<?php echo $wds; ?>"
|
790 |
onclick="<?php echo $slide_row->link ? 'window.open(\'' . $slide_row->link . '\', \'' . ($slide_row->target_attr_slide ? '_blank' : '_self') . '\')' : ''; ?>"
|
791 |
style="<?php echo $slide_row->link ? 'cursor: pointer;' : ''; ?><?php echo ((!$slider_row->preload_images || $image_div_num == '') ? "background-image: url('" . addslashes(htmlspecialchars_decode ($slide_row->image_url,ENT_QUOTES)) . "');" : ""); ?>">
|
792 |
-
|
793 |
-
}
|
794 |
-
else {
|
795 |
-
?>
|
796 |
-
<div img_id="wds_slideshow_image<?php echo $image_div_num; ?>_<?php echo $wds; ?>" class="wds_slideshow_video_<?php echo $wds; ?>" image_id="<?php echo $slide_row->id; ?>">
|
797 |
-
<iframe class="wds_video_frame_<?php echo $wds; ?>" src="<?php echo ($slide_row->type == "YOUTUBE" ? "//www.youtube.com/embed/" . $slide_row->image_url . "?enablejsapi=1&wmode=transparent" : "//player.vimeo.com/video/" . $slide_row->image_url . "?api=1"); ?>" frameborder="0" allowfullscreen style="width:100%; height:100%;"></iframe>
|
798 |
-
<?php
|
799 |
-
}
|
800 |
$layers_row = $this->model->get_layers_row_data($slide_row->id);
|
801 |
if ($layers_row) {
|
802 |
foreach ($layers_row as $key => $layer) {
|
@@ -821,7 +806,7 @@ class WDSViewSlider {
|
|
821 |
<span class="wds_layer_<?php echo $layer->id; ?>" id="<?php echo $prefix; ?>" wds_fsize="<?php echo $layer->size; ?>"
|
822 |
style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?>
|
823 |
<?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>
|
824 |
-
word-break: <?php echo ($layer->image_scale ? '
|
825 |
text-align: initial; <?php echo $layer->link ? 'cursor: pointer; ' : ''; ?>
|
826 |
opacity: 1;
|
827 |
filter: 'Alpha(opacity=100)';
|
@@ -1310,13 +1295,19 @@ class WDSViewSlider {
|
|
1310 |
?>
|
1311 |
/* Pause videos.*/
|
1312 |
jQuery("#wds_slideshow_image_container_<?php echo $wds; ?>").find("iframe").each(function () {
|
1313 |
-
jQuery(this)[0].contentWindow
|
1314 |
-
|
|
|
|
|
|
|
1315 |
});
|
1316 |
/* Pause layer videos.*/
|
1317 |
jQuery(".wds_video_layer_frame_<?php echo $wds; ?>").each(function () {
|
1318 |
-
jQuery(this)[0].contentWindow
|
1319 |
-
|
|
|
|
|
|
|
1320 |
});
|
1321 |
if (wds_data_<?php echo $wds; ?>[key]) {
|
1322 |
if (jQuery('.wds_ctrl_btn_<?php echo $wds; ?>').hasClass('fa-pause') || ('<?php echo $autoplay; ?>')) {
|
@@ -1364,7 +1355,7 @@ class WDSViewSlider {
|
|
1364 |
var current_image_class = "#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[current_key]["id"];
|
1365 |
var next_image_class = "#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[key]["id"];
|
1366 |
<?php if ($slider_row->preload_images) { ?>
|
1367 |
-
if (
|
1368 |
jQuery(next_image_class).find(".wds_slideshow_image_<?php echo $wds; ?>").css("background-image", 'url("' + wds_data_<?php echo $wds; ?>[key]["image_url"] + '")');
|
1369 |
}
|
1370 |
<?php } ?>
|
@@ -1494,14 +1485,14 @@ class WDSViewSlider {
|
|
1494 |
}
|
1495 |
}
|
1496 |
}
|
1497 |
-
|
1498 |
if ($bull_position != 'none' && $slides_count > 1) {
|
1499 |
?>
|
1500 |
wds_move_dots_<?php echo $wds; ?>();
|
1501 |
<?php
|
1502 |
}
|
1503 |
?>
|
1504 |
-
if (wds_data_<?php echo $wds; ?>[key]["is_video"]) {
|
1505 |
jQuery("#wds_slideshow_play_pause_<?php echo $wds; ?>").css({display: 'none'});
|
1506 |
}
|
1507 |
else {
|
@@ -1586,7 +1577,7 @@ class WDSViewSlider {
|
|
1586 |
paddingRight: (parseFloat(jQuery(this).attr("wds_fpaddingr")) * ratio) + "px",
|
1587 |
paddingTop: (parseFloat(jQuery(this).attr("wds_fpaddingt")) * ratio) + "px",
|
1588 |
paddingBottom: (parseFloat(jQuery(this).attr("wds_fpaddingb")) * ratio) + "px",
|
1589 |
-
})
|
1590 |
});
|
1591 |
}
|
1592 |
/* Generate background position for Zoom Fade effect.*/
|
@@ -1617,7 +1608,8 @@ class WDSViewSlider {
|
|
1617 |
maxWidth: "none"
|
1618 |
});
|
1619 |
}
|
1620 |
-
jQuery(
|
|
|
1621 |
<?php
|
1622 |
if ($enable_slideshow_autoplay && $slider_row->stop_animation) {
|
1623 |
?>
|
@@ -1781,7 +1773,7 @@ class WDSViewSlider {
|
|
1781 |
jQuery("<img/>")
|
1782 |
.load(function() { if (preload_key < wds_data_<?php echo $wds; ?>.length - 1) wds_preload_<?php echo $wds; ?>(preload_key + 1); })
|
1783 |
.error(function() { if (preload_key < wds_data_<?php echo $wds; ?>.length - 1) wds_preload_<?php echo $wds; ?>(preload_key + 1); })
|
1784 |
-
.attr("src", (
|
1785 |
}
|
1786 |
wds_preload_<?php echo $wds; ?>(0);
|
1787 |
<?php } ?>
|
25 |
public function display($id, $from_shortcode = 0, $wds = 0) {
|
26 |
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
27 |
$slider_row = $this->model->get_slider_row_data($id);
|
|
|
|
|
|
|
|
|
28 |
if (!$slider_row) {
|
29 |
echo WDW_S_Library::message(__('There is no slider selected or the slider was deleted.', 'wds'), 'error');
|
30 |
return;
|
31 |
}
|
32 |
+
if (!$slider_row->published) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
$resolutions = array(320, 480, 640, 768, 800, 1024, 1366, 1824, 3000);
|
36 |
$image_right_click = $slider_row->image_right_click;
|
37 |
|
38 |
$bull_position = $slider_row->bull_position;
|
43 |
$slide_rows = $this->model->get_slide_rows_data($id);
|
44 |
if (!$slide_rows) {
|
45 |
echo WDW_S_Library::message(__('There are no slides in this slider.', 'wds'), 'error');
|
46 |
+
return;
|
47 |
}
|
48 |
|
49 |
$image_width = $slider_row->width;
|
131 |
global $wp;
|
132 |
$current_url = add_query_arg($wp->query_string, '', home_url($wp->request));
|
133 |
|
134 |
+
$current_image_url = '';
|
135 |
?>
|
136 |
<style>
|
137 |
#wds_container1_<?php echo $wds; ?> #wds_container2_<?php echo $wds; ?> {
|
666 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["id"] = "<?php echo $slide_row->id; ?>";
|
667 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo addslashes(htmlspecialchars_decode ($slide_row->image_url,ENT_QUOTES)); ?>";
|
668 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo addslashes(htmlspecialchars_decode ($slide_row->thumb_url,ENT_QUOTES)); ?>";
|
669 |
+
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["is_video"] = "<?php echo $slide_row->type ?>";
|
670 |
wds_data_<?php echo $wds; ?>["<?php echo $key; ?>"]["slide_layers_count"] = 0;
|
671 |
<?php
|
672 |
$layers_row = $this->model->get_layers_row_data($slide_row->id);
|
764 |
<div class="wds_slider_<?php echo $wds; ?>">
|
765 |
<?php
|
766 |
foreach ($slide_rows as $key => $slide_row) {
|
|
|
767 |
if ($slide_row->id == $current_image_id) {
|
768 |
+
$play_pause_button_display = '';
|
769 |
+
$current_image_url = $slide_row->image_url;
|
|
|
|
|
|
|
|
|
770 |
$current_key = $key;
|
771 |
$image_div_num = '';
|
772 |
}
|
773 |
else {
|
774 |
$image_div_num = '_second';
|
775 |
}
|
|
|
|
|
776 |
?>
|
777 |
<span class="wds_slideshow_image<?php echo $image_div_num; ?>_spun_<?php echo $wds; ?>" id="wds_image_id_<?php echo $wds; ?>_<?php echo $slide_row->id; ?>">
|
778 |
<span class="wds_slideshow_image_spun1_<?php echo $wds; ?>">
|
779 |
<span class="wds_slideshow_image_spun2_<?php echo $wds; ?>">
|
|
|
|
|
|
|
780 |
<div img_id="wds_slideshow_image<?php echo $image_div_num; ?>_<?php echo $wds; ?>"
|
781 |
class="wds_slideshow_image_<?php echo $wds; ?>"
|
782 |
onclick="<?php echo $slide_row->link ? 'window.open(\'' . $slide_row->link . '\', \'' . ($slide_row->target_attr_slide ? '_blank' : '_self') . '\')' : ''; ?>"
|
783 |
style="<?php echo $slide_row->link ? 'cursor: pointer;' : ''; ?><?php echo ((!$slider_row->preload_images || $image_div_num == '') ? "background-image: url('" . addslashes(htmlspecialchars_decode ($slide_row->image_url,ENT_QUOTES)) . "');" : ""); ?>">
|
784 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
785 |
$layers_row = $this->model->get_layers_row_data($slide_row->id);
|
786 |
if ($layers_row) {
|
787 |
foreach ($layers_row as $key => $layer) {
|
806 |
<span class="wds_layer_<?php echo $layer->id; ?>" id="<?php echo $prefix; ?>" wds_fsize="<?php echo $layer->size; ?>"
|
807 |
style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?>
|
808 |
<?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>
|
809 |
+
word-break: <?php echo ($layer->image_scale ? 'normal' : 'break-all'); ?>;
|
810 |
text-align: initial; <?php echo $layer->link ? 'cursor: pointer; ' : ''; ?>
|
811 |
opacity: 1;
|
812 |
filter: 'Alpha(opacity=100)';
|
1295 |
?>
|
1296 |
/* Pause videos.*/
|
1297 |
jQuery("#wds_slideshow_image_container_<?php echo $wds; ?>").find("iframe").each(function () {
|
1298 |
+
if (typeof jQuery(this)[0].contentWindow != "undefined") {
|
1299 |
+
jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
|
1300 |
+
jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
|
1301 |
+
jQuery(this)[0].contentWindow.postMessage('pause', '*');
|
1302 |
+
}
|
1303 |
});
|
1304 |
/* Pause layer videos.*/
|
1305 |
jQuery(".wds_video_layer_frame_<?php echo $wds; ?>").each(function () {
|
1306 |
+
if (typeof jQuery(this)[0].contentWindow != "undefined") {
|
1307 |
+
jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
|
1308 |
+
jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*");
|
1309 |
+
jQuery(this)[0].contentWindow.postMessage('pause', '*');
|
1310 |
+
}
|
1311 |
});
|
1312 |
if (wds_data_<?php echo $wds; ?>[key]) {
|
1313 |
if (jQuery('.wds_ctrl_btn_<?php echo $wds; ?>').hasClass('fa-pause') || ('<?php echo $autoplay; ?>')) {
|
1355 |
var current_image_class = "#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[current_key]["id"];
|
1356 |
var next_image_class = "#wds_image_id_<?php echo $wds; ?>_" + wds_data_<?php echo $wds; ?>[key]["id"];
|
1357 |
<?php if ($slider_row->preload_images) { ?>
|
1358 |
+
if (wds_data_<?php echo $wds; ?>[key]["is_video"] == 'image') {
|
1359 |
jQuery(next_image_class).find(".wds_slideshow_image_<?php echo $wds; ?>").css("background-image", 'url("' + wds_data_<?php echo $wds; ?>[key]["image_url"] + '")');
|
1360 |
}
|
1361 |
<?php } ?>
|
1485 |
}
|
1486 |
}
|
1487 |
}
|
1488 |
+
<?php
|
1489 |
if ($bull_position != 'none' && $slides_count > 1) {
|
1490 |
?>
|
1491 |
wds_move_dots_<?php echo $wds; ?>();
|
1492 |
<?php
|
1493 |
}
|
1494 |
?>
|
1495 |
+
if (wds_data_<?php echo $wds; ?>[key]["is_video"] != 'image') {
|
1496 |
jQuery("#wds_slideshow_play_pause_<?php echo $wds; ?>").css({display: 'none'});
|
1497 |
}
|
1498 |
else {
|
1577 |
paddingRight: (parseFloat(jQuery(this).attr("wds_fpaddingr")) * ratio) + "px",
|
1578 |
paddingTop: (parseFloat(jQuery(this).attr("wds_fpaddingt")) * ratio) + "px",
|
1579 |
paddingBottom: (parseFloat(jQuery(this).attr("wds_fpaddingb")) * ratio) + "px",
|
1580 |
+
});
|
1581 |
});
|
1582 |
}
|
1583 |
/* Generate background position for Zoom Fade effect.*/
|
1608 |
maxWidth: "none"
|
1609 |
});
|
1610 |
}
|
1611 |
+
jQuery("<img/>").attr("src", "<?php echo $current_image_url; ?>").load(function() {
|
1612 |
+
jQuery(this).remove();
|
1613 |
<?php
|
1614 |
if ($enable_slideshow_autoplay && $slider_row->stop_animation) {
|
1615 |
?>
|
1773 |
jQuery("<img/>")
|
1774 |
.load(function() { if (preload_key < wds_data_<?php echo $wds; ?>.length - 1) wds_preload_<?php echo $wds; ?>(preload_key + 1); })
|
1775 |
.error(function() { if (preload_key < wds_data_<?php echo $wds; ?>.length - 1) wds_preload_<?php echo $wds; ?>(preload_key + 1); })
|
1776 |
+
.attr("src", (wds_data_<?php echo $wds; ?>[preload_key]["is_video"] == 'image' ? wds_data_<?php echo $wds; ?>[preload_key]["image_url"] : ""));
|
1777 |
}
|
1778 |
wds_preload_<?php echo $wds; ?>(0);
|
1779 |
<?php } ?>
|
js/wds.js
CHANGED
@@ -280,6 +280,15 @@ function wds_success(form_id, end) {
|
|
280 |
jQuery("#" + form_id).submit();
|
281 |
break;
|
282 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
case "set_watermark": {
|
284 |
if (end) {
|
285 |
if (jQuery("input[name=built_in_watermark_type]:checked").val() == 'none') {
|
@@ -1245,7 +1254,6 @@ function wds_add_image_url(id) {
|
|
1245 |
jQuery('.opacity_add_image_url').show();
|
1246 |
return false;
|
1247 |
}
|
1248 |
-
|
1249 |
function spider_set_image_url(id) {
|
1250 |
if (!jQuery("#image_url_input").val()) {
|
1251 |
return false;
|
280 |
jQuery("#" + form_id).submit();
|
281 |
break;
|
282 |
}
|
283 |
+
case "preview": {
|
284 |
+
if (end) {
|
285 |
+
tb_show("Preview", wds_preview_url.replace("sliderID", jQuery("#current_id").val()));
|
286 |
+
}
|
287 |
+
else {
|
288 |
+
wds_action_after_save(form_id);
|
289 |
+
}
|
290 |
+
break;
|
291 |
+
}
|
292 |
case "set_watermark": {
|
293 |
if (end) {
|
294 |
if (jQuery("input[name=built_in_watermark_type]:checked").val() == 'none') {
|
1254 |
jQuery('.opacity_add_image_url').show();
|
1255 |
return false;
|
1256 |
}
|
|
|
1257 |
function spider_set_image_url(id) {
|
1258 |
if (!jQuery("#image_url_input").val()) {
|
1259 |
return false;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
|
|
4 |
Tags: 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 slider, image slideshow, javascript slider, javascript slideshow, jquery slider, jquery slideshow, Photo Slider, posts slider, responsive slider, responsive slideshow, sidebar, slide, slide show, slider, slider plugin, slider widget, slides, slideshow,slideshow manager, slideshow plugin, vertical slider, video slider, video slideshow,vimeo slideshow, vimeo slider, widget slider, widget slideshow, wordpress slider, wordpress slideshow, wp slider, youtube slider, youtube slideshow, post slider, 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.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -139,7 +139,13 @@ After downloading the ZIP file of the slider plugin,
|
|
139 |
|
140 |
|
141 |
== Changelog ==
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
New: Parallax effect.
|
144 |
|
145 |
= 1.0.25 =
|
4 |
Tags: 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 slider, image slideshow, javascript slider, javascript slideshow, jquery slider, jquery slideshow, Photo Slider, posts slider, responsive slider, responsive slideshow, sidebar, slide, slide show, slider, slider plugin, slider widget, slides, slideshow,slideshow manager, slideshow plugin, vertical slider, video slider, video slideshow,vimeo slideshow, vimeo slider, widget slider, widget slideshow, wordpress slider, wordpress slideshow, wp slider, youtube slider, youtube slideshow, post slider, 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.2
|
7 |
+
Stable tag: 1.0.27
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
139 |
|
140 |
|
141 |
== Changelog ==
|
142 |
+
|
143 |
+
= 1.0.27 =
|
144 |
+
New: Slider preview in admin.
|
145 |
+
Changed: Improved slide load.
|
146 |
+
Fixed: Play/pause button.
|
147 |
+
|
148 |
+
= 1.0.26 =
|
149 |
New: Parallax effect.
|
150 |
|
151 |
= 1.0.25 =
|
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.0.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -107,6 +107,7 @@ function wds_frontend() {
|
|
107 |
}
|
108 |
}
|
109 |
|
|
|
110 |
function wds_ajax() {
|
111 |
if (function_exists('current_user_can')) {
|
112 |
if (!current_user_can('manage_options')) {
|
@@ -149,6 +150,34 @@ function wds_front_end($id) {
|
|
149 |
return;
|
150 |
}
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
function wds_media_button($context) {
|
153 |
global $pagenow;
|
154 |
if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php'))) {
|
@@ -335,7 +364,7 @@ register_activation_hook(__FILE__, 'wds_activate');
|
|
335 |
|
336 |
function wds_install() {
|
337 |
$version = get_option("wds_version");
|
338 |
-
$new_version = '1.0.
|
339 |
if ($version && version_compare($version, $new_version, '<')) {
|
340 |
require_once WD_S_DIR . "/sliders-update.php";
|
341 |
wds_update($version);
|
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.0.27
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
107 |
}
|
108 |
}
|
109 |
|
110 |
+
add_action('wp_ajax_WDSPreview', 'wds_preview');
|
111 |
function wds_ajax() {
|
112 |
if (function_exists('current_user_can')) {
|
113 |
if (!current_user_can('manage_options')) {
|
150 |
return;
|
151 |
}
|
152 |
|
153 |
+
function wds_preview() {
|
154 |
+
require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
|
155 |
+
$page = WDW_S_Library::get('action');
|
156 |
+
if ($page != '' && $page == 'WDSPreview') {
|
157 |
+
$version = get_option("wds_version");
|
158 |
+
wp_print_scripts('jquery');
|
159 |
+
wp_register_script('wds_jquery_mobile', WD_S_URL . '/js/jquery.mobile.js', array(), $version);
|
160 |
+
wp_print_scripts('wds_jquery_mobile');
|
161 |
+
wp_register_style('wds_frontend', WD_S_URL . '/css/wds_frontend.css', array(), $version);
|
162 |
+
wp_print_styles('wds_frontend');
|
163 |
+
wp_register_style('wds_effects', WD_S_URL . '/css/wds_effects.css', array(), $version);
|
164 |
+
wp_print_styles('wds_effects');
|
165 |
+
wp_register_style('wds_font-awesome', WD_S_URL . '/css/font-awesome-4.0.1/font-awesome.css', array(), '4.0.1');
|
166 |
+
wp_print_styles('wds_font-awesome');
|
167 |
+
$id = WDW_S_Library::get('slider_id');
|
168 |
+
?>
|
169 |
+
<div class="wds_preview_cont1">
|
170 |
+
<div class="wds_preview_cont2">
|
171 |
+
<?php
|
172 |
+
wds_front_end($id, TRUE);
|
173 |
+
?>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
<?php
|
177 |
+
}
|
178 |
+
die();
|
179 |
+
}
|
180 |
+
|
181 |
function wds_media_button($context) {
|
182 |
global $pagenow;
|
183 |
if (in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php'))) {
|
364 |
|
365 |
function wds_install() {
|
366 |
$version = get_option("wds_version");
|
367 |
+
$new_version = '1.0.27';
|
368 |
if ($version && version_compare($version, $new_version, '<')) {
|
369 |
require_once WD_S_DIR . "/sliders-update.php";
|
370 |
wds_update($version);
|