Version Description
- Changed: Save in data base relative urls instead of absolute urls.
Download this release
Release Info
Developer | webdorado |
Plugin | Slider by WD – Responsive Slider |
Version | 1.1.36 |
Comparing to | |
See all releases |
Code changes from version 1.1.35 to 1.1.36
- admin/controllers/WDSControllerSliders_wds.php +26 -1
- admin/models/WDSModelSliders_wds.php +16 -3
- frontend/models/WDSModelSlider.php +22 -2
- readme.txt +4 -1
- slider-wd.php +2 -2
admin/controllers/WDSControllerSliders_wds.php
CHANGED
@@ -73,6 +73,12 @@ class WDSControllerSliders_wds {
|
|
73 |
|
74 |
public function save_slider_db() {
|
75 |
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
$slider_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
77 |
$slider_data = (isset($_POST['slider_data']) ? stripslashes($_POST['slider_data']) : '');
|
78 |
$params_array = json_decode($slider_data, TRUE);
|
@@ -94,6 +100,7 @@ class WDSControllerSliders_wds {
|
|
94 |
$shuffle = ((isset($params_array['shuffle'])) ? (int) esc_html(stripslashes($params_array['shuffle'])) : 0);
|
95 |
$music = ((isset($params_array['music'])) ? (int) esc_html(stripslashes($params_array['music'])) : 0);
|
96 |
$music_url = ((isset($params_array['music_url'])) ? esc_html(stripslashes($params_array['music_url'])) : '');
|
|
|
97 |
$preload_images = ((isset($params_array['preload_images'])) ? (int) esc_html(stripslashes($params_array['preload_images'])) : 1);
|
98 |
$background_color = ((isset($params_array['background_color'])) ? esc_html(stripslashes($params_array['background_color'])) : '000000');
|
99 |
$background_transparent = ((isset($params_array['background_transparent'])) ? esc_html(stripslashes($params_array['background_transparent'])) : 100);
|
@@ -144,6 +151,7 @@ class WDSControllerSliders_wds {
|
|
144 |
$built_in_watermark_position = (isset($params_array['built_in_watermark_position']) ? esc_html(stripslashes($params_array['built_in_watermark_position'])) : 'middle-center');
|
145 |
$built_in_watermark_size = (isset($params_array['built_in_watermark_size']) ? esc_html(stripslashes($params_array['built_in_watermark_size'])) : 15);
|
146 |
$built_in_watermark_url = (isset($params_array['built_in_watermark_url']) ? esc_html(stripslashes($params_array['built_in_watermark_url'])) : '');
|
|
|
147 |
$built_in_watermark_text = (isset($params_array['built_in_watermark_text']) ? esc_html(stripslashes($params_array['built_in_watermark_text'])) : 'web-dorado.com');
|
148 |
$built_in_watermark_opacity = (isset($params_array['built_in_watermark_opacity']) ? esc_html(stripslashes($params_array['built_in_watermark_opacity'])) : 70);
|
149 |
$built_in_watermark_font_size = (isset($params_array['built_in_watermark_font_size']) ? esc_html(stripslashes($params_array['built_in_watermark_font_size'])) : 20);
|
@@ -159,18 +167,28 @@ class WDSControllerSliders_wds {
|
|
159 |
$timer_bar_transparent = (isset($params_array['timer_bar_transparent']) ? esc_html(stripslashes($params_array['timer_bar_transparent'])) : 50);
|
160 |
$stop_animation = ((isset($params_array['stop_animation'])) ? (int) esc_html(stripslashes($params_array['stop_animation'])) : 0);
|
161 |
$right_butt_url = (isset($params_array['right_butt_url']) ? esc_html(stripslashes($params_array['right_butt_url'])) : '');
|
|
|
162 |
$left_butt_url = (isset($params_array['left_butt_url']) ? esc_html(stripslashes($params_array['left_butt_url'])) : '');
|
|
|
163 |
$right_butt_hov_url = (isset($params_array['right_butt_hov_url']) ? esc_html(stripslashes($params_array['right_butt_hov_url'])) : '');
|
|
|
164 |
$left_butt_hov_url = (isset($params_array['left_butt_hov_url']) ? esc_html(stripslashes($params_array['left_butt_hov_url'])) : '');
|
|
|
165 |
$rl_butt_img_or_not = (isset($params_array['rl_butt_img_or_not']) ? esc_html(stripslashes($params_array['rl_butt_img_or_not'])) : 'style');
|
166 |
$bullets_img_main_url = (isset($params_array['bullets_img_main_url']) ? esc_html(stripslashes($params_array['bullets_img_main_url'])) : '');
|
|
|
167 |
$bullets_img_hov_url = (isset($params_array['bullets_img_hov_url']) ? esc_html(stripslashes($params_array['bullets_img_hov_url'])) : '');
|
|
|
168 |
$bull_butt_img_or_not = (isset($params_array['bull_butt_img_or_not']) ? esc_html(stripslashes($params_array['bull_butt_img_or_not'])) : 'style');
|
169 |
$play_paus_butt_img_or_not = (isset($params_array['play_paus_butt_img_or_not']) ? esc_html(stripslashes($params_array['play_paus_butt_img_or_not'])) : 'style');
|
170 |
$play_butt_url = (isset($params_array['play_butt_url']) ? esc_html(stripslashes($params_array['play_butt_url'])) : '');
|
|
|
171 |
$play_butt_hov_url = (isset($params_array['play_butt_hov_url']) ? esc_html(stripslashes($params_array['play_butt_hov_url'])) : '');
|
|
|
172 |
$paus_butt_url = (isset($params_array['paus_butt_url']) ? esc_html(stripslashes($params_array['paus_butt_url'])) : '');
|
|
|
173 |
$paus_butt_hov_url = (isset($params_array['paus_butt_hov_url']) ? esc_html(stripslashes($params_array['paus_butt_hov_url'])) : '');
|
|
|
174 |
$start_slide_num = ((isset($params_array['start_slide_num'])) ? (int) stripslashes($params_array['start_slide_num']) : 1);
|
175 |
$effect_duration = ((isset($params_array['effect_duration'])) ? (int) stripslashes($params_array['effect_duration']) : 800);
|
176 |
$carousel = 0;
|
@@ -341,7 +359,7 @@ class WDSControllerSliders_wds {
|
|
341 |
else {
|
342 |
$allow = TRUE;
|
343 |
}
|
344 |
-
$slides_data = (isset($_POST['slides']) ? $_POST['slides'] :
|
345 |
foreach ($slides_data as $slide_data) {
|
346 |
$params_array = json_decode(stripslashes($slide_data), TRUE);
|
347 |
$slide_id = (isset($params_array['id']) ? $params_array['id'] : 0);
|
@@ -357,7 +375,9 @@ class WDSControllerSliders_wds {
|
|
357 |
$target_attr_slide = ((isset($params_array['target_attr_slide' . $slide_id])) ? esc_html(stripslashes($params_array['target_attr_slide' . $slide_id])) : 0);
|
358 |
$link = ((isset($params_array['link' . $slide_id])) ? esc_html(stripslashes($params_array['link' . $slide_id])) : (($type == 'video') ? 0 : ''));
|
359 |
$image_url = ((isset($params_array['image_url' . $slide_id])) ? esc_html(stripslashes($params_array['image_url' . $slide_id])) : '');
|
|
|
360 |
$thumb_url = ((isset($params_array['thumb_url' . $slide_id])) ? esc_html(stripslashes($params_array['thumb_url' . $slide_id])) : '');
|
|
|
361 |
if (strpos($slide_id, 'pr') !== FALSE) {
|
362 |
$save = $wpdb->insert($wpdb->prefix . 'wdsslide', array(
|
363 |
'slider_id' => $slider_id,
|
@@ -430,6 +450,7 @@ class WDSControllerSliders_wds {
|
|
430 |
$border_radius = ((isset($params_array_layer['border_radius'])) ? esc_html(stripslashes($params_array_layer['border_radius'])) : '');
|
431 |
$shadow = ((isset($params_array_layer['shadow'])) ? esc_html(stripslashes($params_array_layer['shadow'])) : '');
|
432 |
$image_url = ((isset($params_array_layer['image_url'])) ? esc_html(stripslashes($params_array_layer['image_url'])) : '');
|
|
|
433 |
$image_width = ((isset($params_array_layer['image_width'])) ? esc_html(stripslashes($params_array_layer['image_width'])) : '');
|
434 |
$image_height = ((isset($params_array_layer['image_height'])) ? esc_html(stripslashes($params_array_layer['image_height'])) : '');
|
435 |
$image_scale = ((isset($params_array_layer['image_scale'])) ? esc_html(stripslashes($params_array_layer['image_scale'])) : '');
|
@@ -575,6 +596,7 @@ class WDSControllerSliders_wds {
|
|
575 |
case 'text': {
|
576 |
foreach ($slider_images as $slider_image) {
|
577 |
if ($slider_image) {
|
|
|
578 |
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
579 |
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
580 |
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
@@ -594,6 +616,7 @@ class WDSControllerSliders_wds {
|
|
594 |
case 'image': {
|
595 |
foreach ($slider_images as $slider_image) {
|
596 |
if ($slider_image) {
|
|
|
597 |
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
598 |
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
599 |
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
@@ -605,6 +628,7 @@ class WDSControllerSliders_wds {
|
|
605 |
if (!file_exists($new_image)) {
|
606 |
copy($slider_image_dir, $new_image);
|
607 |
}
|
|
|
608 |
$watermark_image_dir = str_replace(site_url() . '/', ABSPATH, $slider->built_in_watermark_url);
|
609 |
$this->set_image_watermark($slider_image_dir, $slider_image_dir, $watermark_image_dir, $slider->built_in_watermark_size, $slider->built_in_watermark_size, $slider->built_in_watermark_position);
|
610 |
}
|
@@ -626,6 +650,7 @@ class WDSControllerSliders_wds {
|
|
626 |
$slider_images = $wpdb->get_col($wpdb->prepare('SELECT image_url FROM ' . $wpdb->prefix . 'wdsslide WHERE `slider_id`="%d"', $slider_id));
|
627 |
foreach ($slider_images as $slider_image) {
|
628 |
if ($slider_image) {
|
|
|
629 |
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
630 |
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
631 |
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
73 |
|
74 |
public function save_slider_db() {
|
75 |
global $wpdb;
|
76 |
+
if (get_option("wds_theme_version")) {
|
77 |
+
$allow = FALSE;
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
$allow = TRUE;
|
81 |
+
}
|
82 |
$slider_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : 0);
|
83 |
$slider_data = (isset($_POST['slider_data']) ? stripslashes($_POST['slider_data']) : '');
|
84 |
$params_array = json_decode($slider_data, TRUE);
|
100 |
$shuffle = ((isset($params_array['shuffle'])) ? (int) esc_html(stripslashes($params_array['shuffle'])) : 0);
|
101 |
$music = ((isset($params_array['music'])) ? (int) esc_html(stripslashes($params_array['music'])) : 0);
|
102 |
$music_url = ((isset($params_array['music_url'])) ? esc_html(stripslashes($params_array['music_url'])) : '');
|
103 |
+
$music_url = str_replace(site_url(), '{site_url}', $music_url);
|
104 |
$preload_images = ((isset($params_array['preload_images'])) ? (int) esc_html(stripslashes($params_array['preload_images'])) : 1);
|
105 |
$background_color = ((isset($params_array['background_color'])) ? esc_html(stripslashes($params_array['background_color'])) : '000000');
|
106 |
$background_transparent = ((isset($params_array['background_transparent'])) ? esc_html(stripslashes($params_array['background_transparent'])) : 100);
|
151 |
$built_in_watermark_position = (isset($params_array['built_in_watermark_position']) ? esc_html(stripslashes($params_array['built_in_watermark_position'])) : 'middle-center');
|
152 |
$built_in_watermark_size = (isset($params_array['built_in_watermark_size']) ? esc_html(stripslashes($params_array['built_in_watermark_size'])) : 15);
|
153 |
$built_in_watermark_url = (isset($params_array['built_in_watermark_url']) ? esc_html(stripslashes($params_array['built_in_watermark_url'])) : '');
|
154 |
+
$built_in_watermark_url = str_replace(site_url(), '{site_url}', $built_in_watermark_url);
|
155 |
$built_in_watermark_text = (isset($params_array['built_in_watermark_text']) ? esc_html(stripslashes($params_array['built_in_watermark_text'])) : 'web-dorado.com');
|
156 |
$built_in_watermark_opacity = (isset($params_array['built_in_watermark_opacity']) ? esc_html(stripslashes($params_array['built_in_watermark_opacity'])) : 70);
|
157 |
$built_in_watermark_font_size = (isset($params_array['built_in_watermark_font_size']) ? esc_html(stripslashes($params_array['built_in_watermark_font_size'])) : 20);
|
167 |
$timer_bar_transparent = (isset($params_array['timer_bar_transparent']) ? esc_html(stripslashes($params_array['timer_bar_transparent'])) : 50);
|
168 |
$stop_animation = ((isset($params_array['stop_animation'])) ? (int) esc_html(stripslashes($params_array['stop_animation'])) : 0);
|
169 |
$right_butt_url = (isset($params_array['right_butt_url']) ? esc_html(stripslashes($params_array['right_butt_url'])) : '');
|
170 |
+
$right_butt_url = str_replace(site_url(), '{site_url}', $right_butt_url);
|
171 |
$left_butt_url = (isset($params_array['left_butt_url']) ? esc_html(stripslashes($params_array['left_butt_url'])) : '');
|
172 |
+
$left_butt_url = str_replace(site_url(), '{site_url}', $left_butt_url);
|
173 |
$right_butt_hov_url = (isset($params_array['right_butt_hov_url']) ? esc_html(stripslashes($params_array['right_butt_hov_url'])) : '');
|
174 |
+
$right_butt_hov_url = str_replace(site_url(), '{site_url}', $right_butt_hov_url);
|
175 |
$left_butt_hov_url = (isset($params_array['left_butt_hov_url']) ? esc_html(stripslashes($params_array['left_butt_hov_url'])) : '');
|
176 |
+
$left_butt_hov_url = str_replace(site_url(), '{site_url}', $left_butt_hov_url);
|
177 |
$rl_butt_img_or_not = (isset($params_array['rl_butt_img_or_not']) ? esc_html(stripslashes($params_array['rl_butt_img_or_not'])) : 'style');
|
178 |
$bullets_img_main_url = (isset($params_array['bullets_img_main_url']) ? esc_html(stripslashes($params_array['bullets_img_main_url'])) : '');
|
179 |
+
$bullets_img_main_url = str_replace(site_url(), '{site_url}', $bullets_img_main_url);
|
180 |
$bullets_img_hov_url = (isset($params_array['bullets_img_hov_url']) ? esc_html(stripslashes($params_array['bullets_img_hov_url'])) : '');
|
181 |
+
$bullets_img_hov_url = str_replace(site_url(), '{site_url}', $bullets_img_hov_url);
|
182 |
$bull_butt_img_or_not = (isset($params_array['bull_butt_img_or_not']) ? esc_html(stripslashes($params_array['bull_butt_img_or_not'])) : 'style');
|
183 |
$play_paus_butt_img_or_not = (isset($params_array['play_paus_butt_img_or_not']) ? esc_html(stripslashes($params_array['play_paus_butt_img_or_not'])) : 'style');
|
184 |
$play_butt_url = (isset($params_array['play_butt_url']) ? esc_html(stripslashes($params_array['play_butt_url'])) : '');
|
185 |
+
$play_butt_url = str_replace(site_url(), '{site_url}', $play_butt_url);
|
186 |
$play_butt_hov_url = (isset($params_array['play_butt_hov_url']) ? esc_html(stripslashes($params_array['play_butt_hov_url'])) : '');
|
187 |
+
$play_butt_hov_url = str_replace(site_url(), '{site_url}', $play_butt_hov_url);
|
188 |
$paus_butt_url = (isset($params_array['paus_butt_url']) ? esc_html(stripslashes($params_array['paus_butt_url'])) : '');
|
189 |
+
$paus_butt_url = str_replace(site_url(), '{site_url}', $paus_butt_url);
|
190 |
$paus_butt_hov_url = (isset($params_array['paus_butt_hov_url']) ? esc_html(stripslashes($params_array['paus_butt_hov_url'])) : '');
|
191 |
+
$paus_butt_hov_url = str_replace(site_url(), '{site_url}', $paus_butt_hov_url);
|
192 |
$start_slide_num = ((isset($params_array['start_slide_num'])) ? (int) stripslashes($params_array['start_slide_num']) : 1);
|
193 |
$effect_duration = ((isset($params_array['effect_duration'])) ? (int) stripslashes($params_array['effect_duration']) : 800);
|
194 |
$carousel = 0;
|
359 |
else {
|
360 |
$allow = TRUE;
|
361 |
}
|
362 |
+
$slides_data = (isset($_POST['slides']) ? $_POST['slides'] : array());
|
363 |
foreach ($slides_data as $slide_data) {
|
364 |
$params_array = json_decode(stripslashes($slide_data), TRUE);
|
365 |
$slide_id = (isset($params_array['id']) ? $params_array['id'] : 0);
|
375 |
$target_attr_slide = ((isset($params_array['target_attr_slide' . $slide_id])) ? esc_html(stripslashes($params_array['target_attr_slide' . $slide_id])) : 0);
|
376 |
$link = ((isset($params_array['link' . $slide_id])) ? esc_html(stripslashes($params_array['link' . $slide_id])) : (($type == 'video') ? 0 : ''));
|
377 |
$image_url = ((isset($params_array['image_url' . $slide_id])) ? esc_html(stripslashes($params_array['image_url' . $slide_id])) : '');
|
378 |
+
$image_url = str_replace(site_url(), '{site_url}', $image_url);
|
379 |
$thumb_url = ((isset($params_array['thumb_url' . $slide_id])) ? esc_html(stripslashes($params_array['thumb_url' . $slide_id])) : '');
|
380 |
+
$thumb_url = str_replace(site_url(), '{site_url}', $thumb_url);
|
381 |
if (strpos($slide_id, 'pr') !== FALSE) {
|
382 |
$save = $wpdb->insert($wpdb->prefix . 'wdsslide', array(
|
383 |
'slider_id' => $slider_id,
|
450 |
$border_radius = ((isset($params_array_layer['border_radius'])) ? esc_html(stripslashes($params_array_layer['border_radius'])) : '');
|
451 |
$shadow = ((isset($params_array_layer['shadow'])) ? esc_html(stripslashes($params_array_layer['shadow'])) : '');
|
452 |
$image_url = ((isset($params_array_layer['image_url'])) ? esc_html(stripslashes($params_array_layer['image_url'])) : '');
|
453 |
+
$image_url = str_replace(site_url(), '{site_url}', $image_url);
|
454 |
$image_width = ((isset($params_array_layer['image_width'])) ? esc_html(stripslashes($params_array_layer['image_width'])) : '');
|
455 |
$image_height = ((isset($params_array_layer['image_height'])) ? esc_html(stripslashes($params_array_layer['image_height'])) : '');
|
456 |
$image_scale = ((isset($params_array_layer['image_scale'])) ? esc_html(stripslashes($params_array_layer['image_scale'])) : '');
|
596 |
case 'text': {
|
597 |
foreach ($slider_images as $slider_image) {
|
598 |
if ($slider_image) {
|
599 |
+
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
600 |
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
601 |
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
602 |
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
616 |
case 'image': {
|
617 |
foreach ($slider_images as $slider_image) {
|
618 |
if ($slider_image) {
|
619 |
+
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
620 |
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
621 |
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
622 |
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
628 |
if (!file_exists($new_image)) {
|
629 |
copy($slider_image_dir, $new_image);
|
630 |
}
|
631 |
+
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
632 |
$watermark_image_dir = str_replace(site_url() . '/', ABSPATH, $slider->built_in_watermark_url);
|
633 |
$this->set_image_watermark($slider_image_dir, $slider_image_dir, $watermark_image_dir, $slider->built_in_watermark_size, $slider->built_in_watermark_size, $slider->built_in_watermark_position);
|
634 |
}
|
650 |
$slider_images = $wpdb->get_col($wpdb->prepare('SELECT image_url FROM ' . $wpdb->prefix . 'wdsslide WHERE `slider_id`="%d"', $slider_id));
|
651 |
foreach ($slider_images as $slider_image) {
|
652 |
if ($slider_image) {
|
653 |
+
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
654 |
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
655 |
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
656 |
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
admin/models/WDSModelSliders_wds.php
CHANGED
@@ -44,8 +44,8 @@ class WDSModelSliders_wds {
|
|
44 |
else {
|
45 |
foreach ($rows as $row) {
|
46 |
if ($row->type == 'image') {
|
47 |
-
$row->image_url = $row->image_url ? $row->image_url : WD_S_URL . '/images/no-image.png';
|
48 |
-
$row->thumb_url = $row->thumb_url ? $row->thumb_url : WD_S_URL . '/images/no-image.png';
|
49 |
}
|
50 |
}
|
51 |
}
|
@@ -57,7 +57,7 @@ class WDSModelSliders_wds {
|
|
57 |
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdslayer WHERE slide_id='%d' ORDER BY `depth` ASC", $slide_id));
|
58 |
foreach ($rows as $row) {
|
59 |
if ($row->type == 'image') {
|
60 |
-
$row->image_url = $row->image_url ? $row->image_url : WD_S_URL . '/images/no-image.png';
|
61 |
}
|
62 |
}
|
63 |
return $rows;
|
@@ -67,6 +67,7 @@ class WDSModelSliders_wds {
|
|
67 |
global $wpdb;
|
68 |
$prev_img_url = $wpdb->get_var($wpdb->prepare("SELECT `thumb_url` FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
|
69 |
$prev_img_url = $prev_img_url ? $prev_img_url : WD_S_URL . '/images/no-image.png';
|
|
|
70 |
return $prev_img_url;
|
71 |
}
|
72 |
|
@@ -96,6 +97,18 @@ class WDSModelSliders_wds {
|
|
96 |
$row->enable_bullets = $row->bull_position == 'none' ? 0 : 1;
|
97 |
$row->enable_filmstrip = $row->film_pos == 'none' ? 0 : 1;
|
98 |
$row->enable_time_bar = $row->timer_bar_type == 'none' ? 0 : 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
}
|
101 |
else {
|
44 |
else {
|
45 |
foreach ($rows as $row) {
|
46 |
if ($row->type == 'image') {
|
47 |
+
$row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WD_S_URL . '/images/no-image.png';
|
48 |
+
$row->thumb_url = $row->thumb_url ? str_replace('{site_url}', site_url(), $row->thumb_url) : WD_S_URL . '/images/no-image.png';
|
49 |
}
|
50 |
}
|
51 |
}
|
57 |
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdslayer WHERE slide_id='%d' ORDER BY `depth` ASC", $slide_id));
|
58 |
foreach ($rows as $row) {
|
59 |
if ($row->type == 'image') {
|
60 |
+
$row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WD_S_URL . '/images/no-image.png';
|
61 |
}
|
62 |
}
|
63 |
return $rows;
|
67 |
global $wpdb;
|
68 |
$prev_img_url = $wpdb->get_var($wpdb->prepare("SELECT `thumb_url` FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
|
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;
|
72 |
}
|
73 |
|
97 |
$row->enable_bullets = $row->bull_position == 'none' ? 0 : 1;
|
98 |
$row->enable_filmstrip = $row->film_pos == 'none' ? 0 : 1;
|
99 |
$row->enable_time_bar = $row->timer_bar_type == 'none' ? 0 : 1;
|
100 |
+
$row->music_url = str_replace('{site_url}', site_url(), $row->music_url);
|
101 |
+
$row->built_in_watermark_url = str_replace('{site_url}', site_url(), $row->built_in_watermark_url);
|
102 |
+
$row->right_butt_url = str_replace('{site_url}', site_url(), $row->right_butt_url);
|
103 |
+
$row->left_butt_url = str_replace('{site_url}', site_url(), $row->left_butt_url);
|
104 |
+
$row->right_butt_hov_url = str_replace('{site_url}', site_url(), $row->right_butt_hov_url);
|
105 |
+
$row->left_butt_hov_url = str_replace('{site_url}', site_url(), $row->left_butt_hov_url);
|
106 |
+
$row->bullets_img_main_url = str_replace('{site_url}', site_url(), $row->bullets_img_main_url);
|
107 |
+
$row->bullets_img_hov_url = str_replace('{site_url}', site_url(), $row->bullets_img_hov_url);
|
108 |
+
$row->play_butt_url = str_replace('{site_url}', site_url(), $row->play_butt_url);
|
109 |
+
$row->play_butt_hov_url = str_replace('{site_url}', site_url(), $row->play_butt_hov_url);
|
110 |
+
$row->paus_butt_url = str_replace('{site_url}', site_url(), $row->paus_butt_url);
|
111 |
+
$row->paus_butt_hov_url = str_replace('{site_url}', site_url(), $row->paus_butt_hov_url);
|
112 |
}
|
113 |
}
|
114 |
else {
|
frontend/models/WDSModelSlider.php
CHANGED
@@ -21,19 +21,39 @@ class WDSModelSlider {
|
|
21 |
|
22 |
public function get_slide_rows_data($id) {
|
23 |
global $wpdb;
|
24 |
-
$
|
25 |
-
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
public function get_slider_row_data($id) {
|
29 |
global $wpdb;
|
30 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
return $row;
|
32 |
}
|
33 |
|
34 |
public function get_layers_row_data($slide_id) {
|
35 |
global $wpdb;
|
36 |
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdslayer WHERE slide_id='%d' ORDER BY `depth` ASC", $slide_id));
|
|
|
|
|
|
|
37 |
return $rows;
|
38 |
}
|
39 |
////////////////////////////////////////////////////////////////////////////////////////
|
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` asc', $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);
|
28 |
+
}
|
29 |
+
return $rows;
|
30 |
}
|
31 |
|
32 |
public function get_slider_row_data($id) {
|
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);
|
40 |
+
$row->left_butt_hov_url = str_replace('{site_url}', site_url(), $row->left_butt_hov_url);
|
41 |
+
$row->bullets_img_main_url = str_replace('{site_url}', site_url(), $row->bullets_img_main_url);
|
42 |
+
$row->bullets_img_hov_url = str_replace('{site_url}', site_url(), $row->bullets_img_hov_url);
|
43 |
+
$row->play_butt_url = str_replace('{site_url}', site_url(), $row->play_butt_url);
|
44 |
+
$row->play_butt_hov_url = str_replace('{site_url}', site_url(), $row->play_butt_hov_url);
|
45 |
+
$row->paus_butt_url = str_replace('{site_url}', site_url(), $row->paus_butt_url);
|
46 |
+
$row->paus_butt_hov_url = str_replace('{site_url}', site_url(), $row->paus_butt_hov_url);
|
47 |
+
}
|
48 |
return $row;
|
49 |
}
|
50 |
|
51 |
public function get_layers_row_data($slide_id) {
|
52 |
global $wpdb;
|
53 |
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdslayer WHERE slide_id='%d' ORDER BY `depth` ASC", $slide_id));
|
54 |
+
foreach ($rows as $row) {
|
55 |
+
$row->image_url = str_replace('{site_url}', site_url(), $row->image_url);
|
56 |
+
}
|
57 |
return $rows;
|
58 |
}
|
59 |
////////////////////////////////////////////////////////////////////////////////////////
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
|
|
4 |
Tags: image slider, slider, slideshow, image, images, responsive, shortcode, widget, jquery, gallery, swipe, layer
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -160,6 +160,9 @@ After downloading the ZIP file of the slider plugin,
|
|
160 |
|
161 |
== Changelog ==
|
162 |
|
|
|
|
|
|
|
163 |
= 1.1.35 =
|
164 |
* Fixed: Save slider with big amount of slides.
|
165 |
* Fixed: Sliders pagination styles.
|
4 |
Tags: image slider, slider, slideshow, image, images, responsive, shortcode, widget, jquery, gallery, swipe, layer
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 1.1.36
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
160 |
|
161 |
== Changelog ==
|
162 |
|
163 |
+
= 1.1.36 =
|
164 |
+
* Changed: Save in data base relative urls instead of absolute urls.
|
165 |
+
|
166 |
= 1.1.35 =
|
167 |
* Fixed: Save slider with big amount of slides.
|
168 |
* Fixed: Sliders pagination styles.
|
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
|
@@ -435,7 +435,7 @@ register_activation_hook(__FILE__, 'wds_activate');
|
|
435 |
|
436 |
function wds_install() {
|
437 |
$version = get_option("wds_version");
|
438 |
-
$new_version = '1.1.
|
439 |
if ($version && version_compare($version, $new_version, '<')) {
|
440 |
require_once WD_S_DIR . "/sliders-update.php";
|
441 |
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.1.36
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
435 |
|
436 |
function wds_install() {
|
437 |
$version = get_option("wds_version");
|
438 |
+
$new_version = '1.1.36';
|
439 |
if ($version && version_compare($version, $new_version, '<')) {
|
440 |
require_once WD_S_DIR . "/sliders-update.php";
|
441 |
wds_update($version);
|