Version Description
- Added: Banner to install 10Web manager.
Download this release
Release Info
Developer | webdorado |
Plugin | Slider by WD – Responsive Slider |
Version | 1.2.24 |
Comparing to | |
See all releases |
Code changes from version 1.2.23 to 1.2.24
- admin/controllers/Sliders.php +1209 -1209
- admin/controllers/WDSControllerGoptions_wds.php +163 -163
- admin/controllers/WDSControllerUninstall_wds.php +46 -46
- admin/controllers/WDSControllerWDSExport.php +45 -45
- admin/controllers/WDSControllerWDSShortcode.php +19 -19
- admin/controllers/WDSControllerWidgetSlideshow.php +60 -60
- admin/controllers/elementorWidget.php +78 -78
- admin/controllers/embed.php +19 -19
- admin/controllers/posts.php +22 -22
- admin/models/Sliders.php +600 -600
- admin/models/WDSModelGoptions_wds.php +1 -1
- admin/models/WDSModelUninstall_wds.php +21 -20
- admin/models/WDSModelWDSExport.php +114 -114
- admin/models/WDSModelWDSShortcode.php +12 -12
- admin/models/WDSModelWidgetSlideshow.php +36 -36
- admin/models/posts.php +65 -65
- admin/views/AdminView.php +336 -336
- admin/views/Sliders.php +4190 -4190
- admin/views/WDSViewGoptions_wds.php +273 -299
admin/controllers/Sliders.php
CHANGED
@@ -1,1210 +1,1210 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SlidersController_wds
|
5 |
-
*/
|
6 |
-
class SlidersController_wds {
|
7 |
-
/**
|
8 |
-
* @var $model
|
9 |
-
*/
|
10 |
-
private $model;
|
11 |
-
/**
|
12 |
-
* @var $view
|
13 |
-
*/
|
14 |
-
private $view;
|
15 |
-
/**
|
16 |
-
* @var string $page
|
17 |
-
*/
|
18 |
-
private $page;
|
19 |
-
/**
|
20 |
-
* @var int $items_per_page
|
21 |
-
*/
|
22 |
-
private $items_per_page = 20;
|
23 |
-
/**
|
24 |
-
* @var array $actions
|
25 |
-
*/
|
26 |
-
private $actions = array();
|
27 |
-
|
28 |
-
/**
|
29 |
-
* SlidersController_wds constructor.
|
30 |
-
* @param array $args
|
31 |
-
*/
|
32 |
-
public function __construct( $args = array() ) {
|
33 |
-
$this->model = $args['model'];
|
34 |
-
$this->view = $args['view'];
|
35 |
-
$this->page = WDW_S_Library::get('page');
|
36 |
-
$this->actions = array(
|
37 |
-
'publish' => array(
|
38 |
-
'title' => __('Publish', WDS()->prefix),
|
39 |
-
'bulk_action' => __('published', WDS()->prefix),
|
40 |
-
),
|
41 |
-
'unpublish' => array(
|
42 |
-
'title' => __('Unpublish', WDS()->prefix),
|
43 |
-
'bulk_action' => __('unpublished', WDS()->prefix),
|
44 |
-
),
|
45 |
-
'delete' => array(
|
46 |
-
'title' => __('Delete', WDS()->prefix),
|
47 |
-
'bulk_action' => __('deleted', WDS()->prefix),
|
48 |
-
),
|
49 |
-
'duplicate' => array(
|
50 |
-
'title' => __('Duplicate', WDS()->prefix),
|
51 |
-
'bulk_action' => __('duplicated', WDS()->prefix),
|
52 |
-
),
|
53 |
-
'export' => array(
|
54 |
-
'title' => __('Export', WDS()->prefix),
|
55 |
-
'bulk_action' => __('export', WDS()->prefix),
|
56 |
-
),
|
57 |
-
'merge' => array(
|
58 |
-
'title' => __('Merge', WDS()->prefix),
|
59 |
-
'bulk_action' => __('merged', WDS()->prefix),
|
60 |
-
),
|
61 |
-
);
|
62 |
-
$user = get_current_user_id();
|
63 |
-
$screen = get_current_screen();
|
64 |
-
$option = $screen->get_option('per_page', 'option');
|
65 |
-
$this->items_per_page = get_user_meta($user, $option, TRUE);
|
66 |
-
|
67 |
-
if ( empty ($this->items_per_page) || $this->items_per_page < 1 ) {
|
68 |
-
$this->items_per_page = $screen->get_option('per_page', 'default');
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Execute.
|
74 |
-
*/
|
75 |
-
public function execute() {
|
76 |
-
$task = WDW_S_Library::get('task');
|
77 |
-
$id = (int) WDW_S_Library::get('current_id', 0);
|
78 |
-
if ( method_exists($this, $task) ) {
|
79 |
-
if ( $task != 'edit' && $task != 'display' ) {
|
80 |
-
check_admin_referer(WDS()->nonce, WDS()->nonce);
|
81 |
-
}
|
82 |
-
$action = WDW_S_Library::get('bulk_action', -1);
|
83 |
-
if ( $action != -1 ) {
|
84 |
-
$this->bulk_action( $action );
|
85 |
-
}
|
86 |
-
else {
|
87 |
-
$this->$task( $id );
|
88 |
-
}
|
89 |
-
}
|
90 |
-
else {
|
91 |
-
$this->display();
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Bulk actions.
|
97 |
-
*
|
98 |
-
* @param $task
|
99 |
-
*/
|
100 |
-
public function bulk_action( $task = '' ) {
|
101 |
-
$message = 0;
|
102 |
-
$successfully_updated = 0;
|
103 |
-
$url_arg = array('page' => $this->page, 'task' => 'display');
|
104 |
-
$check = WDW_S_Library::get('check', '');
|
105 |
-
$all = WDW_S_Library::get('check_all_items', '');
|
106 |
-
$all = ($all == 'on' ? TRUE : FALSE);
|
107 |
-
|
108 |
-
if ( method_exists($this, $task) ) {
|
109 |
-
if ( $all ) {
|
110 |
-
$message = $this->$task(0, TRUE, TRUE);
|
111 |
-
$url_arg['message'] = $message;
|
112 |
-
}
|
113 |
-
else {
|
114 |
-
if ( $check ) {
|
115 |
-
foreach ( $check as $id => $item ) {
|
116 |
-
$message = $this->$task($id, TRUE);
|
117 |
-
if ( $message != 2 ) {
|
118 |
-
// Increase successfully updated items count, if action doesn't failed.
|
119 |
-
$successfully_updated++;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
}
|
123 |
-
if ( $successfully_updated ) {
|
124 |
-
$message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDS()->prefix), $successfully_updated, $this->actions[$task]['bulk_action']);
|
125 |
-
}
|
126 |
-
$key = ($message === 2 ? 'message' : 'msg');
|
127 |
-
$url_arg[$key] = $message;
|
128 |
-
}
|
129 |
-
}
|
130 |
-
WDW_S_Library::redirect( add_query_arg($url_arg, admin_url('admin.php')) );
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Display.
|
135 |
-
*/
|
136 |
-
public function display() {
|
137 |
-
// Set params for view.
|
138 |
-
$params = array();
|
139 |
-
$params['page'] = $this->page;
|
140 |
-
$params['page_title'] = __('Sliders', WDS()->prefix);
|
141 |
-
$params['actions'] = $this->actions;
|
142 |
-
$params['order'] = WDW_S_Library::get('order', 'asc');
|
143 |
-
$params['orderby'] = WDW_S_Library::get('orderby', 'name');
|
144 |
-
// To prevent SQL injections.
|
145 |
-
$params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
|
146 |
-
if ( !in_array($params['orderby'], array( 'name' )) ) {
|
147 |
-
$params['orderby'] = 'id';
|
148 |
-
}
|
149 |
-
$params['items_per_page'] = $this->items_per_page;
|
150 |
-
$page = (int) WDW_S_Library::get('paged', 1);
|
151 |
-
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
152 |
-
$params['page_num'] = $page_num;
|
153 |
-
$params['search'] = WDW_S_Library::get('s', '');
|
154 |
-
|
155 |
-
$params['preview_url'] = $this->model->get_slide_preview_post();
|
156 |
-
$data = $this->model->get_rows_data($params);
|
157 |
-
if ( !empty($data['rows']) ) {
|
158 |
-
$ids = array();
|
159 |
-
foreach( $data['rows'] as $row ) {
|
160 |
-
$ids[] = $row->id;
|
161 |
-
}
|
162 |
-
// Get slides more info.
|
163 |
-
$params['slides_info'] = $this->model->get_slides_info( array('ids' => $ids) );
|
164 |
-
}
|
165 |
-
$params['rows'] = $data['rows'];
|
166 |
-
$params['total'] = $data['total'];
|
167 |
-
|
168 |
-
$url_arg = array();
|
169 |
-
$page_url = add_query_arg( array(
|
170 |
-
'page' => $this->page,
|
171 |
-
WDS()->nonce => wp_create_nonce(WDS()->nonce),
|
172 |
-
), admin_url('admin.php') );
|
173 |
-
$params['page_url'] = add_query_arg($url_arg, $page_url);
|
174 |
-
|
175 |
-
$this->view->display( $params );
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Edit.
|
180 |
-
*
|
181 |
-
* @param int $id
|
182 |
-
* @param bool $reset
|
183 |
-
*/
|
184 |
-
public function edit( $id = 0, $reset = FALSE ) {
|
185 |
-
$row = $this->model->get_row_data($id, $reset);
|
186 |
-
if ( $id != 0 && empty($row->id) ) {
|
187 |
-
WDW_S_Library::redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
|
188 |
-
}
|
189 |
-
$slides_row = $this->model->get_slides_row_data($id);
|
190 |
-
$layers_row = array();
|
191 |
-
if ( !empty($slides_row) ) {
|
192 |
-
foreach ( $slides_row as $slide_row) {
|
193 |
-
$slide_ids[] = $slide_row->id;
|
194 |
-
}
|
195 |
-
$layers_row = $this->model->get_layers_row_data( $slide_ids );
|
196 |
-
}
|
197 |
-
$wds_global_options = get_option("wds_global_options", 0);
|
198 |
-
$options_values = WDW_S_Library::get_values();
|
199 |
-
$global_options = json_decode($wds_global_options);
|
200 |
-
$page_title = __('Create new slider', WDS()->prefix);
|
201 |
-
$save_btn_name = __('Publish', WDS()->prefix);
|
202 |
-
if ( $id ) {
|
203 |
-
$page_title = sprintf(__('Edit slider %s', WDS()->prefix), $row->name);
|
204 |
-
$save_btn_name = __('Update', WDS()->prefix);
|
205 |
-
}
|
206 |
-
|
207 |
-
// Set params for view.
|
208 |
-
$params = array();
|
209 |
-
$params['id'] = $id;
|
210 |
-
$params['row'] = $row;
|
211 |
-
$params['slides_row'] = $slides_row;
|
212 |
-
$params['layers_row'] = $layers_row;
|
213 |
-
$params['global_options'] = $global_options;
|
214 |
-
$params['options_values'] = $options_values;
|
215 |
-
$params['slider_preview_link'] = $this->model->get_slide_preview_post();
|
216 |
-
$params['sub_tab_type'] = WDW_S_Library::get('sub_tab', '');
|
217 |
-
$params['page_title'] = $page_title;
|
218 |
-
$params['save_btn_name'] = $save_btn_name;
|
219 |
-
|
220 |
-
$this->view->edit( $params );
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Apply.
|
225 |
-
*
|
226 |
-
* @param int $id
|
227 |
-
*/
|
228 |
-
public function apply( $id = 0 ) {
|
229 |
-
$save = $this->save_slider_db();
|
230 |
-
$id = $save['id'];
|
231 |
-
$this->save_slide_db( $id );
|
232 |
-
// TODO. need works the other version.
|
233 |
-
// $this->create_frontend_js_file( $id );
|
234 |
-
$this->edit( $id );
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Publish.
|
239 |
-
*
|
240 |
-
* @param $id
|
241 |
-
* @param bool $bulk
|
242 |
-
* @param bool $all
|
243 |
-
*
|
244 |
-
* @return int
|
245 |
-
*/
|
246 |
-
public function publish( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
247 |
-
$message = $this->model->publish($id, $all);
|
248 |
-
if ( $bulk ) {
|
249 |
-
return $message;
|
250 |
-
}
|
251 |
-
|
252 |
-
WDW_S_Library::redirect( add_query_arg( array(
|
253 |
-
'page' => $this->page,
|
254 |
-
'task' => 'display',
|
255 |
-
'message' => $message,
|
256 |
-
), admin_url('admin.php')));
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Unpublish.
|
261 |
-
*
|
262 |
-
* @param $id
|
263 |
-
* @param bool $bulk
|
264 |
-
* @param bool $all
|
265 |
-
*
|
266 |
-
* @return int
|
267 |
-
*/
|
268 |
-
public function unpublish( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
269 |
-
$message = $this->model->unpublish( $id, $all );
|
270 |
-
if ( $bulk ) {
|
271 |
-
return $message;
|
272 |
-
}
|
273 |
-
|
274 |
-
WDW_S_Library::redirect( add_query_arg( array(
|
275 |
-
'page' => $this->page,
|
276 |
-
'task' => 'display',
|
277 |
-
'message' => $message,
|
278 |
-
), admin_url('admin.php')));
|
279 |
-
}
|
280 |
-
|
281 |
-
/**
|
282 |
-
* Delete.
|
283 |
-
*
|
284 |
-
* @param $id
|
285 |
-
* @param bool $bulk
|
286 |
-
* @param bool $all
|
287 |
-
*
|
288 |
-
* @return int
|
289 |
-
*/
|
290 |
-
public function delete( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
291 |
-
$message = $this->model->delete($id, $all);
|
292 |
-
if ( $bulk ) {
|
293 |
-
return $message;
|
294 |
-
}
|
295 |
-
|
296 |
-
WDW_S_Library::redirect( add_query_arg( array(
|
297 |
-
'page' => $this->page,
|
298 |
-
'task' => 'display',
|
299 |
-
'message' => $message,
|
300 |
-
), admin_url('admin.php')));
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Duplicate.
|
305 |
-
*
|
306 |
-
* @param $id
|
307 |
-
* @param bool $bulk
|
308 |
-
* @param bool $all
|
309 |
-
*
|
310 |
-
* @return int
|
311 |
-
*/
|
312 |
-
public function duplicate( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
313 |
-
$message = $this->model->duplicate($id, $all);
|
314 |
-
if ( $bulk ) {
|
315 |
-
return $message;
|
316 |
-
}
|
317 |
-
|
318 |
-
WDW_S_Library::redirect( add_query_arg( array(
|
319 |
-
'page' => $this->page,
|
320 |
-
'task' => 'display',
|
321 |
-
'message' => $message,
|
322 |
-
), admin_url('admin.php')));
|
323 |
-
}
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Reset.
|
327 |
-
*
|
328 |
-
* @param int $id
|
329 |
-
*/
|
330 |
-
public function reset( $id = 0 ) {
|
331 |
-
echo WDW_S_Library::message('Changes must be saved.', 'wd_error');
|
332 |
-
$this->edit( $id, TRUE);
|
333 |
-
}
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Merge sliders.
|
337 |
-
*
|
338 |
-
* @param int $id
|
339 |
-
*/
|
340 |
-
public function merge( $id = 0 ) {
|
341 |
-
$id = WDW_S_Library::get('select_slider_merge');
|
342 |
-
$all = WDW_S_Library::get('check_all_items');
|
343 |
-
$message_id = $this->model->merge($id, $all);
|
344 |
-
echo WDW_S_Library::message_id($message_id);
|
345 |
-
$this->display();
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Save slider DB.
|
350 |
-
*
|
351 |
-
* @param int $id
|
352 |
-
*
|
353 |
-
* @return array $data
|
354 |
-
*/
|
355 |
-
public function save_slider_db( $id = 0) {
|
356 |
-
global $wpdb;
|
357 |
-
$allow = TRUE;
|
358 |
-
if ( WDS()->is_free && get_option("wds_theme_version") ) {
|
359 |
-
$allow = FALSE;
|
360 |
-
}
|
361 |
-
$slider_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : $id);
|
362 |
-
$slider_data = (isset($_POST['slider_data']) ? stripslashes($_POST['slider_data']) : '');
|
363 |
-
$params_array = json_decode($slider_data, TRUE);
|
364 |
-
$del_slide_ids_string = (isset($params_array['del_slide_ids_string']) ? substr(sanitize_text_field($params_array['del_slide_ids_string']), 0, -1) : '');
|
365 |
-
if ($del_slide_ids_string) {
|
366 |
-
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id=' . $slider_id . ' AND id IN (' . $del_slide_ids_string . ')');
|
367 |
-
}
|
368 |
-
$name = ((isset($params_array['name'])) ? sanitize_text_field($params_array['name']) : '');
|
369 |
-
$published = ((isset($params_array['published'])) ? (int) sanitize_text_field($params_array['published']) : 1);
|
370 |
-
$full_width = ((isset($params_array['full_width'])) ? (int) sanitize_text_field($params_array['full_width']) : 0);
|
371 |
-
$auto_height = ((isset($params_array['auto_height'])) ? (int) sanitize_text_field($params_array['auto_height']) : 0);
|
372 |
-
$width = ((isset($params_array['width'])) ? (int) sanitize_text_field($params_array['width']) : 900);
|
373 |
-
$height = ((isset($params_array['height'])) ? (int) sanitize_text_field($params_array['height']) : 400);
|
374 |
-
$align = ((isset($params_array['align'])) ? sanitize_text_field($params_array['align']) : 'center');
|
375 |
-
$effect = ((isset($params_array['effect'])) ? sanitize_text_field($params_array['effect']) : 'fade');
|
376 |
-
$time_intervval = ((isset($params_array['time_intervval'])) ? (int) sanitize_text_field($params_array['time_intervval']) : 5);
|
377 |
-
$autoplay = ((isset($params_array['autoplay'])) ? (int) sanitize_text_field($params_array['autoplay']) : 1);
|
378 |
-
$shuffle = ((isset($params_array['shuffle'])) ? (int) sanitize_text_field($params_array['shuffle']) : 0);
|
379 |
-
$music = ((isset($params_array['music'])) ? (int) sanitize_text_field($params_array['music']) : 0);
|
380 |
-
if ( isset($params_array['music_url']) && WDW_S_Library::validate_audio_file($params_array['music_url']) ) {
|
381 |
-
$music_url = sanitize_text_field($params_array['music_url']);
|
382 |
-
$music_url = str_replace(site_url(), '{site_url}', $music_url);
|
383 |
-
}
|
384 |
-
else {
|
385 |
-
$music_url = '';
|
386 |
-
}
|
387 |
-
$preload_images = ((isset($params_array['preload_images'])) ? (int) sanitize_text_field($params_array['preload_images']) : 1);
|
388 |
-
$background_color = ((isset($params_array['background_color'])) ? sanitize_text_field($params_array['background_color']) : '000000');
|
389 |
-
$background_transparent = ((isset($params_array['background_transparent'])) ? (int) sanitize_text_field($params_array['background_transparent']) : 100);
|
390 |
-
$glb_border_width = ((isset($params_array['glb_border_width'])) ? (int) sanitize_text_field($params_array['glb_border_width']) : 0);
|
391 |
-
$glb_border_style = ((isset($params_array['glb_border_style'])) ? sanitize_text_field($params_array['glb_border_style']) : 'none');
|
392 |
-
$glb_border_color = ((isset($params_array['glb_border_color'])) ? sanitize_text_field($params_array['glb_border_color']) : '000000');
|
393 |
-
$glb_border_radius = ((isset($params_array['glb_border_radius'])) ? sanitize_text_field($params_array['glb_border_radius']) : '');
|
394 |
-
$glb_margin = ((isset($params_array['glb_margin'])) ? (int) sanitize_text_field($params_array['glb_margin']) : 0);
|
395 |
-
$glb_box_shadow = ((isset($params_array['glb_box_shadow'])) ? sanitize_text_field($params_array['glb_box_shadow']) : '');
|
396 |
-
$image_right_click = ((isset($params_array['image_right_click'])) ? (int) sanitize_text_field($params_array['image_right_click']) : 0);
|
397 |
-
$layer_out_next = ((isset($params_array['layer_out_next'])) ? (int) sanitize_text_field($params_array['layer_out_next']) : 0);
|
398 |
-
$prev_next_butt = ((isset($params_array['prev_next_butt'])) ? (int) sanitize_text_field($params_array['prev_next_butt']) : 1);
|
399 |
-
$play_paus_butt = ((isset($params_array['play_paus_butt'])) ? (int) sanitize_text_field($params_array['play_paus_butt']) : 0);
|
400 |
-
$navigation = ((isset($params_array['navigation'])) ? sanitize_text_field($params_array['navigation']) : 'hover');
|
401 |
-
$rl_butt_style = ((isset($params_array['rl_butt_style'])) ? sanitize_text_field($params_array['rl_butt_style']) : 'fa-angle');
|
402 |
-
$rl_butt_size = ((isset($params_array['rl_butt_size'])) ? (int) sanitize_text_field($params_array['rl_butt_size']) : 40);
|
403 |
-
$pp_butt_size = ((isset($params_array['pp_butt_size'])) ? (int) sanitize_text_field($params_array['pp_butt_size']) : 40);
|
404 |
-
$butts_color = ((isset($params_array['butts_color'])) ? sanitize_text_field($params_array['butts_color']) : '000000');
|
405 |
-
$butts_transparent = ((isset($params_array['butts_transparent'])) ? (int) sanitize_text_field($params_array['butts_transparent']) : 100);
|
406 |
-
$hover_color = ((isset($params_array['hover_color'])) ? sanitize_text_field($params_array['hover_color']) : 'FFFFFF');
|
407 |
-
$nav_border_width = ((isset($params_array['nav_border_width'])) ? (int) sanitize_text_field($params_array['nav_border_width']) : 0);
|
408 |
-
$nav_border_style = ((isset($params_array['nav_border_style'])) ? sanitize_text_field($params_array['nav_border_style']) : 'none');
|
409 |
-
$nav_border_color = ((isset($params_array['nav_border_color'])) ? sanitize_text_field($params_array['nav_border_color']) : 'FFFFFF');
|
410 |
-
$nav_border_radius = ((isset($params_array['nav_border_radius'])) ? sanitize_text_field($params_array['nav_border_radius']) : '20px');
|
411 |
-
$nav_bg_color = ((isset($params_array['nav_bg_color'])) ? sanitize_text_field($params_array['nav_bg_color']) : 'FFFFFF');
|
412 |
-
$bull_position = ((isset($params_array['bull_position'])) ? sanitize_text_field($params_array['bull_position']) : 'bottom');
|
413 |
-
if (isset($params_array['enable_bullets']) && ($params_array['enable_bullets']) == 0) {
|
414 |
-
$bull_position = 'none';
|
415 |
-
}
|
416 |
-
$bull_style = ((isset($params_array['bull_style']) && $allow) ? sanitize_text_field($params_array['bull_style']) : 'fa-square-o');
|
417 |
-
$bull_size = ((isset($params_array['bull_size']) && $allow) ? (int) sanitize_text_field($params_array['bull_size']) : 20);
|
418 |
-
$bull_color = ((isset($params_array['bull_color']) && $allow) ? sanitize_text_field($params_array['bull_color']) : 'FFFFFF');
|
419 |
-
$bull_act_color = ((isset($params_array['bull_act_color']) && $allow) ? sanitize_text_field($params_array['bull_act_color']) : 'FFFFFF');
|
420 |
-
$bull_margin = ((isset($params_array['bull_margin']) && $allow) ? (int) sanitize_text_field($params_array['bull_margin']) : 3);
|
421 |
-
$film_pos = ((isset($params_array['film_pos'])) ? sanitize_text_field($params_array['film_pos']) : 'none');
|
422 |
-
if (isset($params_array['enable_filmstrip']) && ($params_array['enable_filmstrip'] == 0)) {
|
423 |
-
$film_pos = 'none';
|
424 |
-
}
|
425 |
-
$film_thumb_width = ((isset($params_array['film_thumb_width'])) ? (int) sanitize_text_field($params_array['film_thumb_width']) : 100);
|
426 |
-
$film_thumb_height = ((isset($params_array['film_thumb_height'])) ? (int) sanitize_text_field($params_array['film_thumb_height']) : 50);
|
427 |
-
$film_bg_color = ((isset($params_array['film_bg_color'])) ? sanitize_text_field($params_array['film_bg_color']) : '000000');
|
428 |
-
$film_tmb_margin = ((isset($params_array['film_tmb_margin'])) ? (int) sanitize_text_field($params_array['film_tmb_margin']) : 0);
|
429 |
-
$film_act_border_width = ((isset($params_array['film_act_border_width'])) ? (int) sanitize_text_field($params_array['film_act_border_width']) : 0);
|
430 |
-
$film_act_border_style = ((isset($params_array['film_act_border_style'])) ? sanitize_text_field($params_array['film_act_border_style']) : 'none');
|
431 |
-
$film_act_border_color = ((isset($params_array['film_act_border_color'])) ? sanitize_text_field($params_array['film_act_border_color']) : 'FFFFFF');
|
432 |
-
$film_dac_transparent = ((isset($params_array['film_dac_transparent'])) ? (int) sanitize_text_field($params_array['film_dac_transparent']) : 50);
|
433 |
-
$built_in_watermark_type = (isset($params_array['built_in_watermark_type']) ? sanitize_text_field($params_array['built_in_watermark_type']) : 'none');
|
434 |
-
$built_in_watermark_position = (isset($params_array['built_in_watermark_position']) ? sanitize_text_field($params_array['built_in_watermark_position']) : 'middle-center');
|
435 |
-
$built_in_watermark_size = (isset($params_array['built_in_watermark_size']) ? (int) sanitize_text_field($params_array['built_in_watermark_size']) : 15);
|
436 |
-
$built_in_watermark_url = (isset($params_array['built_in_watermark_url']) ? sanitize_text_field($params_array['built_in_watermark_url']) : '');
|
437 |
-
$built_in_watermark_url = str_replace(site_url(), '{site_url}', $built_in_watermark_url);
|
438 |
-
$built_in_watermark_text = (isset($params_array['built_in_watermark_text']) ? sanitize_text_field($params_array['built_in_watermark_text']) : '10Web.io');
|
439 |
-
$built_in_watermark_opacity = (isset($params_array['built_in_watermark_opacity']) ? (int) sanitize_text_field($params_array['built_in_watermark_opacity']) : 70);
|
440 |
-
$built_in_watermark_font_size = (isset($params_array['built_in_watermark_font_size']) ? (int) sanitize_text_field($params_array['built_in_watermark_font_size']) : 20);
|
441 |
-
$built_in_watermark_font = (isset($params_array['built_in_watermark_font']) ? sanitize_text_field($params_array['built_in_watermark_font']) : '');
|
442 |
-
$built_in_watermark_color = (isset($params_array['built_in_watermark_color']) ? sanitize_text_field($params_array['built_in_watermark_color']) : 'FFFFFF');
|
443 |
-
$css = (isset($params_array['css']) ? htmlspecialchars_decode((stripslashes($params_array['css'])), ENT_QUOTES) : '');
|
444 |
-
$timer_bar_type = (isset($params_array['timer_bar_type']) ? sanitize_text_field($params_array['timer_bar_type']) : 'top');
|
445 |
-
if (isset($params_array['enable_time_bar']) && ($params_array['enable_time_bar'] == 0)) {
|
446 |
-
$timer_bar_type = 'none';
|
447 |
-
}
|
448 |
-
$timer_bar_size = (isset($params_array['timer_bar_size']) ? (int) sanitize_text_field($params_array['timer_bar_size']) : 5);
|
449 |
-
$timer_bar_color = (isset($params_array['timer_bar_color']) ? sanitize_text_field($params_array['timer_bar_color']) : 'BBBBBB');
|
450 |
-
$timer_bar_transparent = (isset($params_array['timer_bar_transparent']) ? (int) sanitize_text_field($params_array['timer_bar_transparent']) : 50);
|
451 |
-
$stop_animation = ((isset($params_array['stop_animation'])) ? (int) sanitize_text_field($params_array['stop_animation']) : 0);
|
452 |
-
$right_butt_url = (isset($params_array['right_butt_url']) ? sanitize_text_field($params_array['right_butt_url']) : '');
|
453 |
-
$right_butt_url = str_replace(site_url(), '{site_url}', $right_butt_url);
|
454 |
-
$left_butt_url = (isset($params_array['left_butt_url']) ? sanitize_text_field($params_array['left_butt_url']) : '');
|
455 |
-
$left_butt_url = str_replace(site_url(), '{site_url}', $left_butt_url);
|
456 |
-
$right_butt_hov_url = (isset($params_array['right_butt_hov_url']) ? sanitize_text_field($params_array['right_butt_hov_url']) : '');
|
457 |
-
$right_butt_hov_url = str_replace(site_url(), '{site_url}', $right_butt_hov_url);
|
458 |
-
$left_butt_hov_url = (isset($params_array['left_butt_hov_url']) ? sanitize_text_field($params_array['left_butt_hov_url']) : '');
|
459 |
-
$left_butt_hov_url = str_replace(site_url(), '{site_url}', $left_butt_hov_url);
|
460 |
-
$rl_butt_img_or_not = (isset($params_array['rl_butt_img_or_not']) ? sanitize_text_field($params_array['rl_butt_img_or_not']) : 'style');
|
461 |
-
$bullets_img_main_url = (isset($params_array['bullets_img_main_url']) ? sanitize_text_field($params_array['bullets_img_main_url']) : '');
|
462 |
-
$bullets_img_main_url = str_replace(site_url(), '{site_url}', $bullets_img_main_url);
|
463 |
-
$bullets_img_hov_url = (isset($params_array['bullets_img_hov_url']) ? sanitize_text_field($params_array['bullets_img_hov_url']) : '');
|
464 |
-
$bullets_img_hov_url = str_replace(site_url(), '{site_url}', $bullets_img_hov_url);
|
465 |
-
$bull_butt_img_or_not = (isset($params_array['bull_butt_img_or_not']) ? sanitize_text_field($params_array['bull_butt_img_or_not']) : 'style');
|
466 |
-
$play_paus_butt_img_or_not = (isset($params_array['play_paus_butt_img_or_not']) ? sanitize_text_field($params_array['play_paus_butt_img_or_not']) : 'style');
|
467 |
-
$play_butt_url = (isset($params_array['play_butt_url']) ? sanitize_text_field($params_array['play_butt_url']) : '');
|
468 |
-
$play_butt_url = str_replace(site_url(), '{site_url}', $play_butt_url);
|
469 |
-
$play_butt_hov_url = (isset($params_array['play_butt_hov_url']) ? sanitize_text_field($params_array['play_butt_hov_url']) : '');
|
470 |
-
$play_butt_hov_url = str_replace(site_url(), '{site_url}', $play_butt_hov_url);
|
471 |
-
$paus_butt_url = (isset($params_array['paus_butt_url']) ? sanitize_text_field($params_array['paus_butt_url']) : '');
|
472 |
-
$paus_butt_url = str_replace(site_url(), '{site_url}', $paus_butt_url);
|
473 |
-
$paus_butt_hov_url = (isset($params_array['paus_butt_hov_url']) ? sanitize_text_field($params_array['paus_butt_hov_url']) : '');
|
474 |
-
$paus_butt_hov_url = str_replace(site_url(), '{site_url}', $paus_butt_hov_url);
|
475 |
-
$start_slide_num = ((isset($params_array['start_slide_num'])) ? (int) stripslashes($params_array['start_slide_num']) : 1);
|
476 |
-
$effect_duration = ((isset($params_array['effect_duration'])) ? (int) stripslashes($params_array['effect_duration']) : 800);
|
477 |
-
$carousel = ((isset($params_array['carousel']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel']) : 0);
|
478 |
-
$carousel_image_counts = ((isset($params_array['carousel_image_counts']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel_image_counts']) : 7);
|
479 |
-
$carousel_image_parameters = ((isset($params_array['carousel_image_parameters']) && !WDS()->is_free) ? sanitize_text_field($params_array['carousel_image_parameters']) : 0.85);
|
480 |
-
$carousel_fit_containerWidth = ((isset($params_array['carousel_fit_containerWidth']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel_fit_containerWidth']) : 0);
|
481 |
-
$carousel_width = ((isset($params_array['carousel_width']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel_width']) : 1000);
|
482 |
-
$parallax_effect = ((isset($params_array['parallax_effect']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['parallax_effect']) : 0);
|
483 |
-
$mouse_swipe_nav = ((isset($params_array['mouse_swipe_nav'])) ? (int) sanitize_text_field($params_array['mouse_swipe_nav']) : 0);
|
484 |
-
$bull_hover = ((isset($params_array['bull_hover'])) ? (int) sanitize_text_field($params_array['bull_hover']) : 1);
|
485 |
-
$touch_swipe_nav = ((isset($params_array['touch_swipe_nav'])) ? (int) sanitize_text_field($params_array['touch_swipe_nav']) : 1);
|
486 |
-
$mouse_wheel_nav = ((isset($params_array['mouse_wheel_nav'])) ? (int) sanitize_text_field($params_array['mouse_wheel_nav']) : 0);
|
487 |
-
$keyboard_nav = ((isset($params_array['keyboard_nav'])) ? (int) sanitize_text_field($params_array['keyboard_nav']) : 0);
|
488 |
-
$show_thumbnail = ((isset($params_array['show_thumbnail'])) ? (int) sanitize_text_field($params_array['show_thumbnail']) : 0);
|
489 |
-
$thumb_size = ((isset($params_array['thumb_size'])) ? sanitize_text_field($params_array['thumb_size']) : '0.3');
|
490 |
-
$fixed_bg = ((isset($params_array['fixed_bg'])) ? (int) sanitize_text_field($params_array['fixed_bg']) : 0);
|
491 |
-
$smart_crop = ((isset($params_array['smart_crop'])) ? (int) sanitize_text_field($params_array['smart_crop']) : 0);
|
492 |
-
$crop_image_position = ((isset($params_array['crop_image_position'])) ? sanitize_text_field($params_array['crop_image_position']) : 'middle-center');
|
493 |
-
$javascript = ((isset($params_array['javascript'])) ? $params_array['javascript'] : '');
|
494 |
-
$carousel_degree = ((isset($params_array['carousel_degree'])) ? (int) sanitize_text_field($params_array['carousel_degree']) : 0);
|
495 |
-
$carousel_grayscale = ((isset($params_array['carousel_grayscale'])) ? (int) sanitize_text_field($params_array['carousel_grayscale']) : 0);
|
496 |
-
$carousel_transparency = ((isset($params_array['carousel_transparency'])) ? (int) sanitize_text_field($params_array['carousel_transparency']) : 0);
|
497 |
-
$bull_back_act_color = ((isset($params_array['bull_back_act_color'])) ? sanitize_text_field($params_array['bull_back_act_color']) : '000000');
|
498 |
-
$bull_back_color = ((isset($params_array['bull_back_color'])) ? sanitize_text_field($params_array['bull_back_color']) : 'CCCCCC');
|
499 |
-
$bull_radius = ((isset($params_array['bull_radius'])) ? sanitize_text_field($params_array['bull_radius']) : '20px');
|
500 |
-
$slider_loop = ((isset($params_array['slider_loop'])) ? (int) sanitize_text_field($params_array['slider_loop']) : 1);
|
501 |
-
$hide_on_mobile = ((isset($params_array['hide_on_mobile'])) ? (int) sanitize_text_field($params_array['hide_on_mobile']) : 0);
|
502 |
-
$twoway_slideshow = ((isset($params_array['twoway_slideshow'])) ? (int) sanitize_text_field($params_array['twoway_slideshow']) : 0);
|
503 |
-
$full_width_for_mobile = ((isset($params_array['full_width_for_mobile'])) ? (int) sanitize_text_field($params_array['full_width_for_mobile']) : 0);
|
504 |
-
$order_dir = ((isset($params_array['order_dir'])) ? sanitize_text_field($params_array['order_dir']) : 'asc');
|
505 |
-
$data = array(
|
506 |
-
'name' => $name,
|
507 |
-
'published' => $published,
|
508 |
-
'full_width' => $full_width,
|
509 |
-
'auto_height' => $auto_height,
|
510 |
-
'width' => $width,
|
511 |
-
'height' => $height,
|
512 |
-
'align' => $align,
|
513 |
-
'effect' => $effect,
|
514 |
-
'time_intervval' => $time_intervval,
|
515 |
-
'autoplay' => $autoplay,
|
516 |
-
'shuffle' => $shuffle,
|
517 |
-
'music' => $music,
|
518 |
-
'music_url' => $music_url,
|
519 |
-
'preload_images' => $preload_images,
|
520 |
-
'background_color' => $background_color,
|
521 |
-
'background_transparent' => $background_transparent,
|
522 |
-
'glb_border_width' => $glb_border_width,
|
523 |
-
'glb_border_style' => $glb_border_style,
|
524 |
-
'glb_border_color' => $glb_border_color,
|
525 |
-
'glb_border_radius' => $glb_border_radius,
|
526 |
-
'glb_margin' => $glb_margin,
|
527 |
-
'glb_box_shadow' => $glb_box_shadow,
|
528 |
-
'image_right_click' => $image_right_click,
|
529 |
-
'prev_next_butt' => $prev_next_butt,
|
530 |
-
'play_paus_butt' => $play_paus_butt,
|
531 |
-
'navigation' => $navigation,
|
532 |
-
'rl_butt_style' => $rl_butt_style,
|
533 |
-
'rl_butt_size' => $rl_butt_size,
|
534 |
-
'pp_butt_size' => $pp_butt_size,
|
535 |
-
'butts_color' => $butts_color,
|
536 |
-
'butts_transparent' => $butts_transparent,
|
537 |
-
'hover_color' => $hover_color,
|
538 |
-
'nav_border_width' => $nav_border_width,
|
539 |
-
'nav_border_style' => $nav_border_style,
|
540 |
-
'nav_border_color' => $nav_border_color,
|
541 |
-
'nav_border_radius' => $nav_border_radius,
|
542 |
-
'nav_bg_color' => $nav_bg_color,
|
543 |
-
'bull_position' => $bull_position,
|
544 |
-
'bull_style' => $bull_style,
|
545 |
-
'bull_size' => $bull_size,
|
546 |
-
'bull_color' => $bull_color,
|
547 |
-
'bull_act_color' => $bull_act_color,
|
548 |
-
'bull_margin' => $bull_margin,
|
549 |
-
'film_pos' => $film_pos,
|
550 |
-
'film_thumb_width' => $film_thumb_width,
|
551 |
-
'film_thumb_height' => $film_thumb_height,
|
552 |
-
'film_bg_color' => $film_bg_color,
|
553 |
-
'film_tmb_margin' => $film_tmb_margin,
|
554 |
-
'film_act_border_width' => $film_act_border_width,
|
555 |
-
'film_act_border_style' => $film_act_border_style,
|
556 |
-
'film_act_border_color' => $film_act_border_color,
|
557 |
-
'film_dac_transparent' => $film_dac_transparent,
|
558 |
-
'built_in_watermark_type' => $built_in_watermark_type,
|
559 |
-
'built_in_watermark_position' => $built_in_watermark_position,
|
560 |
-
'built_in_watermark_size' => $built_in_watermark_size,
|
561 |
-
'built_in_watermark_url' => $built_in_watermark_url,
|
562 |
-
'built_in_watermark_text' => $built_in_watermark_text,
|
563 |
-
'built_in_watermark_opacity' => $built_in_watermark_opacity,
|
564 |
-
'built_in_watermark_font_size' => $built_in_watermark_font_size,
|
565 |
-
'built_in_watermark_font' => $built_in_watermark_font,
|
566 |
-
'built_in_watermark_color' => $built_in_watermark_color,
|
567 |
-
'css' => $css,
|
568 |
-
'timer_bar_type' => $timer_bar_type,
|
569 |
-
'timer_bar_size' => $timer_bar_size,
|
570 |
-
'timer_bar_color' => $timer_bar_color,
|
571 |
-
'timer_bar_transparent' => $timer_bar_transparent,
|
572 |
-
'layer_out_next' => $layer_out_next,
|
573 |
-
'stop_animation' => $stop_animation,
|
574 |
-
'right_butt_url' => $right_butt_url,
|
575 |
-
'left_butt_url' => $left_butt_url,
|
576 |
-
'right_butt_hov_url' => $right_butt_hov_url,
|
577 |
-
'left_butt_hov_url' => $left_butt_hov_url,
|
578 |
-
'rl_butt_img_or_not' => $rl_butt_img_or_not,
|
579 |
-
'bullets_img_main_url' => $bullets_img_main_url,
|
580 |
-
'bullets_img_hov_url' => $bullets_img_hov_url,
|
581 |
-
'bull_butt_img_or_not' => $bull_butt_img_or_not,
|
582 |
-
'play_paus_butt_img_or_not' => $play_paus_butt_img_or_not,
|
583 |
-
'play_butt_url' => $play_butt_url,
|
584 |
-
'play_butt_hov_url' => $play_butt_hov_url,
|
585 |
-
'paus_butt_url' => $paus_butt_url,
|
586 |
-
'paus_butt_hov_url' => $paus_butt_hov_url,
|
587 |
-
'start_slide_num' => $start_slide_num,
|
588 |
-
'effect_duration' => $effect_duration,
|
589 |
-
'carousel' => $carousel,
|
590 |
-
'carousel_image_counts' => $carousel_image_counts,
|
591 |
-
'carousel_image_parameters' => $carousel_image_parameters,
|
592 |
-
'carousel_fit_containerWidth' => $carousel_fit_containerWidth,
|
593 |
-
'carousel_width' => $carousel_width,
|
594 |
-
'parallax_effect' => $parallax_effect,
|
595 |
-
'mouse_swipe_nav' => $mouse_swipe_nav,
|
596 |
-
'bull_hover' => $bull_hover,
|
597 |
-
'touch_swipe_nav' => $touch_swipe_nav,
|
598 |
-
'mouse_wheel_nav' => $mouse_wheel_nav,
|
599 |
-
'keyboard_nav' => $keyboard_nav,
|
600 |
-
'show_thumbnail' => $show_thumbnail,
|
601 |
-
'thumb_size' => $thumb_size,
|
602 |
-
'fixed_bg' => $fixed_bg,
|
603 |
-
'smart_crop' => $smart_crop,
|
604 |
-
'crop_image_position' => $crop_image_position,
|
605 |
-
'javascript' => $javascript,
|
606 |
-
'carousel_degree' => $carousel_degree,
|
607 |
-
'carousel_grayscale' => $carousel_grayscale,
|
608 |
-
'carousel_transparency' => $carousel_transparency,
|
609 |
-
'bull_back_act_color' => $bull_back_act_color,
|
610 |
-
'bull_back_color' => $bull_back_color,
|
611 |
-
'bull_radius' => $bull_radius,
|
612 |
-
'slider_loop' => $slider_loop,
|
613 |
-
'hide_on_mobile' => $hide_on_mobile,
|
614 |
-
'twoway_slideshow' => $twoway_slideshow,
|
615 |
-
'full_width_for_mobile' => $full_width_for_mobile,
|
616 |
-
'order_dir' => $order_dir,
|
617 |
-
);
|
618 |
-
|
619 |
-
if (!$slider_id) {
|
620 |
-
$save = $wpdb->insert($wpdb->prefix . 'wdsslider', $data);
|
621 |
-
$slider_id = (int) $wpdb->insert_id;
|
622 |
-
$_POST['current_id'] = $slider_id;
|
623 |
-
}
|
624 |
-
else {
|
625 |
-
$save = $wpdb->update($wpdb->prefix . 'wdsslider', $data, array('id' => $slider_id));
|
626 |
-
}
|
627 |
-
$status = 2;
|
628 |
-
if ($save !== FALSE) {
|
629 |
-
$status = 1;
|
630 |
-
}
|
631 |
-
$data = array();
|
632 |
-
$data['id'] = $slider_id;
|
633 |
-
$data['status'] = $status;
|
634 |
-
return $data;
|
635 |
-
}
|
636 |
-
|
637 |
-
/**
|
638 |
-
* Save slide DB.
|
639 |
-
*
|
640 |
-
* @param int $id
|
641 |
-
*/
|
642 |
-
public function save_slide_db( $id = 0 ) {
|
643 |
-
global $wpdb;
|
644 |
-
$allow = TRUE;
|
645 |
-
if ( WDS()->is_free && get_option("wds_theme_version") ) {
|
646 |
-
$allow = FALSE;
|
647 |
-
}
|
648 |
-
$slider_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : $id);
|
649 |
-
$save_as_copy = (isset($_POST['save_as_copy']) ? (int) $_POST['save_as_copy'] : 0);
|
650 |
-
if (!$slider_id) {
|
651 |
-
$slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
|
652 |
-
}
|
653 |
-
$slides_data = (isset($_POST['slides']) ? $_POST['slides'] : array());
|
654 |
-
foreach ($slides_data as $slide_data) {
|
655 |
-
$params_array = json_decode(stripslashes($slide_data), TRUE);
|
656 |
-
$slide_id = (isset($params_array['id']) ? $params_array['id'] : 0);
|
657 |
-
if ($slide_id) {
|
658 |
-
$del_layer_ids_string = ((isset($params_array['slide' . $slide_id . '_del_layer_ids_string']) && !$save_as_copy) ? substr(sanitize_text_field($params_array['slide' . $slide_id . '_del_layer_ids_string']), 0, -1) : '');
|
659 |
-
if ($del_layer_ids_string) {
|
660 |
-
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'wdslayer WHERE id IN (' . $del_layer_ids_string . ')');
|
661 |
-
}
|
662 |
-
$title = ((isset($params_array['title' . $slide_id])) ? sanitize_text_field($params_array['title' . $slide_id]) : '');
|
663 |
-
$type = ((isset($params_array['type' . $slide_id])) ? sanitize_text_field($params_array['type' . $slide_id]) : '');
|
664 |
-
$order = ((isset($params_array['order' . $slide_id])) ? sanitize_text_field($params_array['order' . $slide_id]) : '');
|
665 |
-
$published = ((isset($params_array['published' . $slide_id])) ? sanitize_text_field($params_array['published' . $slide_id]) : '');
|
666 |
-
$target_attr_slide = ((isset($params_array['target_attr_slide' . $slide_id])) ? (int) sanitize_text_field($params_array['target_attr_slide' . $slide_id]) : 0);
|
667 |
-
$link = ((isset($params_array['link' . $slide_id])) ? sanitize_text_field($params_array['link' . $slide_id]) : (($type == 'video') ? 0 : ''));
|
668 |
-
$image_url = ((isset($params_array['image_url' . $slide_id])) ? sanitize_text_field($params_array['image_url' . $slide_id]) : '');
|
669 |
-
$image_url = str_replace(site_url(), '{site_url}', $image_url);
|
670 |
-
$thumb_url = ((isset($params_array['thumb_url' . $slide_id])) ? sanitize_text_field($params_array['thumb_url' . $slide_id]) : '');
|
671 |
-
$thumb_url = str_replace(site_url(), '{site_url}', $thumb_url);
|
672 |
-
$att_width = ((isset($params_array['att_width' . $slide_id])) ? sanitize_text_field($params_array['att_width' . $slide_id]) : '');
|
673 |
-
$att_height = ((isset($params_array['att_height' . $slide_id])) ? sanitize_text_field($params_array['att_height' . $slide_id]) : '');
|
674 |
-
$video_duration = ((isset($params_array['video_duration' . $slide_id])) ? sanitize_text_field($params_array['video_duration' . $slide_id]) : '');
|
675 |
-
$youtube_rel_video = ((isset($params_array['youtube_rel_video' . $slide_id]) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['youtube_rel_video' . $slide_id]) : 0);
|
676 |
-
$video_loop = ((isset($params_array['video_loop' . $slide_id]) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['video_loop' . $slide_id]) : 0);
|
677 |
-
$fillmode = ((isset($params_array['fillmode' . $slide_id])) ? sanitize_text_field($params_array['fillmode' . $slide_id]) : '');
|
678 |
-
$title_dimension = array();
|
679 |
-
$title_dimension['title'] = $title;
|
680 |
-
$title_dimension['att_width'] = $att_width;
|
681 |
-
$title_dimension['att_height'] = $att_height;
|
682 |
-
$title_dimension['video_duration'] = $video_duration;
|
683 |
-
$title_dimension = json_encode($title_dimension);
|
684 |
-
$data = array(
|
685 |
-
'slider_id' => $slider_id,
|
686 |
-
'title' => $title_dimension,
|
687 |
-
'type' => $type,
|
688 |
-
'order' => $order,
|
689 |
-
'published' => $published,
|
690 |
-
'link' => $link,
|
691 |
-
'image_url' => $image_url,
|
692 |
-
'thumb_url' => $thumb_url,
|
693 |
-
'target_attr_slide' => $target_attr_slide,
|
694 |
-
'youtube_rel_video' => $youtube_rel_video,
|
695 |
-
'video_loop' => $video_loop,
|
696 |
-
'fillmode' => $fillmode
|
697 |
-
);
|
698 |
-
if (strpos($slide_id, 'pr') !== FALSE || $save_as_copy) {
|
699 |
-
$wpdb->insert($wpdb->prefix . 'wdsslide', $data);
|
700 |
-
$slide_id_pr = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslide');
|
701 |
-
}
|
702 |
-
else {
|
703 |
-
$wpdb->update($wpdb->prefix . 'wdsslide', $data, array('id' => $slide_id));
|
704 |
-
$slide_id_pr = $slide_id;
|
705 |
-
}
|
706 |
-
if ( !WDS()->is_free ) {
|
707 |
-
$this->save_layer_db($slide_id, $slide_id_pr, $params_array);
|
708 |
-
}
|
709 |
-
}
|
710 |
-
}
|
711 |
-
}
|
712 |
-
|
713 |
-
public function save_layer_db($slide_id, $slide_id_pr, $params_array) {
|
714 |
-
global $wpdb;
|
715 |
-
$save_as_copy = (isset($_POST['save_as_copy']) ? (int) $_POST['save_as_copy'] : 0);
|
716 |
-
$layer_ids_string = (isset($params_array['slide' . $slide_id . '_layer_ids_string']) ? sanitize_text_field($params_array['slide' . $slide_id . '_layer_ids_string']) : '');
|
717 |
-
$layer_id_array = explode(',', $layer_ids_string);
|
718 |
-
foreach ($layer_id_array as $layer_id) {
|
719 |
-
if ($layer_id) {
|
720 |
-
$prefix = 'slide' . $slide_id . '_layer' . $layer_id;
|
721 |
-
$json_string = (isset($params_array[$prefix . '_json']) ? $params_array[$prefix . '_json'] : '');
|
722 |
-
$params_array_layer = json_decode($json_string, TRUE);
|
723 |
-
$title = ((isset($params_array_layer['title'])) ? sanitize_text_field($params_array_layer['title']) : '');
|
724 |
-
$type = ((isset($params_array_layer['type'])) ? sanitize_text_field($params_array_layer['type']) : '');
|
725 |
-
$depth = ((isset($params_array_layer['depth'])) ? sanitize_text_field($params_array_layer['depth']) : '');
|
726 |
-
$text = ((isset($params_array_layer['text'])) ? stripcslashes($params_array_layer['text']) : '');
|
727 |
-
$link = ((isset($params_array_layer['link'])) ? sanitize_text_field($params_array_layer['link']) : '');
|
728 |
-
$target_attr_layer = ((isset($params_array_layer['target_attr_layer'])) ? (int) sanitize_text_field($params_array_layer['target_attr_layer']) : 0);
|
729 |
-
$left = ((isset($params_array_layer['left'])) ? sanitize_text_field($params_array_layer['left']) : '');
|
730 |
-
$top = ((isset($params_array_layer['top'])) ? sanitize_text_field($params_array_layer['top']) : '');
|
731 |
-
$start = ((isset($params_array_layer['start'])) ? sanitize_text_field($params_array_layer['start']) : '');
|
732 |
-
$end = ((isset($params_array_layer['end'])) ? sanitize_text_field($params_array_layer['end']) : '');
|
733 |
-
$published = ((isset($params_array_layer['published'])) ? sanitize_text_field($params_array_layer['published']) : '');
|
734 |
-
$color = ((isset($params_array_layer['color'])) ? sanitize_text_field($params_array_layer['color']) : '');
|
735 |
-
$size = ((isset($params_array_layer['size'])) ? sanitize_text_field($params_array_layer['size']) : '');
|
736 |
-
$ffamily = ((isset($params_array_layer['ffamily'])) ? sanitize_text_field($params_array_layer['ffamily']) : '');
|
737 |
-
$fweight = ((isset($params_array_layer['fweight'])) ? sanitize_text_field($params_array_layer['fweight']) : '');
|
738 |
-
$padding = ((isset($params_array_layer['padding'])) ? sanitize_text_field($params_array_layer['padding']) : '');
|
739 |
-
$fbgcolor = ((isset($params_array_layer['fbgcolor'])) ? sanitize_text_field($params_array_layer['fbgcolor']) : '');
|
740 |
-
$transparent = ((isset($params_array_layer['transparent'])) ? sanitize_text_field($params_array_layer['transparent']) : '');
|
741 |
-
$border_width = ((isset($params_array_layer['border_width'])) ? sanitize_text_field($params_array_layer['border_width']) : '');
|
742 |
-
$border_style = ((isset($params_array_layer['border_style'])) ? sanitize_text_field($params_array_layer['border_style']) : '');
|
743 |
-
$border_color = ((isset($params_array_layer['border_color'])) ? sanitize_text_field($params_array_layer['border_color']) : '');
|
744 |
-
$border_radius = ((isset($params_array_layer['border_radius'])) ? sanitize_text_field($params_array_layer['border_radius']) : '');
|
745 |
-
$shadow = ((isset($params_array_layer['shadow'])) ? sanitize_text_field($params_array_layer['shadow']) : '');
|
746 |
-
$image_url = ((isset($params_array_layer['image_url'])) ? sanitize_text_field($params_array_layer['image_url']) : '');
|
747 |
-
$image_url = str_replace(site_url(), '{site_url}', $image_url);
|
748 |
-
$image_width = ((isset($params_array_layer['image_width'])) ? sanitize_text_field($params_array_layer['image_width']) : '');
|
749 |
-
$image_height = ((isset($params_array_layer['image_height'])) ? sanitize_text_field($params_array_layer['image_height']) : '');
|
750 |
-
$image_scale = ((isset($params_array_layer['image_scale'])) ? sanitize_text_field($params_array_layer['image_scale']) : '');
|
751 |
-
$alt = ((isset($params_array_layer['alt'])) ? sanitize_text_field($params_array_layer['alt']) : '');
|
752 |
-
$imgtransparent = ((isset($params_array_layer['imgtransparent'])) ? sanitize_text_field($params_array_layer['imgtransparent']) : '');
|
753 |
-
$social_button = ((isset($params_array_layer['social_button'])) ? sanitize_text_field($params_array_layer['social_button']) : '');
|
754 |
-
$hover_color = ((isset($params_array_layer['hover_color'])) ? sanitize_text_field($params_array_layer['hover_color']) : '');
|
755 |
-
$layer_effect_in = ((isset($params_array_layer['layer_effect_in'])) ? sanitize_text_field($params_array_layer['layer_effect_in']) : '');
|
756 |
-
$layer_effect_out = ((isset($params_array_layer['layer_effect_out'])) ? sanitize_text_field($params_array_layer['layer_effect_out']) : '');
|
757 |
-
$duration_eff_in = ((isset($params_array_layer['duration_eff_in'])) ? (int) sanitize_text_field($params_array_layer['duration_eff_in']) : 3);
|
758 |
-
$duration_eff_out = ((isset($params_array_layer['duration_eff_out'])) ? (int) sanitize_text_field($params_array_layer['duration_eff_out']) : 3);
|
759 |
-
|
760 |
-
$hotp_width = ((isset($params_array_layer['hotp_width'])) ? sanitize_text_field($params_array_layer['hotp_width']) : '');
|
761 |
-
$hotp_fbgcolor = ((isset($params_array_layer['hotp_fbgcolor'])) ? sanitize_text_field($params_array_layer['hotp_fbgcolor']) : '');
|
762 |
-
$hotp_border_width = ((isset($params_array_layer['hotp_border_width'])) ? sanitize_text_field($params_array_layer['hotp_border_width']) : '');
|
763 |
-
$hotp_border_style = ((isset($params_array_layer['hotp_border_style'])) ? sanitize_text_field($params_array_layer['hotp_border_style']) : '');
|
764 |
-
$hotp_border_color = ((isset($params_array_layer['hotp_border_color'])) ? sanitize_text_field($params_array_layer['hotp_border_color']) : '');
|
765 |
-
$hotp_border_radius = ((isset($params_array_layer['hotp_border_radius'])) ? sanitize_text_field($params_array_layer['hotp_border_radius']) : '');
|
766 |
-
$hotp_text_position = ((isset($params_array_layer['hotp_text_position'])) ? sanitize_text_field($params_array_layer['hotp_text_position']) : '');
|
767 |
-
$google_fonts = ((isset($params_array_layer['google_fonts'])) ? (int) sanitize_text_field($params_array_layer['google_fonts']) : 0);
|
768 |
-
$attr_width = ((isset($params_array_layer['attr_width'])) ? sanitize_text_field($params_array_layer['attr_width']) : '');
|
769 |
-
$attr_height = ((isset($params_array_layer['attr_height'])) ? sanitize_text_field($params_array_layer['attr_height']) : '');
|
770 |
-
$add_class = ((isset($params_array_layer['add_class'])) ? sanitize_text_field($params_array_layer['add_class']) : '');
|
771 |
-
$layer_video_loop = ((isset($params_array_layer['layer_video_loop'])) ? (int) sanitize_text_field($params_array_layer['layer_video_loop']) : 0);
|
772 |
-
$youtube_rel_layer_video = ((isset($params_array_layer['youtube_rel_layer_video'])) ? (int) sanitize_text_field($params_array_layer['youtube_rel_layer_video']) : 0);
|
773 |
-
$hotspot_animation = ((isset($params_array_layer['hotspot_animation'])) ? (int) sanitize_text_field($params_array_layer['hotspot_animation']) : 1);
|
774 |
-
$layer_callback_list = ((isset($params_array_layer['layer_callback_list'])) ? sanitize_text_field($params_array_layer['layer_callback_list']) : '');
|
775 |
-
$hotspot_text_display = ((isset($params_array_layer['hotspot_text_display'])) ? sanitize_text_field($params_array_layer['hotspot_text_display']) : 'hover');
|
776 |
-
$hover_color_text = ((isset($params_array_layer['hover_color_text'])) ? sanitize_text_field($params_array_layer['hover_color_text']) : '');
|
777 |
-
$text_alignment = ((isset($params_array_layer['text_alignment'])) ? sanitize_text_field($params_array_layer['text_alignment']) : 'center');
|
778 |
-
$link_to_slide = ((isset($params_array_layer['link_to_slide'])) ? (int) sanitize_text_field($params_array_layer['link_to_slide']) : 0);
|
779 |
-
$align_layer = ((isset($params_array_layer['align_layer'])) ? (int) sanitize_text_field($params_array_layer['align_layer']) : 0);
|
780 |
-
$static_layer = ((isset($params_array_layer['static_layer'])) ? (int) sanitize_text_field($params_array_layer['static_layer']) : 0);
|
781 |
-
$infinite_in = ((isset($params_array_layer['infinite_in'])) ? (int) sanitize_text_field($params_array_layer['infinite_in']) : 1);
|
782 |
-
$infinite_out = ((isset($params_array_layer['infinite_out'])) ? (int) sanitize_text_field($params_array_layer['infinite_out']) : 1);
|
783 |
-
$min_size = ((isset($params_array_layer['min_size'])) ? (int) sanitize_text_field($params_array_layer['min_size']) : 11);
|
784 |
-
$title_dimension = array();
|
785 |
-
$title_dimension['title'] = $title;
|
786 |
-
$title_dimension['attr_width'] = $attr_width;
|
787 |
-
$title_dimension['attr_height'] = $attr_height;
|
788 |
-
$title_dimension = json_encode($title_dimension);
|
789 |
-
if ($title) {
|
790 |
-
if (strpos($layer_id, 'pr_') !== FALSE || $save_as_copy) {
|
791 |
-
$save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
|
792 |
-
'slide_id' => $slide_id_pr,
|
793 |
-
'title' => $title_dimension,
|
794 |
-
'type' => $type,
|
795 |
-
'depth' => $depth,
|
796 |
-
'text' => $text,
|
797 |
-
'link' => $link,
|
798 |
-
'left' => $left,
|
799 |
-
'top' => $top,
|
800 |
-
'start' => $start,
|
801 |
-
'end' => $end,
|
802 |
-
'published' => $published,
|
803 |
-
'color' => $color,
|
804 |
-
'size' => $size,
|
805 |
-
'ffamily' => $ffamily,
|
806 |
-
'fweight' => $fweight,
|
807 |
-
'padding' => $padding,
|
808 |
-
'fbgcolor' => $fbgcolor,
|
809 |
-
'transparent' => $transparent,
|
810 |
-
'border_width' => $border_width,
|
811 |
-
'border_style' => $border_style,
|
812 |
-
'border_color' => $border_color,
|
813 |
-
'border_radius' => $border_radius,
|
814 |
-
'shadow' => $shadow,
|
815 |
-
'image_url' => $image_url,
|
816 |
-
'image_width' => $image_width,
|
817 |
-
'image_height' => $image_height,
|
818 |
-
'image_scale' => $image_scale,
|
819 |
-
'alt' => $alt,
|
820 |
-
'imgtransparent' => $imgtransparent,
|
821 |
-
'social_button' => $social_button,
|
822 |
-
'hover_color' => $hover_color,
|
823 |
-
'layer_effect_in' => $layer_effect_in,
|
824 |
-
'layer_effect_out' => $layer_effect_out,
|
825 |
-
'duration_eff_in' => $duration_eff_in,
|
826 |
-
'duration_eff_out' => $duration_eff_out,
|
827 |
-
'target_attr_layer' => $target_attr_layer,
|
828 |
-
'hotp_width' => $hotp_width,
|
829 |
-
'hotp_fbgcolor' => $hotp_fbgcolor,
|
830 |
-
'hotp_border_width' => $hotp_border_width,
|
831 |
-
'hotp_border_style' => $hotp_border_style,
|
832 |
-
'hotp_border_color' => $hotp_border_color,
|
833 |
-
'hotp_border_radius' => $hotp_border_radius,
|
834 |
-
'hotp_text_position' => $hotp_text_position,
|
835 |
-
'google_fonts' => $google_fonts,
|
836 |
-
'add_class' => $add_class,
|
837 |
-
'layer_video_loop' => $layer_video_loop,
|
838 |
-
'youtube_rel_layer_video' => $youtube_rel_layer_video,
|
839 |
-
'hotspot_animation' => $hotspot_animation,
|
840 |
-
'layer_callback_list' => $layer_callback_list,
|
841 |
-
'hotspot_text_display' => $hotspot_text_display,
|
842 |
-
'hover_color_text' => $hover_color_text,
|
843 |
-
'text_alignment' => $text_alignment,
|
844 |
-
'link_to_slide' => $link_to_slide,
|
845 |
-
'align_layer' => $align_layer,
|
846 |
-
'static_layer' => $static_layer,
|
847 |
-
'infinite_in' => $infinite_in,
|
848 |
-
'infinite_out' => $infinite_out,
|
849 |
-
'min_size' => $min_size,
|
850 |
-
));
|
851 |
-
}
|
852 |
-
else {
|
853 |
-
$save = $wpdb->update($wpdb->prefix . 'wdslayer', array(
|
854 |
-
'title' => $title_dimension,
|
855 |
-
'type' => $type,
|
856 |
-
'depth' => $depth,
|
857 |
-
'text' => $text,
|
858 |
-
'link' => $link,
|
859 |
-
'left' => $left,
|
860 |
-
'top' => $top,
|
861 |
-
'start' => $start,
|
862 |
-
'end' => $end,
|
863 |
-
'published' => $published,
|
864 |
-
'color' => $color,
|
865 |
-
'size' => $size,
|
866 |
-
'ffamily' => $ffamily,
|
867 |
-
'fweight' => $fweight,
|
868 |
-
'padding' => $padding,
|
869 |
-
'fbgcolor' => $fbgcolor,
|
870 |
-
'transparent' => $transparent,
|
871 |
-
'border_width' => $border_width,
|
872 |
-
'border_style' => $border_style,
|
873 |
-
'border_color' => $border_color,
|
874 |
-
'border_radius' => $border_radius,
|
875 |
-
'shadow' => $shadow,
|
876 |
-
'image_url' => $image_url,
|
877 |
-
'image_width' => $image_width,
|
878 |
-
'image_height' => $image_height,
|
879 |
-
'image_scale' => $image_scale,
|
880 |
-
'alt' => $alt,
|
881 |
-
'imgtransparent' => $imgtransparent,
|
882 |
-
'social_button' => $social_button,
|
883 |
-
'hover_color' => $hover_color,
|
884 |
-
'layer_effect_in' => $layer_effect_in,
|
885 |
-
'layer_effect_out' => $layer_effect_out,
|
886 |
-
'duration_eff_in' => $duration_eff_in,
|
887 |
-
'duration_eff_out' => $duration_eff_out,
|
888 |
-
'target_attr_layer' => $target_attr_layer,
|
889 |
-
'hotp_width' => $hotp_width,
|
890 |
-
'hotp_fbgcolor' => $hotp_fbgcolor,
|
891 |
-
'hotp_border_width' => $hotp_border_width,
|
892 |
-
'hotp_border_style' => $hotp_border_style,
|
893 |
-
'hotp_border_color' => $hotp_border_color,
|
894 |
-
'hotp_border_radius' => $hotp_border_radius,
|
895 |
-
'hotp_text_position' => $hotp_text_position,
|
896 |
-
'google_fonts' => $google_fonts,
|
897 |
-
'add_class' => $add_class,
|
898 |
-
'layer_video_loop' => $layer_video_loop,
|
899 |
-
'youtube_rel_layer_video' => $youtube_rel_layer_video,
|
900 |
-
'hotspot_animation' => $hotspot_animation,
|
901 |
-
'layer_callback_list' => $layer_callback_list,
|
902 |
-
'hotspot_text_display' => $hotspot_text_display,
|
903 |
-
'hover_color_text' => $hover_color_text,
|
904 |
-
'text_alignment' => $text_alignment,
|
905 |
-
'link_to_slide' => $link_to_slide,
|
906 |
-
'align_layer' => $align_layer,
|
907 |
-
'static_layer' => $static_layer,
|
908 |
-
'infinite_in' => $infinite_in,
|
909 |
-
'infinite_out' => $infinite_out,
|
910 |
-
'min_size' => $min_size,
|
911 |
-
), array('id' => $layer_id));
|
912 |
-
}
|
913 |
-
}
|
914 |
-
}
|
915 |
-
}
|
916 |
-
}
|
917 |
-
|
918 |
-
public function set_watermark() {
|
919 |
-
// Save before set watermark.
|
920 |
-
$save = $this->save_slider_db();
|
921 |
-
$slider_id = $save['id'];
|
922 |
-
$this->save_slide_db( $slider_id );
|
923 |
-
|
924 |
-
global $wpdb;
|
925 |
-
|
926 |
-
$slider_images = $wpdb->get_col($wpdb->prepare('SELECT image_url FROM ' . $wpdb->prefix . 'wdsslide WHERE `slider_id`="%d"', $slider_id));
|
927 |
-
$slider = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE `id`="%d"', $slider_id));
|
928 |
-
|
929 |
-
switch ($slider->built_in_watermark_type) {
|
930 |
-
case 'text': {
|
931 |
-
foreach ($slider_images as $slider_image) {
|
932 |
-
if ($slider_image) {
|
933 |
-
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
934 |
-
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
935 |
-
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
936 |
-
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
937 |
-
$image_name = substr($slider_image_dir, $last_slash_pos);
|
938 |
-
$new_image = $dest_dir . '.original/' . $image_name;
|
939 |
-
if (!is_dir($dest_dir . '.original')) {
|
940 |
-
mkdir($dest_dir . '.original', 0777, TRUE);
|
941 |
-
}
|
942 |
-
if (!file_exists($new_image)) {
|
943 |
-
copy($slider_image_dir, $new_image);
|
944 |
-
}
|
945 |
-
$this->set_text_watermark($slider_image_dir, $slider_image_dir, $slider->built_in_watermark_text, $slider->built_in_watermark_font, $slider->built_in_watermark_font_size, '#' . $slider->built_in_watermark_color, $slider->built_in_watermark_opacity, $slider->built_in_watermark_position);
|
946 |
-
}
|
947 |
-
}
|
948 |
-
break;
|
949 |
-
}
|
950 |
-
case 'image': {
|
951 |
-
foreach ($slider_images as $slider_image) {
|
952 |
-
if ($slider_image) {
|
953 |
-
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
954 |
-
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
955 |
-
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
956 |
-
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
957 |
-
$image_name = substr($slider_image_dir, $last_slash_pos);
|
958 |
-
$new_image = $dest_dir . '.original/' . $image_name;
|
959 |
-
if (!is_dir($dest_dir . '.original')) {
|
960 |
-
mkdir($dest_dir . '.original', 0777, TRUE);
|
961 |
-
}
|
962 |
-
if (!file_exists($new_image)) {
|
963 |
-
copy($slider_image_dir, $new_image);
|
964 |
-
}
|
965 |
-
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
966 |
-
$watermark_image_dir = str_replace(site_url() . '/', ABSPATH, $slider->built_in_watermark_url);
|
967 |
-
$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);
|
968 |
-
}
|
969 |
-
}
|
970 |
-
break;
|
971 |
-
}
|
972 |
-
default: {
|
973 |
-
break;
|
974 |
-
}
|
975 |
-
}
|
976 |
-
}
|
977 |
-
|
978 |
-
public function reset_watermark() {
|
979 |
-
// Save before reset watermark.
|
980 |
-
$save = $this->save_slider_db();
|
981 |
-
$slider_id = $save['id'];
|
982 |
-
$this->save_slide_db( $slider_id );
|
983 |
-
|
984 |
-
global $wpdb;
|
985 |
-
|
986 |
-
$slider_images = $wpdb->get_col($wpdb->prepare('SELECT image_url FROM ' . $wpdb->prefix . 'wdsslide WHERE `slider_id`="%d"', $slider_id));
|
987 |
-
|
988 |
-
foreach ($slider_images as $slider_image) {
|
989 |
-
if ($slider_image) {
|
990 |
-
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
991 |
-
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
992 |
-
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
993 |
-
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
994 |
-
$image_name = substr($slider_image_dir, $last_slash_pos);
|
995 |
-
$new_image = $dest_dir . '.original/' . $image_name;
|
996 |
-
if (file_exists($new_image)) {
|
997 |
-
copy($new_image, $slider_image_dir);
|
998 |
-
}
|
999 |
-
else {
|
1000 |
-
// For 1.0.1 version.
|
1001 |
-
$last_dot_pos = strrpos($slider_image_dir, '.');
|
1002 |
-
$base_name = substr($slider_image_dir, 0, $last_dot_pos);
|
1003 |
-
$ext = substr($slider_image_dir, strlen($base_name));
|
1004 |
-
$new_image = $base_name . '-original' . $ext;
|
1005 |
-
if (file_exists($new_image)) {
|
1006 |
-
copy($new_image, $slider_image_dir);
|
1007 |
-
}
|
1008 |
-
}
|
1009 |
-
}
|
1010 |
-
}
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
function wds_hex2rgb($hex) {
|
1014 |
-
$hex = str_replace("#", "", $hex);
|
1015 |
-
if (strlen($hex) == 3) {
|
1016 |
-
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
|
1017 |
-
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
|
1018 |
-
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
|
1019 |
-
}
|
1020 |
-
else {
|
1021 |
-
$r = hexdec(substr($hex,0,2));
|
1022 |
-
$g = hexdec(substr($hex,2,2));
|
1023 |
-
$b = hexdec(substr($hex,4,2));
|
1024 |
-
}
|
1025 |
-
$rgb = array($r, $g, $b);
|
1026 |
-
return $rgb;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
function wds_imagettfbboxdimensions($font_size, $font_angle, $font, $text) {
|
1030 |
-
$box = @ImageTTFBBox($font_size, $font_angle, $font, $text) or die;
|
1031 |
-
$max_x = max(array($box[0], $box[2], $box[4], $box[6]));
|
1032 |
-
$max_y = max(array($box[1], $box[3], $box[5], $box[7]));
|
1033 |
-
$min_x = min(array($box[0], $box[2], $box[4], $box[6]));
|
1034 |
-
$min_y = min(array($box[1], $box[3], $box[5], $box[7]));
|
1035 |
-
return array(
|
1036 |
-
"width" => ($max_x - $min_x),
|
1037 |
-
"height" => ($max_y - $min_y)
|
1038 |
-
);
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
function set_text_watermark($original_filename, $dest_filename, $watermark_text, $watermark_font, $watermark_font_size, $watermark_color, $watermark_transparency, $watermark_position) {
|
1042 |
-
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
1043 |
-
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
1044 |
-
|
1045 |
-
$watermark_transparency = 127 - ((100 - $watermark_transparency) * 1.27);
|
1046 |
-
@ini_set('memory_limit', '-1');
|
1047 |
-
list($width, $height, $type) = getimagesize($original_filename);
|
1048 |
-
$watermark_image = imagecreatetruecolor($width, $height);
|
1049 |
-
|
1050 |
-
$watermark_color = $this->wds_hex2rgb($watermark_color);
|
1051 |
-
$watermark_color = imagecolorallocatealpha($watermark_image, $watermark_color[0], $watermark_color[1], $watermark_color[2], $watermark_transparency);
|
1052 |
-
$watermark_font = WDS()->plugin_dir . '/fonts/' . $watermark_font;
|
1053 |
-
$watermark_font_size = ($height * $watermark_font_size / 500);
|
1054 |
-
$watermark_position = explode('-', $watermark_position);
|
1055 |
-
$watermark_sizes = $this->wds_imagettfbboxdimensions($watermark_font_size, 0, $watermark_font, $watermark_text);
|
1056 |
-
|
1057 |
-
$top = $height - 5;
|
1058 |
-
$left = $width - $watermark_sizes['width'] - 5;
|
1059 |
-
switch ($watermark_position[0]) {
|
1060 |
-
case 'top':
|
1061 |
-
$top = $watermark_sizes['height'] + 5;
|
1062 |
-
break;
|
1063 |
-
case 'middle':
|
1064 |
-
$top = ($height + $watermark_sizes['height']) / 2;
|
1065 |
-
break;
|
1066 |
-
}
|
1067 |
-
switch ($watermark_position[1]) {
|
1068 |
-
case 'left':
|
1069 |
-
$left = 5;
|
1070 |
-
break;
|
1071 |
-
case 'center':
|
1072 |
-
$left = ($width - $watermark_sizes['width']) / 2;
|
1073 |
-
break;
|
1074 |
-
}
|
1075 |
-
if ($type == 2) {
|
1076 |
-
$image = imagecreatefromjpeg($original_filename);
|
1077 |
-
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1078 |
-
imagejpeg ($image, $dest_filename, 100);
|
1079 |
-
imagedestroy($image);
|
1080 |
-
}
|
1081 |
-
elseif ($type == 3) {
|
1082 |
-
$image = imagecreatefrompng($original_filename);
|
1083 |
-
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1084 |
-
imageColorAllocateAlpha($image, 0, 0, 0, 127);
|
1085 |
-
imagealphablending($image, FALSE);
|
1086 |
-
imagesavealpha($image, TRUE);
|
1087 |
-
imagepng($image, $dest_filename, 9);
|
1088 |
-
imagedestroy($image);
|
1089 |
-
}
|
1090 |
-
elseif ($type == 1) {
|
1091 |
-
$image = imagecreatefromgif($original_filename);
|
1092 |
-
imageColorAllocateAlpha($watermark_image, 0, 0, 0, 127);
|
1093 |
-
imagecopy($watermark_image, $image, 0, 0, 0, 0, $width, $height);
|
1094 |
-
imagettftext($watermark_image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1095 |
-
imagealphablending($watermark_image, FALSE);
|
1096 |
-
imagesavealpha($watermark_image, TRUE);
|
1097 |
-
imagegif($watermark_image, $dest_filename);
|
1098 |
-
imagedestroy($image);
|
1099 |
-
}
|
1100 |
-
imagedestroy($watermark_image);
|
1101 |
-
@ini_restore('memory_limit');
|
1102 |
-
}
|
1103 |
-
|
1104 |
-
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
1105 |
-
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
1106 |
-
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
1107 |
-
$watermark_url = htmlspecialchars_decode($watermark_url, ENT_COMPAT | ENT_QUOTES);
|
1108 |
-
|
1109 |
-
list($width, $height, $type) = getimagesize($original_filename);
|
1110 |
-
list($width_watermark, $height_watermark, $type_watermark) = getimagesize($watermark_url);
|
1111 |
-
|
1112 |
-
$watermark_width = $width * $watermark_width / 100;
|
1113 |
-
$watermark_height = $height_watermark * $watermark_width / $width_watermark;
|
1114 |
-
|
1115 |
-
$watermark_position = explode('-', $watermark_position);
|
1116 |
-
$top = $height - $watermark_height - 5;
|
1117 |
-
$left = $width - $watermark_width - 5;
|
1118 |
-
switch ($watermark_position[0]) {
|
1119 |
-
case 'top':
|
1120 |
-
$top = 5;
|
1121 |
-
break;
|
1122 |
-
case 'middle':
|
1123 |
-
$top = ($height - $watermark_height) / 2;
|
1124 |
-
break;
|
1125 |
-
}
|
1126 |
-
switch ($watermark_position[1]) {
|
1127 |
-
case 'left':
|
1128 |
-
$left = 5;
|
1129 |
-
break;
|
1130 |
-
case 'center':
|
1131 |
-
$left = ($width - $watermark_width) / 2;
|
1132 |
-
break;
|
1133 |
-
}
|
1134 |
-
@ini_set('memory_limit', '-1');
|
1135 |
-
if ($type_watermark == 2) {
|
1136 |
-
$watermark_image = imagecreatefromjpeg($watermark_url);
|
1137 |
-
}
|
1138 |
-
elseif ($type_watermark == 3) {
|
1139 |
-
$watermark_image = imagecreatefrompng($watermark_url);
|
1140 |
-
}
|
1141 |
-
elseif ($type_watermark == 1) {
|
1142 |
-
$watermark_image = imagecreatefromgif($watermark_url);
|
1143 |
-
}
|
1144 |
-
else {
|
1145 |
-
return false;
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
$watermark_image_resized = imagecreatetruecolor($watermark_width, $watermark_height);
|
1149 |
-
imagecolorallocatealpha($watermark_image_resized, 255, 255, 255, 127);
|
1150 |
-
imagealphablending($watermark_image_resized, FALSE);
|
1151 |
-
imagesavealpha($watermark_image_resized, TRUE);
|
1152 |
-
imagecopyresampled ($watermark_image_resized, $watermark_image, 0, 0, 0, 0, $watermark_width, $watermark_height, $width_watermark, $height_watermark);
|
1153 |
-
|
1154 |
-
if ($type == 2) {
|
1155 |
-
$image = imagecreatefromjpeg($original_filename);
|
1156 |
-
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
1157 |
-
if ($dest_filename <> '') {
|
1158 |
-
imagejpeg ($image, $dest_filename, 100);
|
1159 |
-
} else {
|
1160 |
-
header('Content-Type: image/jpeg');
|
1161 |
-
imagejpeg($image, null, 100);
|
1162 |
-
};
|
1163 |
-
imagedestroy($image);
|
1164 |
-
}
|
1165 |
-
elseif ($type == 3) {
|
1166 |
-
$image = imagecreatefrompng($original_filename);
|
1167 |
-
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
1168 |
-
imagealphablending($image, FALSE);
|
1169 |
-
imagesavealpha($image, TRUE);
|
1170 |
-
imagepng($image, $dest_filename, 9);
|
1171 |
-
imagedestroy($image);
|
1172 |
-
}
|
1173 |
-
elseif ($type == 1) {
|
1174 |
-
$image = imagecreatefromgif($original_filename);
|
1175 |
-
$tempimage = imagecreatetruecolor($width, $height);
|
1176 |
-
imagecopy($tempimage, $image, 0, 0, 0, 0, $width, $height);
|
1177 |
-
imagecopy($tempimage, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
1178 |
-
imagegif($tempimage, $dest_filename);
|
1179 |
-
imagedestroy($image);
|
1180 |
-
imagedestroy($tempimage);
|
1181 |
-
}
|
1182 |
-
imagedestroy($watermark_image);
|
1183 |
-
@ini_restore('memory_limit');
|
1184 |
-
}
|
1185 |
-
|
1186 |
-
/**
|
1187 |
-
* Create frontend js file.
|
1188 |
-
*
|
1189 |
-
* @param int $id
|
1190 |
-
*
|
1191 |
-
* @return mixed
|
1192 |
-
*/
|
1193 |
-
private function create_frontend_js_file( $id = 0 ) {
|
1194 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelSliders_wds.php";
|
1195 |
-
$model = new WDSModelSliders_wds();
|
1196 |
-
return $model->create_frontend_js_file( $id = 0 );
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
/**
|
1200 |
-
* Remove frontend js file.
|
1201 |
-
*
|
1202 |
-
* @param int $id
|
1203 |
-
*/
|
1204 |
-
private function remove_frontend_js_file( $id = 0 ) {
|
1205 |
-
$wp_upload_dir = wp_upload_dir();
|
1206 |
-
if ( is_file($wp_upload_dir['basedir'] . '/slider-wd-scripts/script-' . $id . '.js') ){
|
1207 |
-
unlink( $wp_upload_dir['basedir'] . '/slider-wd-scripts/script-' . $id . '.js' );
|
1208 |
-
}
|
1209 |
-
}
|
1210 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SlidersController_wds
|
5 |
+
*/
|
6 |
+
class SlidersController_wds {
|
7 |
+
/**
|
8 |
+
* @var $model
|
9 |
+
*/
|
10 |
+
private $model;
|
11 |
+
/**
|
12 |
+
* @var $view
|
13 |
+
*/
|
14 |
+
private $view;
|
15 |
+
/**
|
16 |
+
* @var string $page
|
17 |
+
*/
|
18 |
+
private $page;
|
19 |
+
/**
|
20 |
+
* @var int $items_per_page
|
21 |
+
*/
|
22 |
+
private $items_per_page = 20;
|
23 |
+
/**
|
24 |
+
* @var array $actions
|
25 |
+
*/
|
26 |
+
private $actions = array();
|
27 |
+
|
28 |
+
/**
|
29 |
+
* SlidersController_wds constructor.
|
30 |
+
* @param array $args
|
31 |
+
*/
|
32 |
+
public function __construct( $args = array() ) {
|
33 |
+
$this->model = $args['model'];
|
34 |
+
$this->view = $args['view'];
|
35 |
+
$this->page = WDW_S_Library::get('page');
|
36 |
+
$this->actions = array(
|
37 |
+
'publish' => array(
|
38 |
+
'title' => __('Publish', WDS()->prefix),
|
39 |
+
'bulk_action' => __('published', WDS()->prefix),
|
40 |
+
),
|
41 |
+
'unpublish' => array(
|
42 |
+
'title' => __('Unpublish', WDS()->prefix),
|
43 |
+
'bulk_action' => __('unpublished', WDS()->prefix),
|
44 |
+
),
|
45 |
+
'delete' => array(
|
46 |
+
'title' => __('Delete', WDS()->prefix),
|
47 |
+
'bulk_action' => __('deleted', WDS()->prefix),
|
48 |
+
),
|
49 |
+
'duplicate' => array(
|
50 |
+
'title' => __('Duplicate', WDS()->prefix),
|
51 |
+
'bulk_action' => __('duplicated', WDS()->prefix),
|
52 |
+
),
|
53 |
+
'export' => array(
|
54 |
+
'title' => __('Export', WDS()->prefix),
|
55 |
+
'bulk_action' => __('export', WDS()->prefix),
|
56 |
+
),
|
57 |
+
'merge' => array(
|
58 |
+
'title' => __('Merge', WDS()->prefix),
|
59 |
+
'bulk_action' => __('merged', WDS()->prefix),
|
60 |
+
),
|
61 |
+
);
|
62 |
+
$user = get_current_user_id();
|
63 |
+
$screen = get_current_screen();
|
64 |
+
$option = $screen->get_option('per_page', 'option');
|
65 |
+
$this->items_per_page = get_user_meta($user, $option, TRUE);
|
66 |
+
|
67 |
+
if ( empty ($this->items_per_page) || $this->items_per_page < 1 ) {
|
68 |
+
$this->items_per_page = $screen->get_option('per_page', 'default');
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Execute.
|
74 |
+
*/
|
75 |
+
public function execute() {
|
76 |
+
$task = WDW_S_Library::get('task');
|
77 |
+
$id = (int) WDW_S_Library::get('current_id', 0);
|
78 |
+
if ( method_exists($this, $task) ) {
|
79 |
+
if ( $task != 'edit' && $task != 'display' ) {
|
80 |
+
check_admin_referer(WDS()->nonce, WDS()->nonce);
|
81 |
+
}
|
82 |
+
$action = WDW_S_Library::get('bulk_action', -1);
|
83 |
+
if ( $action != -1 ) {
|
84 |
+
$this->bulk_action( $action );
|
85 |
+
}
|
86 |
+
else {
|
87 |
+
$this->$task( $id );
|
88 |
+
}
|
89 |
+
}
|
90 |
+
else {
|
91 |
+
$this->display();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Bulk actions.
|
97 |
+
*
|
98 |
+
* @param $task
|
99 |
+
*/
|
100 |
+
public function bulk_action( $task = '' ) {
|
101 |
+
$message = 0;
|
102 |
+
$successfully_updated = 0;
|
103 |
+
$url_arg = array('page' => $this->page, 'task' => 'display');
|
104 |
+
$check = WDW_S_Library::get('check', '');
|
105 |
+
$all = WDW_S_Library::get('check_all_items', '');
|
106 |
+
$all = ($all == 'on' ? TRUE : FALSE);
|
107 |
+
|
108 |
+
if ( method_exists($this, $task) ) {
|
109 |
+
if ( $all ) {
|
110 |
+
$message = $this->$task(0, TRUE, TRUE);
|
111 |
+
$url_arg['message'] = $message;
|
112 |
+
}
|
113 |
+
else {
|
114 |
+
if ( $check ) {
|
115 |
+
foreach ( $check as $id => $item ) {
|
116 |
+
$message = $this->$task($id, TRUE);
|
117 |
+
if ( $message != 2 ) {
|
118 |
+
// Increase successfully updated items count, if action doesn't failed.
|
119 |
+
$successfully_updated++;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
if ( $successfully_updated ) {
|
124 |
+
$message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDS()->prefix), $successfully_updated, $this->actions[$task]['bulk_action']);
|
125 |
+
}
|
126 |
+
$key = ($message === 2 ? 'message' : 'msg');
|
127 |
+
$url_arg[$key] = $message;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
WDW_S_Library::redirect( add_query_arg($url_arg, admin_url('admin.php')) );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Display.
|
135 |
+
*/
|
136 |
+
public function display() {
|
137 |
+
// Set params for view.
|
138 |
+
$params = array();
|
139 |
+
$params['page'] = $this->page;
|
140 |
+
$params['page_title'] = __('Sliders', WDS()->prefix);
|
141 |
+
$params['actions'] = $this->actions;
|
142 |
+
$params['order'] = WDW_S_Library::get('order', 'asc');
|
143 |
+
$params['orderby'] = WDW_S_Library::get('orderby', 'name');
|
144 |
+
// To prevent SQL injections.
|
145 |
+
$params['order'] = ($params['order'] == 'desc') ? 'desc' : 'asc';
|
146 |
+
if ( !in_array($params['orderby'], array( 'name' )) ) {
|
147 |
+
$params['orderby'] = 'id';
|
148 |
+
}
|
149 |
+
$params['items_per_page'] = $this->items_per_page;
|
150 |
+
$page = (int) WDW_S_Library::get('paged', 1);
|
151 |
+
$page_num = $page ? ($page - 1) * $params['items_per_page'] : 0;
|
152 |
+
$params['page_num'] = $page_num;
|
153 |
+
$params['search'] = WDW_S_Library::get('s', '');
|
154 |
+
|
155 |
+
$params['preview_url'] = $this->model->get_slide_preview_post();
|
156 |
+
$data = $this->model->get_rows_data($params);
|
157 |
+
if ( !empty($data['rows']) ) {
|
158 |
+
$ids = array();
|
159 |
+
foreach( $data['rows'] as $row ) {
|
160 |
+
$ids[] = $row->id;
|
161 |
+
}
|
162 |
+
// Get slides more info.
|
163 |
+
$params['slides_info'] = $this->model->get_slides_info( array('ids' => $ids) );
|
164 |
+
}
|
165 |
+
$params['rows'] = $data['rows'];
|
166 |
+
$params['total'] = $data['total'];
|
167 |
+
|
168 |
+
$url_arg = array();
|
169 |
+
$page_url = add_query_arg( array(
|
170 |
+
'page' => $this->page,
|
171 |
+
WDS()->nonce => wp_create_nonce(WDS()->nonce),
|
172 |
+
), admin_url('admin.php') );
|
173 |
+
$params['page_url'] = add_query_arg($url_arg, $page_url);
|
174 |
+
|
175 |
+
$this->view->display( $params );
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Edit.
|
180 |
+
*
|
181 |
+
* @param int $id
|
182 |
+
* @param bool $reset
|
183 |
+
*/
|
184 |
+
public function edit( $id = 0, $reset = FALSE ) {
|
185 |
+
$row = $this->model->get_row_data($id, $reset);
|
186 |
+
if ( $id != 0 && empty($row->id) ) {
|
187 |
+
WDW_S_Library::redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
|
188 |
+
}
|
189 |
+
$slides_row = $this->model->get_slides_row_data($id);
|
190 |
+
$layers_row = array();
|
191 |
+
if ( !empty($slides_row) ) {
|
192 |
+
foreach ( $slides_row as $slide_row) {
|
193 |
+
$slide_ids[] = $slide_row->id;
|
194 |
+
}
|
195 |
+
$layers_row = $this->model->get_layers_row_data( $slide_ids );
|
196 |
+
}
|
197 |
+
$wds_global_options = get_option("wds_global_options", 0);
|
198 |
+
$options_values = WDW_S_Library::get_values();
|
199 |
+
$global_options = json_decode($wds_global_options);
|
200 |
+
$page_title = __('Create new slider', WDS()->prefix);
|
201 |
+
$save_btn_name = __('Publish', WDS()->prefix);
|
202 |
+
if ( $id ) {
|
203 |
+
$page_title = sprintf(__('Edit slider %s', WDS()->prefix), $row->name);
|
204 |
+
$save_btn_name = __('Update', WDS()->prefix);
|
205 |
+
}
|
206 |
+
|
207 |
+
// Set params for view.
|
208 |
+
$params = array();
|
209 |
+
$params['id'] = $id;
|
210 |
+
$params['row'] = $row;
|
211 |
+
$params['slides_row'] = $slides_row;
|
212 |
+
$params['layers_row'] = $layers_row;
|
213 |
+
$params['global_options'] = $global_options;
|
214 |
+
$params['options_values'] = $options_values;
|
215 |
+
$params['slider_preview_link'] = $this->model->get_slide_preview_post();
|
216 |
+
$params['sub_tab_type'] = WDW_S_Library::get('sub_tab', '');
|
217 |
+
$params['page_title'] = $page_title;
|
218 |
+
$params['save_btn_name'] = $save_btn_name;
|
219 |
+
|
220 |
+
$this->view->edit( $params );
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Apply.
|
225 |
+
*
|
226 |
+
* @param int $id
|
227 |
+
*/
|
228 |
+
public function apply( $id = 0 ) {
|
229 |
+
$save = $this->save_slider_db();
|
230 |
+
$id = $save['id'];
|
231 |
+
$this->save_slide_db( $id );
|
232 |
+
// TODO. need works the other version.
|
233 |
+
// $this->create_frontend_js_file( $id );
|
234 |
+
$this->edit( $id );
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Publish.
|
239 |
+
*
|
240 |
+
* @param $id
|
241 |
+
* @param bool $bulk
|
242 |
+
* @param bool $all
|
243 |
+
*
|
244 |
+
* @return int
|
245 |
+
*/
|
246 |
+
public function publish( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
247 |
+
$message = $this->model->publish($id, $all);
|
248 |
+
if ( $bulk ) {
|
249 |
+
return $message;
|
250 |
+
}
|
251 |
+
|
252 |
+
WDW_S_Library::redirect( add_query_arg( array(
|
253 |
+
'page' => $this->page,
|
254 |
+
'task' => 'display',
|
255 |
+
'message' => $message,
|
256 |
+
), admin_url('admin.php')));
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Unpublish.
|
261 |
+
*
|
262 |
+
* @param $id
|
263 |
+
* @param bool $bulk
|
264 |
+
* @param bool $all
|
265 |
+
*
|
266 |
+
* @return int
|
267 |
+
*/
|
268 |
+
public function unpublish( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
269 |
+
$message = $this->model->unpublish( $id, $all );
|
270 |
+
if ( $bulk ) {
|
271 |
+
return $message;
|
272 |
+
}
|
273 |
+
|
274 |
+
WDW_S_Library::redirect( add_query_arg( array(
|
275 |
+
'page' => $this->page,
|
276 |
+
'task' => 'display',
|
277 |
+
'message' => $message,
|
278 |
+
), admin_url('admin.php')));
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Delete.
|
283 |
+
*
|
284 |
+
* @param $id
|
285 |
+
* @param bool $bulk
|
286 |
+
* @param bool $all
|
287 |
+
*
|
288 |
+
* @return int
|
289 |
+
*/
|
290 |
+
public function delete( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
291 |
+
$message = $this->model->delete($id, $all);
|
292 |
+
if ( $bulk ) {
|
293 |
+
return $message;
|
294 |
+
}
|
295 |
+
|
296 |
+
WDW_S_Library::redirect( add_query_arg( array(
|
297 |
+
'page' => $this->page,
|
298 |
+
'task' => 'display',
|
299 |
+
'message' => $message,
|
300 |
+
), admin_url('admin.php')));
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Duplicate.
|
305 |
+
*
|
306 |
+
* @param $id
|
307 |
+
* @param bool $bulk
|
308 |
+
* @param bool $all
|
309 |
+
*
|
310 |
+
* @return int
|
311 |
+
*/
|
312 |
+
public function duplicate( $id = 0, $bulk = FALSE, $all = FALSE ) {
|
313 |
+
$message = $this->model->duplicate($id, $all);
|
314 |
+
if ( $bulk ) {
|
315 |
+
return $message;
|
316 |
+
}
|
317 |
+
|
318 |
+
WDW_S_Library::redirect( add_query_arg( array(
|
319 |
+
'page' => $this->page,
|
320 |
+
'task' => 'display',
|
321 |
+
'message' => $message,
|
322 |
+
), admin_url('admin.php')));
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Reset.
|
327 |
+
*
|
328 |
+
* @param int $id
|
329 |
+
*/
|
330 |
+
public function reset( $id = 0 ) {
|
331 |
+
echo WDW_S_Library::message('Changes must be saved.', 'wd_error');
|
332 |
+
$this->edit( $id, TRUE);
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Merge sliders.
|
337 |
+
*
|
338 |
+
* @param int $id
|
339 |
+
*/
|
340 |
+
public function merge( $id = 0 ) {
|
341 |
+
$id = WDW_S_Library::get('select_slider_merge');
|
342 |
+
$all = WDW_S_Library::get('check_all_items');
|
343 |
+
$message_id = $this->model->merge($id, $all);
|
344 |
+
echo WDW_S_Library::message_id($message_id);
|
345 |
+
$this->display();
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Save slider DB.
|
350 |
+
*
|
351 |
+
* @param int $id
|
352 |
+
*
|
353 |
+
* @return array $data
|
354 |
+
*/
|
355 |
+
public function save_slider_db( $id = 0) {
|
356 |
+
global $wpdb;
|
357 |
+
$allow = TRUE;
|
358 |
+
if ( WDS()->is_free && get_option("wds_theme_version") ) {
|
359 |
+
$allow = FALSE;
|
360 |
+
}
|
361 |
+
$slider_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : $id);
|
362 |
+
$slider_data = (isset($_POST['slider_data']) ? stripslashes($_POST['slider_data']) : '');
|
363 |
+
$params_array = json_decode($slider_data, TRUE);
|
364 |
+
$del_slide_ids_string = (isset($params_array['del_slide_ids_string']) ? substr(sanitize_text_field($params_array['del_slide_ids_string']), 0, -1) : '');
|
365 |
+
if ($del_slide_ids_string) {
|
366 |
+
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id=' . $slider_id . ' AND id IN (' . $del_slide_ids_string . ')');
|
367 |
+
}
|
368 |
+
$name = ((isset($params_array['name'])) ? sanitize_text_field($params_array['name']) : '');
|
369 |
+
$published = ((isset($params_array['published'])) ? (int) sanitize_text_field($params_array['published']) : 1);
|
370 |
+
$full_width = ((isset($params_array['full_width'])) ? (int) sanitize_text_field($params_array['full_width']) : 0);
|
371 |
+
$auto_height = ((isset($params_array['auto_height'])) ? (int) sanitize_text_field($params_array['auto_height']) : 0);
|
372 |
+
$width = ((isset($params_array['width'])) ? (int) sanitize_text_field($params_array['width']) : 900);
|
373 |
+
$height = ((isset($params_array['height'])) ? (int) sanitize_text_field($params_array['height']) : 400);
|
374 |
+
$align = ((isset($params_array['align'])) ? sanitize_text_field($params_array['align']) : 'center');
|
375 |
+
$effect = ((isset($params_array['effect'])) ? sanitize_text_field($params_array['effect']) : 'fade');
|
376 |
+
$time_intervval = ((isset($params_array['time_intervval'])) ? (int) sanitize_text_field($params_array['time_intervval']) : 5);
|
377 |
+
$autoplay = ((isset($params_array['autoplay'])) ? (int) sanitize_text_field($params_array['autoplay']) : 1);
|
378 |
+
$shuffle = ((isset($params_array['shuffle'])) ? (int) sanitize_text_field($params_array['shuffle']) : 0);
|
379 |
+
$music = ((isset($params_array['music'])) ? (int) sanitize_text_field($params_array['music']) : 0);
|
380 |
+
if ( isset($params_array['music_url']) && WDW_S_Library::validate_audio_file($params_array['music_url']) ) {
|
381 |
+
$music_url = sanitize_text_field($params_array['music_url']);
|
382 |
+
$music_url = str_replace(site_url(), '{site_url}', $music_url);
|
383 |
+
}
|
384 |
+
else {
|
385 |
+
$music_url = '';
|
386 |
+
}
|
387 |
+
$preload_images = ((isset($params_array['preload_images'])) ? (int) sanitize_text_field($params_array['preload_images']) : 1);
|
388 |
+
$background_color = ((isset($params_array['background_color'])) ? sanitize_text_field($params_array['background_color']) : '000000');
|
389 |
+
$background_transparent = ((isset($params_array['background_transparent'])) ? (int) sanitize_text_field($params_array['background_transparent']) : 100);
|
390 |
+
$glb_border_width = ((isset($params_array['glb_border_width'])) ? (int) sanitize_text_field($params_array['glb_border_width']) : 0);
|
391 |
+
$glb_border_style = ((isset($params_array['glb_border_style'])) ? sanitize_text_field($params_array['glb_border_style']) : 'none');
|
392 |
+
$glb_border_color = ((isset($params_array['glb_border_color'])) ? sanitize_text_field($params_array['glb_border_color']) : '000000');
|
393 |
+
$glb_border_radius = ((isset($params_array['glb_border_radius'])) ? sanitize_text_field($params_array['glb_border_radius']) : '');
|
394 |
+
$glb_margin = ((isset($params_array['glb_margin'])) ? (int) sanitize_text_field($params_array['glb_margin']) : 0);
|
395 |
+
$glb_box_shadow = ((isset($params_array['glb_box_shadow'])) ? sanitize_text_field($params_array['glb_box_shadow']) : '');
|
396 |
+
$image_right_click = ((isset($params_array['image_right_click'])) ? (int) sanitize_text_field($params_array['image_right_click']) : 0);
|
397 |
+
$layer_out_next = ((isset($params_array['layer_out_next'])) ? (int) sanitize_text_field($params_array['layer_out_next']) : 0);
|
398 |
+
$prev_next_butt = ((isset($params_array['prev_next_butt'])) ? (int) sanitize_text_field($params_array['prev_next_butt']) : 1);
|
399 |
+
$play_paus_butt = ((isset($params_array['play_paus_butt'])) ? (int) sanitize_text_field($params_array['play_paus_butt']) : 0);
|
400 |
+
$navigation = ((isset($params_array['navigation'])) ? sanitize_text_field($params_array['navigation']) : 'hover');
|
401 |
+
$rl_butt_style = ((isset($params_array['rl_butt_style'])) ? sanitize_text_field($params_array['rl_butt_style']) : 'fa-angle');
|
402 |
+
$rl_butt_size = ((isset($params_array['rl_butt_size'])) ? (int) sanitize_text_field($params_array['rl_butt_size']) : 40);
|
403 |
+
$pp_butt_size = ((isset($params_array['pp_butt_size'])) ? (int) sanitize_text_field($params_array['pp_butt_size']) : 40);
|
404 |
+
$butts_color = ((isset($params_array['butts_color'])) ? sanitize_text_field($params_array['butts_color']) : '000000');
|
405 |
+
$butts_transparent = ((isset($params_array['butts_transparent'])) ? (int) sanitize_text_field($params_array['butts_transparent']) : 100);
|
406 |
+
$hover_color = ((isset($params_array['hover_color'])) ? sanitize_text_field($params_array['hover_color']) : 'FFFFFF');
|
407 |
+
$nav_border_width = ((isset($params_array['nav_border_width'])) ? (int) sanitize_text_field($params_array['nav_border_width']) : 0);
|
408 |
+
$nav_border_style = ((isset($params_array['nav_border_style'])) ? sanitize_text_field($params_array['nav_border_style']) : 'none');
|
409 |
+
$nav_border_color = ((isset($params_array['nav_border_color'])) ? sanitize_text_field($params_array['nav_border_color']) : 'FFFFFF');
|
410 |
+
$nav_border_radius = ((isset($params_array['nav_border_radius'])) ? sanitize_text_field($params_array['nav_border_radius']) : '20px');
|
411 |
+
$nav_bg_color = ((isset($params_array['nav_bg_color'])) ? sanitize_text_field($params_array['nav_bg_color']) : 'FFFFFF');
|
412 |
+
$bull_position = ((isset($params_array['bull_position'])) ? sanitize_text_field($params_array['bull_position']) : 'bottom');
|
413 |
+
if (isset($params_array['enable_bullets']) && ($params_array['enable_bullets']) == 0) {
|
414 |
+
$bull_position = 'none';
|
415 |
+
}
|
416 |
+
$bull_style = ((isset($params_array['bull_style']) && $allow) ? sanitize_text_field($params_array['bull_style']) : 'fa-square-o');
|
417 |
+
$bull_size = ((isset($params_array['bull_size']) && $allow) ? (int) sanitize_text_field($params_array['bull_size']) : 20);
|
418 |
+
$bull_color = ((isset($params_array['bull_color']) && $allow) ? sanitize_text_field($params_array['bull_color']) : 'FFFFFF');
|
419 |
+
$bull_act_color = ((isset($params_array['bull_act_color']) && $allow) ? sanitize_text_field($params_array['bull_act_color']) : 'FFFFFF');
|
420 |
+
$bull_margin = ((isset($params_array['bull_margin']) && $allow) ? (int) sanitize_text_field($params_array['bull_margin']) : 3);
|
421 |
+
$film_pos = ((isset($params_array['film_pos'])) ? sanitize_text_field($params_array['film_pos']) : 'none');
|
422 |
+
if (isset($params_array['enable_filmstrip']) && ($params_array['enable_filmstrip'] == 0)) {
|
423 |
+
$film_pos = 'none';
|
424 |
+
}
|
425 |
+
$film_thumb_width = ((isset($params_array['film_thumb_width'])) ? (int) sanitize_text_field($params_array['film_thumb_width']) : 100);
|
426 |
+
$film_thumb_height = ((isset($params_array['film_thumb_height'])) ? (int) sanitize_text_field($params_array['film_thumb_height']) : 50);
|
427 |
+
$film_bg_color = ((isset($params_array['film_bg_color'])) ? sanitize_text_field($params_array['film_bg_color']) : '000000');
|
428 |
+
$film_tmb_margin = ((isset($params_array['film_tmb_margin'])) ? (int) sanitize_text_field($params_array['film_tmb_margin']) : 0);
|
429 |
+
$film_act_border_width = ((isset($params_array['film_act_border_width'])) ? (int) sanitize_text_field($params_array['film_act_border_width']) : 0);
|
430 |
+
$film_act_border_style = ((isset($params_array['film_act_border_style'])) ? sanitize_text_field($params_array['film_act_border_style']) : 'none');
|
431 |
+
$film_act_border_color = ((isset($params_array['film_act_border_color'])) ? sanitize_text_field($params_array['film_act_border_color']) : 'FFFFFF');
|
432 |
+
$film_dac_transparent = ((isset($params_array['film_dac_transparent'])) ? (int) sanitize_text_field($params_array['film_dac_transparent']) : 50);
|
433 |
+
$built_in_watermark_type = (isset($params_array['built_in_watermark_type']) ? sanitize_text_field($params_array['built_in_watermark_type']) : 'none');
|
434 |
+
$built_in_watermark_position = (isset($params_array['built_in_watermark_position']) ? sanitize_text_field($params_array['built_in_watermark_position']) : 'middle-center');
|
435 |
+
$built_in_watermark_size = (isset($params_array['built_in_watermark_size']) ? (int) sanitize_text_field($params_array['built_in_watermark_size']) : 15);
|
436 |
+
$built_in_watermark_url = (isset($params_array['built_in_watermark_url']) ? sanitize_text_field($params_array['built_in_watermark_url']) : '');
|
437 |
+
$built_in_watermark_url = str_replace(site_url(), '{site_url}', $built_in_watermark_url);
|
438 |
+
$built_in_watermark_text = (isset($params_array['built_in_watermark_text']) ? sanitize_text_field($params_array['built_in_watermark_text']) : '10Web.io');
|
439 |
+
$built_in_watermark_opacity = (isset($params_array['built_in_watermark_opacity']) ? (int) sanitize_text_field($params_array['built_in_watermark_opacity']) : 70);
|
440 |
+
$built_in_watermark_font_size = (isset($params_array['built_in_watermark_font_size']) ? (int) sanitize_text_field($params_array['built_in_watermark_font_size']) : 20);
|
441 |
+
$built_in_watermark_font = (isset($params_array['built_in_watermark_font']) ? sanitize_text_field($params_array['built_in_watermark_font']) : '');
|
442 |
+
$built_in_watermark_color = (isset($params_array['built_in_watermark_color']) ? sanitize_text_field($params_array['built_in_watermark_color']) : 'FFFFFF');
|
443 |
+
$css = (isset($params_array['css']) ? htmlspecialchars_decode((stripslashes($params_array['css'])), ENT_QUOTES) : '');
|
444 |
+
$timer_bar_type = (isset($params_array['timer_bar_type']) ? sanitize_text_field($params_array['timer_bar_type']) : 'top');
|
445 |
+
if (isset($params_array['enable_time_bar']) && ($params_array['enable_time_bar'] == 0)) {
|
446 |
+
$timer_bar_type = 'none';
|
447 |
+
}
|
448 |
+
$timer_bar_size = (isset($params_array['timer_bar_size']) ? (int) sanitize_text_field($params_array['timer_bar_size']) : 5);
|
449 |
+
$timer_bar_color = (isset($params_array['timer_bar_color']) ? sanitize_text_field($params_array['timer_bar_color']) : 'BBBBBB');
|
450 |
+
$timer_bar_transparent = (isset($params_array['timer_bar_transparent']) ? (int) sanitize_text_field($params_array['timer_bar_transparent']) : 50);
|
451 |
+
$stop_animation = ((isset($params_array['stop_animation'])) ? (int) sanitize_text_field($params_array['stop_animation']) : 0);
|
452 |
+
$right_butt_url = (isset($params_array['right_butt_url']) ? sanitize_text_field($params_array['right_butt_url']) : '');
|
453 |
+
$right_butt_url = str_replace(site_url(), '{site_url}', $right_butt_url);
|
454 |
+
$left_butt_url = (isset($params_array['left_butt_url']) ? sanitize_text_field($params_array['left_butt_url']) : '');
|
455 |
+
$left_butt_url = str_replace(site_url(), '{site_url}', $left_butt_url);
|
456 |
+
$right_butt_hov_url = (isset($params_array['right_butt_hov_url']) ? sanitize_text_field($params_array['right_butt_hov_url']) : '');
|
457 |
+
$right_butt_hov_url = str_replace(site_url(), '{site_url}', $right_butt_hov_url);
|
458 |
+
$left_butt_hov_url = (isset($params_array['left_butt_hov_url']) ? sanitize_text_field($params_array['left_butt_hov_url']) : '');
|
459 |
+
$left_butt_hov_url = str_replace(site_url(), '{site_url}', $left_butt_hov_url);
|
460 |
+
$rl_butt_img_or_not = (isset($params_array['rl_butt_img_or_not']) ? sanitize_text_field($params_array['rl_butt_img_or_not']) : 'style');
|
461 |
+
$bullets_img_main_url = (isset($params_array['bullets_img_main_url']) ? sanitize_text_field($params_array['bullets_img_main_url']) : '');
|
462 |
+
$bullets_img_main_url = str_replace(site_url(), '{site_url}', $bullets_img_main_url);
|
463 |
+
$bullets_img_hov_url = (isset($params_array['bullets_img_hov_url']) ? sanitize_text_field($params_array['bullets_img_hov_url']) : '');
|
464 |
+
$bullets_img_hov_url = str_replace(site_url(), '{site_url}', $bullets_img_hov_url);
|
465 |
+
$bull_butt_img_or_not = (isset($params_array['bull_butt_img_or_not']) ? sanitize_text_field($params_array['bull_butt_img_or_not']) : 'style');
|
466 |
+
$play_paus_butt_img_or_not = (isset($params_array['play_paus_butt_img_or_not']) ? sanitize_text_field($params_array['play_paus_butt_img_or_not']) : 'style');
|
467 |
+
$play_butt_url = (isset($params_array['play_butt_url']) ? sanitize_text_field($params_array['play_butt_url']) : '');
|
468 |
+
$play_butt_url = str_replace(site_url(), '{site_url}', $play_butt_url);
|
469 |
+
$play_butt_hov_url = (isset($params_array['play_butt_hov_url']) ? sanitize_text_field($params_array['play_butt_hov_url']) : '');
|
470 |
+
$play_butt_hov_url = str_replace(site_url(), '{site_url}', $play_butt_hov_url);
|
471 |
+
$paus_butt_url = (isset($params_array['paus_butt_url']) ? sanitize_text_field($params_array['paus_butt_url']) : '');
|
472 |
+
$paus_butt_url = str_replace(site_url(), '{site_url}', $paus_butt_url);
|
473 |
+
$paus_butt_hov_url = (isset($params_array['paus_butt_hov_url']) ? sanitize_text_field($params_array['paus_butt_hov_url']) : '');
|
474 |
+
$paus_butt_hov_url = str_replace(site_url(), '{site_url}', $paus_butt_hov_url);
|
475 |
+
$start_slide_num = ((isset($params_array['start_slide_num'])) ? (int) stripslashes($params_array['start_slide_num']) : 1);
|
476 |
+
$effect_duration = ((isset($params_array['effect_duration'])) ? (int) stripslashes($params_array['effect_duration']) : 800);
|
477 |
+
$carousel = ((isset($params_array['carousel']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel']) : 0);
|
478 |
+
$carousel_image_counts = ((isset($params_array['carousel_image_counts']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel_image_counts']) : 7);
|
479 |
+
$carousel_image_parameters = ((isset($params_array['carousel_image_parameters']) && !WDS()->is_free) ? sanitize_text_field($params_array['carousel_image_parameters']) : 0.85);
|
480 |
+
$carousel_fit_containerWidth = ((isset($params_array['carousel_fit_containerWidth']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel_fit_containerWidth']) : 0);
|
481 |
+
$carousel_width = ((isset($params_array['carousel_width']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['carousel_width']) : 1000);
|
482 |
+
$parallax_effect = ((isset($params_array['parallax_effect']) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['parallax_effect']) : 0);
|
483 |
+
$mouse_swipe_nav = ((isset($params_array['mouse_swipe_nav'])) ? (int) sanitize_text_field($params_array['mouse_swipe_nav']) : 0);
|
484 |
+
$bull_hover = ((isset($params_array['bull_hover'])) ? (int) sanitize_text_field($params_array['bull_hover']) : 1);
|
485 |
+
$touch_swipe_nav = ((isset($params_array['touch_swipe_nav'])) ? (int) sanitize_text_field($params_array['touch_swipe_nav']) : 1);
|
486 |
+
$mouse_wheel_nav = ((isset($params_array['mouse_wheel_nav'])) ? (int) sanitize_text_field($params_array['mouse_wheel_nav']) : 0);
|
487 |
+
$keyboard_nav = ((isset($params_array['keyboard_nav'])) ? (int) sanitize_text_field($params_array['keyboard_nav']) : 0);
|
488 |
+
$show_thumbnail = ((isset($params_array['show_thumbnail'])) ? (int) sanitize_text_field($params_array['show_thumbnail']) : 0);
|
489 |
+
$thumb_size = ((isset($params_array['thumb_size'])) ? sanitize_text_field($params_array['thumb_size']) : '0.3');
|
490 |
+
$fixed_bg = ((isset($params_array['fixed_bg'])) ? (int) sanitize_text_field($params_array['fixed_bg']) : 0);
|
491 |
+
$smart_crop = ((isset($params_array['smart_crop'])) ? (int) sanitize_text_field($params_array['smart_crop']) : 0);
|
492 |
+
$crop_image_position = ((isset($params_array['crop_image_position'])) ? sanitize_text_field($params_array['crop_image_position']) : 'middle-center');
|
493 |
+
$javascript = ((isset($params_array['javascript'])) ? $params_array['javascript'] : '');
|
494 |
+
$carousel_degree = ((isset($params_array['carousel_degree'])) ? (int) sanitize_text_field($params_array['carousel_degree']) : 0);
|
495 |
+
$carousel_grayscale = ((isset($params_array['carousel_grayscale'])) ? (int) sanitize_text_field($params_array['carousel_grayscale']) : 0);
|
496 |
+
$carousel_transparency = ((isset($params_array['carousel_transparency'])) ? (int) sanitize_text_field($params_array['carousel_transparency']) : 0);
|
497 |
+
$bull_back_act_color = ((isset($params_array['bull_back_act_color'])) ? sanitize_text_field($params_array['bull_back_act_color']) : '000000');
|
498 |
+
$bull_back_color = ((isset($params_array['bull_back_color'])) ? sanitize_text_field($params_array['bull_back_color']) : 'CCCCCC');
|
499 |
+
$bull_radius = ((isset($params_array['bull_radius'])) ? sanitize_text_field($params_array['bull_radius']) : '20px');
|
500 |
+
$slider_loop = ((isset($params_array['slider_loop'])) ? (int) sanitize_text_field($params_array['slider_loop']) : 1);
|
501 |
+
$hide_on_mobile = ((isset($params_array['hide_on_mobile'])) ? (int) sanitize_text_field($params_array['hide_on_mobile']) : 0);
|
502 |
+
$twoway_slideshow = ((isset($params_array['twoway_slideshow'])) ? (int) sanitize_text_field($params_array['twoway_slideshow']) : 0);
|
503 |
+
$full_width_for_mobile = ((isset($params_array['full_width_for_mobile'])) ? (int) sanitize_text_field($params_array['full_width_for_mobile']) : 0);
|
504 |
+
$order_dir = ((isset($params_array['order_dir'])) ? sanitize_text_field($params_array['order_dir']) : 'asc');
|
505 |
+
$data = array(
|
506 |
+
'name' => $name,
|
507 |
+
'published' => $published,
|
508 |
+
'full_width' => $full_width,
|
509 |
+
'auto_height' => $auto_height,
|
510 |
+
'width' => $width,
|
511 |
+
'height' => $height,
|
512 |
+
'align' => $align,
|
513 |
+
'effect' => $effect,
|
514 |
+
'time_intervval' => $time_intervval,
|
515 |
+
'autoplay' => $autoplay,
|
516 |
+
'shuffle' => $shuffle,
|
517 |
+
'music' => $music,
|
518 |
+
'music_url' => $music_url,
|
519 |
+
'preload_images' => $preload_images,
|
520 |
+
'background_color' => $background_color,
|
521 |
+
'background_transparent' => $background_transparent,
|
522 |
+
'glb_border_width' => $glb_border_width,
|
523 |
+
'glb_border_style' => $glb_border_style,
|
524 |
+
'glb_border_color' => $glb_border_color,
|
525 |
+
'glb_border_radius' => $glb_border_radius,
|
526 |
+
'glb_margin' => $glb_margin,
|
527 |
+
'glb_box_shadow' => $glb_box_shadow,
|
528 |
+
'image_right_click' => $image_right_click,
|
529 |
+
'prev_next_butt' => $prev_next_butt,
|
530 |
+
'play_paus_butt' => $play_paus_butt,
|
531 |
+
'navigation' => $navigation,
|
532 |
+
'rl_butt_style' => $rl_butt_style,
|
533 |
+
'rl_butt_size' => $rl_butt_size,
|
534 |
+
'pp_butt_size' => $pp_butt_size,
|
535 |
+
'butts_color' => $butts_color,
|
536 |
+
'butts_transparent' => $butts_transparent,
|
537 |
+
'hover_color' => $hover_color,
|
538 |
+
'nav_border_width' => $nav_border_width,
|
539 |
+
'nav_border_style' => $nav_border_style,
|
540 |
+
'nav_border_color' => $nav_border_color,
|
541 |
+
'nav_border_radius' => $nav_border_radius,
|
542 |
+
'nav_bg_color' => $nav_bg_color,
|
543 |
+
'bull_position' => $bull_position,
|
544 |
+
'bull_style' => $bull_style,
|
545 |
+
'bull_size' => $bull_size,
|
546 |
+
'bull_color' => $bull_color,
|
547 |
+
'bull_act_color' => $bull_act_color,
|
548 |
+
'bull_margin' => $bull_margin,
|
549 |
+
'film_pos' => $film_pos,
|
550 |
+
'film_thumb_width' => $film_thumb_width,
|
551 |
+
'film_thumb_height' => $film_thumb_height,
|
552 |
+
'film_bg_color' => $film_bg_color,
|
553 |
+
'film_tmb_margin' => $film_tmb_margin,
|
554 |
+
'film_act_border_width' => $film_act_border_width,
|
555 |
+
'film_act_border_style' => $film_act_border_style,
|
556 |
+
'film_act_border_color' => $film_act_border_color,
|
557 |
+
'film_dac_transparent' => $film_dac_transparent,
|
558 |
+
'built_in_watermark_type' => $built_in_watermark_type,
|
559 |
+
'built_in_watermark_position' => $built_in_watermark_position,
|
560 |
+
'built_in_watermark_size' => $built_in_watermark_size,
|
561 |
+
'built_in_watermark_url' => $built_in_watermark_url,
|
562 |
+
'built_in_watermark_text' => $built_in_watermark_text,
|
563 |
+
'built_in_watermark_opacity' => $built_in_watermark_opacity,
|
564 |
+
'built_in_watermark_font_size' => $built_in_watermark_font_size,
|
565 |
+
'built_in_watermark_font' => $built_in_watermark_font,
|
566 |
+
'built_in_watermark_color' => $built_in_watermark_color,
|
567 |
+
'css' => $css,
|
568 |
+
'timer_bar_type' => $timer_bar_type,
|
569 |
+
'timer_bar_size' => $timer_bar_size,
|
570 |
+
'timer_bar_color' => $timer_bar_color,
|
571 |
+
'timer_bar_transparent' => $timer_bar_transparent,
|
572 |
+
'layer_out_next' => $layer_out_next,
|
573 |
+
'stop_animation' => $stop_animation,
|
574 |
+
'right_butt_url' => $right_butt_url,
|
575 |
+
'left_butt_url' => $left_butt_url,
|
576 |
+
'right_butt_hov_url' => $right_butt_hov_url,
|
577 |
+
'left_butt_hov_url' => $left_butt_hov_url,
|
578 |
+
'rl_butt_img_or_not' => $rl_butt_img_or_not,
|
579 |
+
'bullets_img_main_url' => $bullets_img_main_url,
|
580 |
+
'bullets_img_hov_url' => $bullets_img_hov_url,
|
581 |
+
'bull_butt_img_or_not' => $bull_butt_img_or_not,
|
582 |
+
'play_paus_butt_img_or_not' => $play_paus_butt_img_or_not,
|
583 |
+
'play_butt_url' => $play_butt_url,
|
584 |
+
'play_butt_hov_url' => $play_butt_hov_url,
|
585 |
+
'paus_butt_url' => $paus_butt_url,
|
586 |
+
'paus_butt_hov_url' => $paus_butt_hov_url,
|
587 |
+
'start_slide_num' => $start_slide_num,
|
588 |
+
'effect_duration' => $effect_duration,
|
589 |
+
'carousel' => $carousel,
|
590 |
+
'carousel_image_counts' => $carousel_image_counts,
|
591 |
+
'carousel_image_parameters' => $carousel_image_parameters,
|
592 |
+
'carousel_fit_containerWidth' => $carousel_fit_containerWidth,
|
593 |
+
'carousel_width' => $carousel_width,
|
594 |
+
'parallax_effect' => $parallax_effect,
|
595 |
+
'mouse_swipe_nav' => $mouse_swipe_nav,
|
596 |
+
'bull_hover' => $bull_hover,
|
597 |
+
'touch_swipe_nav' => $touch_swipe_nav,
|
598 |
+
'mouse_wheel_nav' => $mouse_wheel_nav,
|
599 |
+
'keyboard_nav' => $keyboard_nav,
|
600 |
+
'show_thumbnail' => $show_thumbnail,
|
601 |
+
'thumb_size' => $thumb_size,
|
602 |
+
'fixed_bg' => $fixed_bg,
|
603 |
+
'smart_crop' => $smart_crop,
|
604 |
+
'crop_image_position' => $crop_image_position,
|
605 |
+
'javascript' => $javascript,
|
606 |
+
'carousel_degree' => $carousel_degree,
|
607 |
+
'carousel_grayscale' => $carousel_grayscale,
|
608 |
+
'carousel_transparency' => $carousel_transparency,
|
609 |
+
'bull_back_act_color' => $bull_back_act_color,
|
610 |
+
'bull_back_color' => $bull_back_color,
|
611 |
+
'bull_radius' => $bull_radius,
|
612 |
+
'slider_loop' => $slider_loop,
|
613 |
+
'hide_on_mobile' => $hide_on_mobile,
|
614 |
+
'twoway_slideshow' => $twoway_slideshow,
|
615 |
+
'full_width_for_mobile' => $full_width_for_mobile,
|
616 |
+
'order_dir' => $order_dir,
|
617 |
+
);
|
618 |
+
|
619 |
+
if (!$slider_id) {
|
620 |
+
$save = $wpdb->insert($wpdb->prefix . 'wdsslider', $data);
|
621 |
+
$slider_id = (int) $wpdb->insert_id;
|
622 |
+
$_POST['current_id'] = $slider_id;
|
623 |
+
}
|
624 |
+
else {
|
625 |
+
$save = $wpdb->update($wpdb->prefix . 'wdsslider', $data, array('id' => $slider_id));
|
626 |
+
}
|
627 |
+
$status = 2;
|
628 |
+
if ($save !== FALSE) {
|
629 |
+
$status = 1;
|
630 |
+
}
|
631 |
+
$data = array();
|
632 |
+
$data['id'] = $slider_id;
|
633 |
+
$data['status'] = $status;
|
634 |
+
return $data;
|
635 |
+
}
|
636 |
+
|
637 |
+
/**
|
638 |
+
* Save slide DB.
|
639 |
+
*
|
640 |
+
* @param int $id
|
641 |
+
*/
|
642 |
+
public function save_slide_db( $id = 0 ) {
|
643 |
+
global $wpdb;
|
644 |
+
$allow = TRUE;
|
645 |
+
if ( WDS()->is_free && get_option("wds_theme_version") ) {
|
646 |
+
$allow = FALSE;
|
647 |
+
}
|
648 |
+
$slider_id = (isset($_POST['current_id']) ? (int) $_POST['current_id'] : $id);
|
649 |
+
$save_as_copy = (isset($_POST['save_as_copy']) ? (int) $_POST['save_as_copy'] : 0);
|
650 |
+
if (!$slider_id) {
|
651 |
+
$slider_id = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslider');
|
652 |
+
}
|
653 |
+
$slides_data = (isset($_POST['slides']) ? $_POST['slides'] : array());
|
654 |
+
foreach ($slides_data as $slide_data) {
|
655 |
+
$params_array = json_decode(stripslashes($slide_data), TRUE);
|
656 |
+
$slide_id = (isset($params_array['id']) ? $params_array['id'] : 0);
|
657 |
+
if ($slide_id) {
|
658 |
+
$del_layer_ids_string = ((isset($params_array['slide' . $slide_id . '_del_layer_ids_string']) && !$save_as_copy) ? substr(sanitize_text_field($params_array['slide' . $slide_id . '_del_layer_ids_string']), 0, -1) : '');
|
659 |
+
if ($del_layer_ids_string) {
|
660 |
+
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'wdslayer WHERE id IN (' . $del_layer_ids_string . ')');
|
661 |
+
}
|
662 |
+
$title = ((isset($params_array['title' . $slide_id])) ? sanitize_text_field($params_array['title' . $slide_id]) : '');
|
663 |
+
$type = ((isset($params_array['type' . $slide_id])) ? sanitize_text_field($params_array['type' . $slide_id]) : '');
|
664 |
+
$order = ((isset($params_array['order' . $slide_id])) ? sanitize_text_field($params_array['order' . $slide_id]) : '');
|
665 |
+
$published = ((isset($params_array['published' . $slide_id])) ? sanitize_text_field($params_array['published' . $slide_id]) : '');
|
666 |
+
$target_attr_slide = ((isset($params_array['target_attr_slide' . $slide_id])) ? (int) sanitize_text_field($params_array['target_attr_slide' . $slide_id]) : 0);
|
667 |
+
$link = ((isset($params_array['link' . $slide_id])) ? sanitize_text_field($params_array['link' . $slide_id]) : (($type == 'video') ? 0 : ''));
|
668 |
+
$image_url = ((isset($params_array['image_url' . $slide_id])) ? sanitize_text_field($params_array['image_url' . $slide_id]) : '');
|
669 |
+
$image_url = str_replace(site_url(), '{site_url}', $image_url);
|
670 |
+
$thumb_url = ((isset($params_array['thumb_url' . $slide_id])) ? sanitize_text_field($params_array['thumb_url' . $slide_id]) : '');
|
671 |
+
$thumb_url = str_replace(site_url(), '{site_url}', $thumb_url);
|
672 |
+
$att_width = ((isset($params_array['att_width' . $slide_id])) ? sanitize_text_field($params_array['att_width' . $slide_id]) : '');
|
673 |
+
$att_height = ((isset($params_array['att_height' . $slide_id])) ? sanitize_text_field($params_array['att_height' . $slide_id]) : '');
|
674 |
+
$video_duration = ((isset($params_array['video_duration' . $slide_id])) ? sanitize_text_field($params_array['video_duration' . $slide_id]) : '');
|
675 |
+
$youtube_rel_video = ((isset($params_array['youtube_rel_video' . $slide_id]) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['youtube_rel_video' . $slide_id]) : 0);
|
676 |
+
$video_loop = ((isset($params_array['video_loop' . $slide_id]) && !WDS()->is_free) ? (int) sanitize_text_field($params_array['video_loop' . $slide_id]) : 0);
|
677 |
+
$fillmode = ((isset($params_array['fillmode' . $slide_id])) ? sanitize_text_field($params_array['fillmode' . $slide_id]) : '');
|
678 |
+
$title_dimension = array();
|
679 |
+
$title_dimension['title'] = $title;
|
680 |
+
$title_dimension['att_width'] = $att_width;
|
681 |
+
$title_dimension['att_height'] = $att_height;
|
682 |
+
$title_dimension['video_duration'] = $video_duration;
|
683 |
+
$title_dimension = json_encode($title_dimension);
|
684 |
+
$data = array(
|
685 |
+
'slider_id' => $slider_id,
|
686 |
+
'title' => $title_dimension,
|
687 |
+
'type' => $type,
|
688 |
+
'order' => $order,
|
689 |
+
'published' => $published,
|
690 |
+
'link' => $link,
|
691 |
+
'image_url' => $image_url,
|
692 |
+
'thumb_url' => $thumb_url,
|
693 |
+
'target_attr_slide' => $target_attr_slide,
|
694 |
+
'youtube_rel_video' => $youtube_rel_video,
|
695 |
+
'video_loop' => $video_loop,
|
696 |
+
'fillmode' => $fillmode
|
697 |
+
);
|
698 |
+
if (strpos($slide_id, 'pr') !== FALSE || $save_as_copy) {
|
699 |
+
$wpdb->insert($wpdb->prefix . 'wdsslide', $data);
|
700 |
+
$slide_id_pr = $wpdb->get_var('SELECT MAX(id) FROM ' . $wpdb->prefix . 'wdsslide');
|
701 |
+
}
|
702 |
+
else {
|
703 |
+
$wpdb->update($wpdb->prefix . 'wdsslide', $data, array('id' => $slide_id));
|
704 |
+
$slide_id_pr = $slide_id;
|
705 |
+
}
|
706 |
+
if ( !WDS()->is_free ) {
|
707 |
+
$this->save_layer_db($slide_id, $slide_id_pr, $params_array);
|
708 |
+
}
|
709 |
+
}
|
710 |
+
}
|
711 |
+
}
|
712 |
+
|
713 |
+
public function save_layer_db($slide_id, $slide_id_pr, $params_array) {
|
714 |
+
global $wpdb;
|
715 |
+
$save_as_copy = (isset($_POST['save_as_copy']) ? (int) $_POST['save_as_copy'] : 0);
|
716 |
+
$layer_ids_string = (isset($params_array['slide' . $slide_id . '_layer_ids_string']) ? sanitize_text_field($params_array['slide' . $slide_id . '_layer_ids_string']) : '');
|
717 |
+
$layer_id_array = explode(',', $layer_ids_string);
|
718 |
+
foreach ($layer_id_array as $layer_id) {
|
719 |
+
if ($layer_id) {
|
720 |
+
$prefix = 'slide' . $slide_id . '_layer' . $layer_id;
|
721 |
+
$json_string = (isset($params_array[$prefix . '_json']) ? $params_array[$prefix . '_json'] : '');
|
722 |
+
$params_array_layer = json_decode($json_string, TRUE);
|
723 |
+
$title = ((isset($params_array_layer['title'])) ? sanitize_text_field($params_array_layer['title']) : '');
|
724 |
+
$type = ((isset($params_array_layer['type'])) ? sanitize_text_field($params_array_layer['type']) : '');
|
725 |
+
$depth = ((isset($params_array_layer['depth'])) ? sanitize_text_field($params_array_layer['depth']) : '');
|
726 |
+
$text = ((isset($params_array_layer['text'])) ? stripcslashes($params_array_layer['text']) : '');
|
727 |
+
$link = ((isset($params_array_layer['link'])) ? sanitize_text_field($params_array_layer['link']) : '');
|
728 |
+
$target_attr_layer = ((isset($params_array_layer['target_attr_layer'])) ? (int) sanitize_text_field($params_array_layer['target_attr_layer']) : 0);
|
729 |
+
$left = ((isset($params_array_layer['left'])) ? sanitize_text_field($params_array_layer['left']) : '');
|
730 |
+
$top = ((isset($params_array_layer['top'])) ? sanitize_text_field($params_array_layer['top']) : '');
|
731 |
+
$start = ((isset($params_array_layer['start'])) ? sanitize_text_field($params_array_layer['start']) : '');
|
732 |
+
$end = ((isset($params_array_layer['end'])) ? sanitize_text_field($params_array_layer['end']) : '');
|
733 |
+
$published = ((isset($params_array_layer['published'])) ? sanitize_text_field($params_array_layer['published']) : '');
|
734 |
+
$color = ((isset($params_array_layer['color'])) ? sanitize_text_field($params_array_layer['color']) : '');
|
735 |
+
$size = ((isset($params_array_layer['size'])) ? sanitize_text_field($params_array_layer['size']) : '');
|
736 |
+
$ffamily = ((isset($params_array_layer['ffamily'])) ? sanitize_text_field($params_array_layer['ffamily']) : '');
|
737 |
+
$fweight = ((isset($params_array_layer['fweight'])) ? sanitize_text_field($params_array_layer['fweight']) : '');
|
738 |
+
$padding = ((isset($params_array_layer['padding'])) ? sanitize_text_field($params_array_layer['padding']) : '');
|
739 |
+
$fbgcolor = ((isset($params_array_layer['fbgcolor'])) ? sanitize_text_field($params_array_layer['fbgcolor']) : '');
|
740 |
+
$transparent = ((isset($params_array_layer['transparent'])) ? sanitize_text_field($params_array_layer['transparent']) : '');
|
741 |
+
$border_width = ((isset($params_array_layer['border_width'])) ? sanitize_text_field($params_array_layer['border_width']) : '');
|
742 |
+
$border_style = ((isset($params_array_layer['border_style'])) ? sanitize_text_field($params_array_layer['border_style']) : '');
|
743 |
+
$border_color = ((isset($params_array_layer['border_color'])) ? sanitize_text_field($params_array_layer['border_color']) : '');
|
744 |
+
$border_radius = ((isset($params_array_layer['border_radius'])) ? sanitize_text_field($params_array_layer['border_radius']) : '');
|
745 |
+
$shadow = ((isset($params_array_layer['shadow'])) ? sanitize_text_field($params_array_layer['shadow']) : '');
|
746 |
+
$image_url = ((isset($params_array_layer['image_url'])) ? sanitize_text_field($params_array_layer['image_url']) : '');
|
747 |
+
$image_url = str_replace(site_url(), '{site_url}', $image_url);
|
748 |
+
$image_width = ((isset($params_array_layer['image_width'])) ? sanitize_text_field($params_array_layer['image_width']) : '');
|
749 |
+
$image_height = ((isset($params_array_layer['image_height'])) ? sanitize_text_field($params_array_layer['image_height']) : '');
|
750 |
+
$image_scale = ((isset($params_array_layer['image_scale'])) ? sanitize_text_field($params_array_layer['image_scale']) : '');
|
751 |
+
$alt = ((isset($params_array_layer['alt'])) ? sanitize_text_field($params_array_layer['alt']) : '');
|
752 |
+
$imgtransparent = ((isset($params_array_layer['imgtransparent'])) ? sanitize_text_field($params_array_layer['imgtransparent']) : '');
|
753 |
+
$social_button = ((isset($params_array_layer['social_button'])) ? sanitize_text_field($params_array_layer['social_button']) : '');
|
754 |
+
$hover_color = ((isset($params_array_layer['hover_color'])) ? sanitize_text_field($params_array_layer['hover_color']) : '');
|
755 |
+
$layer_effect_in = ((isset($params_array_layer['layer_effect_in'])) ? sanitize_text_field($params_array_layer['layer_effect_in']) : '');
|
756 |
+
$layer_effect_out = ((isset($params_array_layer['layer_effect_out'])) ? sanitize_text_field($params_array_layer['layer_effect_out']) : '');
|
757 |
+
$duration_eff_in = ((isset($params_array_layer['duration_eff_in'])) ? (int) sanitize_text_field($params_array_layer['duration_eff_in']) : 3);
|
758 |
+
$duration_eff_out = ((isset($params_array_layer['duration_eff_out'])) ? (int) sanitize_text_field($params_array_layer['duration_eff_out']) : 3);
|
759 |
+
|
760 |
+
$hotp_width = ((isset($params_array_layer['hotp_width'])) ? sanitize_text_field($params_array_layer['hotp_width']) : '');
|
761 |
+
$hotp_fbgcolor = ((isset($params_array_layer['hotp_fbgcolor'])) ? sanitize_text_field($params_array_layer['hotp_fbgcolor']) : '');
|
762 |
+
$hotp_border_width = ((isset($params_array_layer['hotp_border_width'])) ? sanitize_text_field($params_array_layer['hotp_border_width']) : '');
|
763 |
+
$hotp_border_style = ((isset($params_array_layer['hotp_border_style'])) ? sanitize_text_field($params_array_layer['hotp_border_style']) : '');
|
764 |
+
$hotp_border_color = ((isset($params_array_layer['hotp_border_color'])) ? sanitize_text_field($params_array_layer['hotp_border_color']) : '');
|
765 |
+
$hotp_border_radius = ((isset($params_array_layer['hotp_border_radius'])) ? sanitize_text_field($params_array_layer['hotp_border_radius']) : '');
|
766 |
+
$hotp_text_position = ((isset($params_array_layer['hotp_text_position'])) ? sanitize_text_field($params_array_layer['hotp_text_position']) : '');
|
767 |
+
$google_fonts = ((isset($params_array_layer['google_fonts'])) ? (int) sanitize_text_field($params_array_layer['google_fonts']) : 0);
|
768 |
+
$attr_width = ((isset($params_array_layer['attr_width'])) ? sanitize_text_field($params_array_layer['attr_width']) : '');
|
769 |
+
$attr_height = ((isset($params_array_layer['attr_height'])) ? sanitize_text_field($params_array_layer['attr_height']) : '');
|
770 |
+
$add_class = ((isset($params_array_layer['add_class'])) ? sanitize_text_field($params_array_layer['add_class']) : '');
|
771 |
+
$layer_video_loop = ((isset($params_array_layer['layer_video_loop'])) ? (int) sanitize_text_field($params_array_layer['layer_video_loop']) : 0);
|
772 |
+
$youtube_rel_layer_video = ((isset($params_array_layer['youtube_rel_layer_video'])) ? (int) sanitize_text_field($params_array_layer['youtube_rel_layer_video']) : 0);
|
773 |
+
$hotspot_animation = ((isset($params_array_layer['hotspot_animation'])) ? (int) sanitize_text_field($params_array_layer['hotspot_animation']) : 1);
|
774 |
+
$layer_callback_list = ((isset($params_array_layer['layer_callback_list'])) ? sanitize_text_field($params_array_layer['layer_callback_list']) : '');
|
775 |
+
$hotspot_text_display = ((isset($params_array_layer['hotspot_text_display'])) ? sanitize_text_field($params_array_layer['hotspot_text_display']) : 'hover');
|
776 |
+
$hover_color_text = ((isset($params_array_layer['hover_color_text'])) ? sanitize_text_field($params_array_layer['hover_color_text']) : '');
|
777 |
+
$text_alignment = ((isset($params_array_layer['text_alignment'])) ? sanitize_text_field($params_array_layer['text_alignment']) : 'center');
|
778 |
+
$link_to_slide = ((isset($params_array_layer['link_to_slide'])) ? (int) sanitize_text_field($params_array_layer['link_to_slide']) : 0);
|
779 |
+
$align_layer = ((isset($params_array_layer['align_layer'])) ? (int) sanitize_text_field($params_array_layer['align_layer']) : 0);
|
780 |
+
$static_layer = ((isset($params_array_layer['static_layer'])) ? (int) sanitize_text_field($params_array_layer['static_layer']) : 0);
|
781 |
+
$infinite_in = ((isset($params_array_layer['infinite_in'])) ? (int) sanitize_text_field($params_array_layer['infinite_in']) : 1);
|
782 |
+
$infinite_out = ((isset($params_array_layer['infinite_out'])) ? (int) sanitize_text_field($params_array_layer['infinite_out']) : 1);
|
783 |
+
$min_size = ((isset($params_array_layer['min_size'])) ? (int) sanitize_text_field($params_array_layer['min_size']) : 11);
|
784 |
+
$title_dimension = array();
|
785 |
+
$title_dimension['title'] = $title;
|
786 |
+
$title_dimension['attr_width'] = $attr_width;
|
787 |
+
$title_dimension['attr_height'] = $attr_height;
|
788 |
+
$title_dimension = json_encode($title_dimension);
|
789 |
+
if ($title) {
|
790 |
+
if (strpos($layer_id, 'pr_') !== FALSE || $save_as_copy) {
|
791 |
+
$save = $wpdb->insert($wpdb->prefix . 'wdslayer', array(
|
792 |
+
'slide_id' => $slide_id_pr,
|
793 |
+
'title' => $title_dimension,
|
794 |
+
'type' => $type,
|
795 |
+
'depth' => $depth,
|
796 |
+
'text' => $text,
|
797 |
+
'link' => $link,
|
798 |
+
'left' => $left,
|
799 |
+
'top' => $top,
|
800 |
+
'start' => $start,
|
801 |
+
'end' => $end,
|
802 |
+
'published' => $published,
|
803 |
+
'color' => $color,
|
804 |
+
'size' => $size,
|
805 |
+
'ffamily' => $ffamily,
|
806 |
+
'fweight' => $fweight,
|
807 |
+
'padding' => $padding,
|
808 |
+
'fbgcolor' => $fbgcolor,
|
809 |
+
'transparent' => $transparent,
|
810 |
+
'border_width' => $border_width,
|
811 |
+
'border_style' => $border_style,
|
812 |
+
'border_color' => $border_color,
|
813 |
+
'border_radius' => $border_radius,
|
814 |
+
'shadow' => $shadow,
|
815 |
+
'image_url' => $image_url,
|
816 |
+
'image_width' => $image_width,
|
817 |
+
'image_height' => $image_height,
|
818 |
+
'image_scale' => $image_scale,
|
819 |
+
'alt' => $alt,
|
820 |
+
'imgtransparent' => $imgtransparent,
|
821 |
+
'social_button' => $social_button,
|
822 |
+
'hover_color' => $hover_color,
|
823 |
+
'layer_effect_in' => $layer_effect_in,
|
824 |
+
'layer_effect_out' => $layer_effect_out,
|
825 |
+
'duration_eff_in' => $duration_eff_in,
|
826 |
+
'duration_eff_out' => $duration_eff_out,
|
827 |
+
'target_attr_layer' => $target_attr_layer,
|
828 |
+
'hotp_width' => $hotp_width,
|
829 |
+
'hotp_fbgcolor' => $hotp_fbgcolor,
|
830 |
+
'hotp_border_width' => $hotp_border_width,
|
831 |
+
'hotp_border_style' => $hotp_border_style,
|
832 |
+
'hotp_border_color' => $hotp_border_color,
|
833 |
+
'hotp_border_radius' => $hotp_border_radius,
|
834 |
+
'hotp_text_position' => $hotp_text_position,
|
835 |
+
'google_fonts' => $google_fonts,
|
836 |
+
'add_class' => $add_class,
|
837 |
+
'layer_video_loop' => $layer_video_loop,
|
838 |
+
'youtube_rel_layer_video' => $youtube_rel_layer_video,
|
839 |
+
'hotspot_animation' => $hotspot_animation,
|
840 |
+
'layer_callback_list' => $layer_callback_list,
|
841 |
+
'hotspot_text_display' => $hotspot_text_display,
|
842 |
+
'hover_color_text' => $hover_color_text,
|
843 |
+
'text_alignment' => $text_alignment,
|
844 |
+
'link_to_slide' => $link_to_slide,
|
845 |
+
'align_layer' => $align_layer,
|
846 |
+
'static_layer' => $static_layer,
|
847 |
+
'infinite_in' => $infinite_in,
|
848 |
+
'infinite_out' => $infinite_out,
|
849 |
+
'min_size' => $min_size,
|
850 |
+
));
|
851 |
+
}
|
852 |
+
else {
|
853 |
+
$save = $wpdb->update($wpdb->prefix . 'wdslayer', array(
|
854 |
+
'title' => $title_dimension,
|
855 |
+
'type' => $type,
|
856 |
+
'depth' => $depth,
|
857 |
+
'text' => $text,
|
858 |
+
'link' => $link,
|
859 |
+
'left' => $left,
|
860 |
+
'top' => $top,
|
861 |
+
'start' => $start,
|
862 |
+
'end' => $end,
|
863 |
+
'published' => $published,
|
864 |
+
'color' => $color,
|
865 |
+
'size' => $size,
|
866 |
+
'ffamily' => $ffamily,
|
867 |
+
'fweight' => $fweight,
|
868 |
+
'padding' => $padding,
|
869 |
+
'fbgcolor' => $fbgcolor,
|
870 |
+
'transparent' => $transparent,
|
871 |
+
'border_width' => $border_width,
|
872 |
+
'border_style' => $border_style,
|
873 |
+
'border_color' => $border_color,
|
874 |
+
'border_radius' => $border_radius,
|
875 |
+
'shadow' => $shadow,
|
876 |
+
'image_url' => $image_url,
|
877 |
+
'image_width' => $image_width,
|
878 |
+
'image_height' => $image_height,
|
879 |
+
'image_scale' => $image_scale,
|
880 |
+
'alt' => $alt,
|
881 |
+
'imgtransparent' => $imgtransparent,
|
882 |
+
'social_button' => $social_button,
|
883 |
+
'hover_color' => $hover_color,
|
884 |
+
'layer_effect_in' => $layer_effect_in,
|
885 |
+
'layer_effect_out' => $layer_effect_out,
|
886 |
+
'duration_eff_in' => $duration_eff_in,
|
887 |
+
'duration_eff_out' => $duration_eff_out,
|
888 |
+
'target_attr_layer' => $target_attr_layer,
|
889 |
+
'hotp_width' => $hotp_width,
|
890 |
+
'hotp_fbgcolor' => $hotp_fbgcolor,
|
891 |
+
'hotp_border_width' => $hotp_border_width,
|
892 |
+
'hotp_border_style' => $hotp_border_style,
|
893 |
+
'hotp_border_color' => $hotp_border_color,
|
894 |
+
'hotp_border_radius' => $hotp_border_radius,
|
895 |
+
'hotp_text_position' => $hotp_text_position,
|
896 |
+
'google_fonts' => $google_fonts,
|
897 |
+
'add_class' => $add_class,
|
898 |
+
'layer_video_loop' => $layer_video_loop,
|
899 |
+
'youtube_rel_layer_video' => $youtube_rel_layer_video,
|
900 |
+
'hotspot_animation' => $hotspot_animation,
|
901 |
+
'layer_callback_list' => $layer_callback_list,
|
902 |
+
'hotspot_text_display' => $hotspot_text_display,
|
903 |
+
'hover_color_text' => $hover_color_text,
|
904 |
+
'text_alignment' => $text_alignment,
|
905 |
+
'link_to_slide' => $link_to_slide,
|
906 |
+
'align_layer' => $align_layer,
|
907 |
+
'static_layer' => $static_layer,
|
908 |
+
'infinite_in' => $infinite_in,
|
909 |
+
'infinite_out' => $infinite_out,
|
910 |
+
'min_size' => $min_size,
|
911 |
+
), array('id' => $layer_id));
|
912 |
+
}
|
913 |
+
}
|
914 |
+
}
|
915 |
+
}
|
916 |
+
}
|
917 |
+
|
918 |
+
public function set_watermark() {
|
919 |
+
// Save before set watermark.
|
920 |
+
$save = $this->save_slider_db();
|
921 |
+
$slider_id = $save['id'];
|
922 |
+
$this->save_slide_db( $slider_id );
|
923 |
+
|
924 |
+
global $wpdb;
|
925 |
+
|
926 |
+
$slider_images = $wpdb->get_col($wpdb->prepare('SELECT image_url FROM ' . $wpdb->prefix . 'wdsslide WHERE `slider_id`="%d"', $slider_id));
|
927 |
+
$slider = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE `id`="%d"', $slider_id));
|
928 |
+
|
929 |
+
switch ($slider->built_in_watermark_type) {
|
930 |
+
case 'text': {
|
931 |
+
foreach ($slider_images as $slider_image) {
|
932 |
+
if ($slider_image) {
|
933 |
+
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
934 |
+
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
935 |
+
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
936 |
+
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
937 |
+
$image_name = substr($slider_image_dir, $last_slash_pos);
|
938 |
+
$new_image = $dest_dir . '.original/' . $image_name;
|
939 |
+
if (!is_dir($dest_dir . '.original')) {
|
940 |
+
mkdir($dest_dir . '.original', 0777, TRUE);
|
941 |
+
}
|
942 |
+
if (!file_exists($new_image)) {
|
943 |
+
copy($slider_image_dir, $new_image);
|
944 |
+
}
|
945 |
+
$this->set_text_watermark($slider_image_dir, $slider_image_dir, $slider->built_in_watermark_text, $slider->built_in_watermark_font, $slider->built_in_watermark_font_size, '#' . $slider->built_in_watermark_color, $slider->built_in_watermark_opacity, $slider->built_in_watermark_position);
|
946 |
+
}
|
947 |
+
}
|
948 |
+
break;
|
949 |
+
}
|
950 |
+
case 'image': {
|
951 |
+
foreach ($slider_images as $slider_image) {
|
952 |
+
if ($slider_image) {
|
953 |
+
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
954 |
+
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
955 |
+
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
956 |
+
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
957 |
+
$image_name = substr($slider_image_dir, $last_slash_pos);
|
958 |
+
$new_image = $dest_dir . '.original/' . $image_name;
|
959 |
+
if (!is_dir($dest_dir . '.original')) {
|
960 |
+
mkdir($dest_dir . '.original', 0777, TRUE);
|
961 |
+
}
|
962 |
+
if (!file_exists($new_image)) {
|
963 |
+
copy($slider_image_dir, $new_image);
|
964 |
+
}
|
965 |
+
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
966 |
+
$watermark_image_dir = str_replace(site_url() . '/', ABSPATH, $slider->built_in_watermark_url);
|
967 |
+
$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);
|
968 |
+
}
|
969 |
+
}
|
970 |
+
break;
|
971 |
+
}
|
972 |
+
default: {
|
973 |
+
break;
|
974 |
+
}
|
975 |
+
}
|
976 |
+
}
|
977 |
+
|
978 |
+
public function reset_watermark() {
|
979 |
+
// Save before reset watermark.
|
980 |
+
$save = $this->save_slider_db();
|
981 |
+
$slider_id = $save['id'];
|
982 |
+
$this->save_slide_db( $slider_id );
|
983 |
+
|
984 |
+
global $wpdb;
|
985 |
+
|
986 |
+
$slider_images = $wpdb->get_col($wpdb->prepare('SELECT image_url FROM ' . $wpdb->prefix . 'wdsslide WHERE `slider_id`="%d"', $slider_id));
|
987 |
+
|
988 |
+
foreach ($slider_images as $slider_image) {
|
989 |
+
if ($slider_image) {
|
990 |
+
$slider_image = str_replace('{site_url}', site_url(), $slider_image);
|
991 |
+
$slider_image_dir = str_replace(site_url() . '/', ABSPATH, $slider_image);
|
992 |
+
$last_slash_pos = strrpos($slider_image_dir, '/') + 1;
|
993 |
+
$dest_dir = substr($slider_image_dir, 0, $last_slash_pos);
|
994 |
+
$image_name = substr($slider_image_dir, $last_slash_pos);
|
995 |
+
$new_image = $dest_dir . '.original/' . $image_name;
|
996 |
+
if (file_exists($new_image)) {
|
997 |
+
copy($new_image, $slider_image_dir);
|
998 |
+
}
|
999 |
+
else {
|
1000 |
+
// For 1.0.1 version.
|
1001 |
+
$last_dot_pos = strrpos($slider_image_dir, '.');
|
1002 |
+
$base_name = substr($slider_image_dir, 0, $last_dot_pos);
|
1003 |
+
$ext = substr($slider_image_dir, strlen($base_name));
|
1004 |
+
$new_image = $base_name . '-original' . $ext;
|
1005 |
+
if (file_exists($new_image)) {
|
1006 |
+
copy($new_image, $slider_image_dir);
|
1007 |
+
}
|
1008 |
+
}
|
1009 |
+
}
|
1010 |
+
}
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
function wds_hex2rgb($hex) {
|
1014 |
+
$hex = str_replace("#", "", $hex);
|
1015 |
+
if (strlen($hex) == 3) {
|
1016 |
+
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
|
1017 |
+
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
|
1018 |
+
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
|
1019 |
+
}
|
1020 |
+
else {
|
1021 |
+
$r = hexdec(substr($hex,0,2));
|
1022 |
+
$g = hexdec(substr($hex,2,2));
|
1023 |
+
$b = hexdec(substr($hex,4,2));
|
1024 |
+
}
|
1025 |
+
$rgb = array($r, $g, $b);
|
1026 |
+
return $rgb;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
function wds_imagettfbboxdimensions($font_size, $font_angle, $font, $text) {
|
1030 |
+
$box = @ImageTTFBBox($font_size, $font_angle, $font, $text) or die;
|
1031 |
+
$max_x = max(array($box[0], $box[2], $box[4], $box[6]));
|
1032 |
+
$max_y = max(array($box[1], $box[3], $box[5], $box[7]));
|
1033 |
+
$min_x = min(array($box[0], $box[2], $box[4], $box[6]));
|
1034 |
+
$min_y = min(array($box[1], $box[3], $box[5], $box[7]));
|
1035 |
+
return array(
|
1036 |
+
"width" => ($max_x - $min_x),
|
1037 |
+
"height" => ($max_y - $min_y)
|
1038 |
+
);
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
function set_text_watermark($original_filename, $dest_filename, $watermark_text, $watermark_font, $watermark_font_size, $watermark_color, $watermark_transparency, $watermark_position) {
|
1042 |
+
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
1043 |
+
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
1044 |
+
|
1045 |
+
$watermark_transparency = 127 - ((100 - $watermark_transparency) * 1.27);
|
1046 |
+
@ini_set('memory_limit', '-1');
|
1047 |
+
list($width, $height, $type) = getimagesize($original_filename);
|
1048 |
+
$watermark_image = imagecreatetruecolor($width, $height);
|
1049 |
+
|
1050 |
+
$watermark_color = $this->wds_hex2rgb($watermark_color);
|
1051 |
+
$watermark_color = imagecolorallocatealpha($watermark_image, $watermark_color[0], $watermark_color[1], $watermark_color[2], $watermark_transparency);
|
1052 |
+
$watermark_font = WDS()->plugin_dir . '/fonts/' . $watermark_font;
|
1053 |
+
$watermark_font_size = ($height * $watermark_font_size / 500);
|
1054 |
+
$watermark_position = explode('-', $watermark_position);
|
1055 |
+
$watermark_sizes = $this->wds_imagettfbboxdimensions($watermark_font_size, 0, $watermark_font, $watermark_text);
|
1056 |
+
|
1057 |
+
$top = $height - 5;
|
1058 |
+
$left = $width - $watermark_sizes['width'] - 5;
|
1059 |
+
switch ($watermark_position[0]) {
|
1060 |
+
case 'top':
|
1061 |
+
$top = $watermark_sizes['height'] + 5;
|
1062 |
+
break;
|
1063 |
+
case 'middle':
|
1064 |
+
$top = ($height + $watermark_sizes['height']) / 2;
|
1065 |
+
break;
|
1066 |
+
}
|
1067 |
+
switch ($watermark_position[1]) {
|
1068 |
+
case 'left':
|
1069 |
+
$left = 5;
|
1070 |
+
break;
|
1071 |
+
case 'center':
|
1072 |
+
$left = ($width - $watermark_sizes['width']) / 2;
|
1073 |
+
break;
|
1074 |
+
}
|
1075 |
+
if ($type == 2) {
|
1076 |
+
$image = imagecreatefromjpeg($original_filename);
|
1077 |
+
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1078 |
+
imagejpeg ($image, $dest_filename, 100);
|
1079 |
+
imagedestroy($image);
|
1080 |
+
}
|
1081 |
+
elseif ($type == 3) {
|
1082 |
+
$image = imagecreatefrompng($original_filename);
|
1083 |
+
imagettftext($image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1084 |
+
imageColorAllocateAlpha($image, 0, 0, 0, 127);
|
1085 |
+
imagealphablending($image, FALSE);
|
1086 |
+
imagesavealpha($image, TRUE);
|
1087 |
+
imagepng($image, $dest_filename, 9);
|
1088 |
+
imagedestroy($image);
|
1089 |
+
}
|
1090 |
+
elseif ($type == 1) {
|
1091 |
+
$image = imagecreatefromgif($original_filename);
|
1092 |
+
imageColorAllocateAlpha($watermark_image, 0, 0, 0, 127);
|
1093 |
+
imagecopy($watermark_image, $image, 0, 0, 0, 0, $width, $height);
|
1094 |
+
imagettftext($watermark_image, $watermark_font_size, 0, $left, $top, $watermark_color, $watermark_font, $watermark_text);
|
1095 |
+
imagealphablending($watermark_image, FALSE);
|
1096 |
+
imagesavealpha($watermark_image, TRUE);
|
1097 |
+
imagegif($watermark_image, $dest_filename);
|
1098 |
+
imagedestroy($image);
|
1099 |
+
}
|
1100 |
+
imagedestroy($watermark_image);
|
1101 |
+
@ini_restore('memory_limit');
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
function set_image_watermark($original_filename, $dest_filename, $watermark_url, $watermark_height, $watermark_width, $watermark_position) {
|
1105 |
+
$original_filename = htmlspecialchars_decode($original_filename, ENT_COMPAT | ENT_QUOTES);
|
1106 |
+
$dest_filename = htmlspecialchars_decode($dest_filename, ENT_COMPAT | ENT_QUOTES);
|
1107 |
+
$watermark_url = htmlspecialchars_decode($watermark_url, ENT_COMPAT | ENT_QUOTES);
|
1108 |
+
|
1109 |
+
list($width, $height, $type) = getimagesize($original_filename);
|
1110 |
+
list($width_watermark, $height_watermark, $type_watermark) = getimagesize($watermark_url);
|
1111 |
+
|
1112 |
+
$watermark_width = $width * $watermark_width / 100;
|
1113 |
+
$watermark_height = $height_watermark * $watermark_width / $width_watermark;
|
1114 |
+
|
1115 |
+
$watermark_position = explode('-', $watermark_position);
|
1116 |
+
$top = $height - $watermark_height - 5;
|
1117 |
+
$left = $width - $watermark_width - 5;
|
1118 |
+
switch ($watermark_position[0]) {
|
1119 |
+
case 'top':
|
1120 |
+
$top = 5;
|
1121 |
+
break;
|
1122 |
+
case 'middle':
|
1123 |
+
$top = ($height - $watermark_height) / 2;
|
1124 |
+
break;
|
1125 |
+
}
|
1126 |
+
switch ($watermark_position[1]) {
|
1127 |
+
case 'left':
|
1128 |
+
$left = 5;
|
1129 |
+
break;
|
1130 |
+
case 'center':
|
1131 |
+
$left = ($width - $watermark_width) / 2;
|
1132 |
+
break;
|
1133 |
+
}
|
1134 |
+
@ini_set('memory_limit', '-1');
|
1135 |
+
if ($type_watermark == 2) {
|
1136 |
+
$watermark_image = imagecreatefromjpeg($watermark_url);
|
1137 |
+
}
|
1138 |
+
elseif ($type_watermark == 3) {
|
1139 |
+
$watermark_image = imagecreatefrompng($watermark_url);
|
1140 |
+
}
|
1141 |
+
elseif ($type_watermark == 1) {
|
1142 |
+
$watermark_image = imagecreatefromgif($watermark_url);
|
1143 |
+
}
|
1144 |
+
else {
|
1145 |
+
return false;
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
$watermark_image_resized = imagecreatetruecolor($watermark_width, $watermark_height);
|
1149 |
+
imagecolorallocatealpha($watermark_image_resized, 255, 255, 255, 127);
|
1150 |
+
imagealphablending($watermark_image_resized, FALSE);
|
1151 |
+
imagesavealpha($watermark_image_resized, TRUE);
|
1152 |
+
imagecopyresampled ($watermark_image_resized, $watermark_image, 0, 0, 0, 0, $watermark_width, $watermark_height, $width_watermark, $height_watermark);
|
1153 |
+
|
1154 |
+
if ($type == 2) {
|
1155 |
+
$image = imagecreatefromjpeg($original_filename);
|
1156 |
+
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
1157 |
+
if ($dest_filename <> '') {
|
1158 |
+
imagejpeg ($image, $dest_filename, 100);
|
1159 |
+
} else {
|
1160 |
+
header('Content-Type: image/jpeg');
|
1161 |
+
imagejpeg($image, null, 100);
|
1162 |
+
};
|
1163 |
+
imagedestroy($image);
|
1164 |
+
}
|
1165 |
+
elseif ($type == 3) {
|
1166 |
+
$image = imagecreatefrompng($original_filename);
|
1167 |
+
imagecopy($image, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
1168 |
+
imagealphablending($image, FALSE);
|
1169 |
+
imagesavealpha($image, TRUE);
|
1170 |
+
imagepng($image, $dest_filename, 9);
|
1171 |
+
imagedestroy($image);
|
1172 |
+
}
|
1173 |
+
elseif ($type == 1) {
|
1174 |
+
$image = imagecreatefromgif($original_filename);
|
1175 |
+
$tempimage = imagecreatetruecolor($width, $height);
|
1176 |
+
imagecopy($tempimage, $image, 0, 0, 0, 0, $width, $height);
|
1177 |
+
imagecopy($tempimage, $watermark_image_resized, $left, $top, 0, 0, $watermark_width, $watermark_height);
|
1178 |
+
imagegif($tempimage, $dest_filename);
|
1179 |
+
imagedestroy($image);
|
1180 |
+
imagedestroy($tempimage);
|
1181 |
+
}
|
1182 |
+
imagedestroy($watermark_image);
|
1183 |
+
@ini_restore('memory_limit');
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
/**
|
1187 |
+
* Create frontend js file.
|
1188 |
+
*
|
1189 |
+
* @param int $id
|
1190 |
+
*
|
1191 |
+
* @return mixed
|
1192 |
+
*/
|
1193 |
+
private function create_frontend_js_file( $id = 0 ) {
|
1194 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelSliders_wds.php";
|
1195 |
+
$model = new WDSModelSliders_wds();
|
1196 |
+
return $model->create_frontend_js_file( $id = 0 );
|
1197 |
+
}
|
1198 |
+
|
1199 |
+
/**
|
1200 |
+
* Remove frontend js file.
|
1201 |
+
*
|
1202 |
+
* @param int $id
|
1203 |
+
*/
|
1204 |
+
private function remove_frontend_js_file( $id = 0 ) {
|
1205 |
+
$wp_upload_dir = wp_upload_dir();
|
1206 |
+
if ( is_file($wp_upload_dir['basedir'] . '/slider-wd-scripts/script-' . $id . '.js') ){
|
1207 |
+
unlink( $wp_upload_dir['basedir'] . '/slider-wd-scripts/script-' . $id . '.js' );
|
1208 |
+
}
|
1209 |
+
}
|
1210 |
}
|
admin/controllers/WDSControllerGoptions_wds.php
CHANGED
@@ -1,164 +1,164 @@
|
|
1 |
-
<?php
|
2 |
-
class WDSControllerGoptions_wds {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
}
|
6 |
-
|
7 |
-
public function execute() {
|
8 |
-
$task = WDW_S_Library::get('task');
|
9 |
-
$id = WDW_S_Library::get('current_id', 0);
|
10 |
-
$message = WDW_S_Library::get('message');
|
11 |
-
echo WDW_S_Library::message_id($message);
|
12 |
-
if (method_exists($this, $task)) {
|
13 |
-
check_admin_referer('nonce_wd', 'nonce_wd');
|
14 |
-
$this->$task($id);
|
15 |
-
}
|
16 |
-
else {
|
17 |
-
$this->display();
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
public function display() {
|
22 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelGoptions_wds.php";
|
23 |
-
$model = new WDSModelGoptions_wds();
|
24 |
-
|
25 |
-
require_once WDS()->plugin_dir . "/admin/views/WDSViewGoptions_wds.php";
|
26 |
-
$view = new WDSViewGoptions_wds($model);
|
27 |
-
$view->display($this->get_sliders());
|
28 |
-
}
|
29 |
-
|
30 |
-
public function save_font_family() {
|
31 |
-
$wds_global_options = json_decode(get_option("wds_global_options"), true);
|
32 |
-
$possib_add_ffamily = (isset($_REQUEST['possib_add_ffamily']) ? sanitize_text_field($_REQUEST['possib_add_ffamily']) : '');
|
33 |
-
$possib_add_ffamily_google = (isset($_REQUEST['possib_add_ffamily_google']) ? sanitize_text_field($_REQUEST['possib_add_ffamily_google']) : '');
|
34 |
-
|
35 |
-
$wds_global_options['possib_add_ffamily'] = $possib_add_ffamily;
|
36 |
-
$wds_global_options['possib_add_ffamily_google'] = $possib_add_ffamily_google;
|
37 |
-
$global_options = json_encode($wds_global_options);
|
38 |
-
update_option("wds_global_options", $global_options);
|
39 |
-
|
40 |
-
$page = WDW_S_Library::get('page');
|
41 |
-
WDW_S_Library::spider_redirect(add_query_arg(array( 'page' => $page,
|
42 |
-
'task' => 'display',
|
43 |
-
'message' => 1,
|
44 |
-
), admin_url('admin.php')));
|
45 |
-
}
|
46 |
-
|
47 |
-
public function save() {
|
48 |
-
$register_scripts = (isset($_REQUEST['register_scripts']) ? (int) $_REQUEST['register_scripts'] : 0);
|
49 |
-
$loading_gif = (isset($_REQUEST['loading_gif']) ? sanitize_text_field($_REQUEST['loading_gif']) : 0);
|
50 |
-
$default_layer_fweight = (isset($_REQUEST['default_layer_fweight']) ? sanitize_text_field($_REQUEST['default_layer_fweight']) : '');
|
51 |
-
$default_layer_start = (isset($_REQUEST['default_layer_start']) ? sanitize_text_field($_REQUEST['default_layer_start']) : 0);
|
52 |
-
$default_layer_effect_in = (isset($_REQUEST['default_layer_effect_in']) ? sanitize_text_field($_REQUEST['default_layer_effect_in']) : '');
|
53 |
-
$default_layer_duration_eff_in = (isset($_REQUEST['default_layer_duration_eff_in']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_in']) : 0);
|
54 |
-
$default_layer_infinite_in = (isset($_REQUEST['default_layer_infinite_in']) ? sanitize_text_field($_REQUEST['default_layer_infinite_in']) : 1);
|
55 |
-
$default_layer_end = (isset($_REQUEST['default_layer_end']) ? sanitize_text_field($_REQUEST['default_layer_end']) : 0);
|
56 |
-
$default_layer_effect_out = (isset($_REQUEST['default_layer_effect_out']) ? sanitize_text_field($_REQUEST['default_layer_effect_out']) : '');
|
57 |
-
$default_layer_duration_eff_out = (isset($_REQUEST['default_layer_duration_eff_out']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_out']) : 0);
|
58 |
-
$default_layer_infinite_out = (isset($_REQUEST['default_layer_infinite_out']) ? sanitize_text_field($_REQUEST['default_layer_infinite_out']) : 1);
|
59 |
-
$default_layer_add_class = (isset($_REQUEST['default_layer_add_class']) ? sanitize_text_field($_REQUEST['default_layer_add_class']) : '');
|
60 |
-
$default_layer_ffamily = (isset($_REQUEST['default_layer_ffamily']) ? sanitize_text_field($_REQUEST['default_layer_ffamily']) : '');
|
61 |
-
$default_layer_google_fonts = (isset($_REQUEST['default_layer_google_fonts']) ? sanitize_text_field($_REQUEST['default_layer_google_fonts']) : 0);
|
62 |
-
$spider_uploader = (isset($_REQUEST['spider_uploader']) ? sanitize_text_field($_REQUEST['spider_uploader']) : 0);
|
63 |
-
$possib_add_ffamily = (isset($_REQUEST['possib_add_ffamily']) ? sanitize_text_field($_REQUEST['possib_add_ffamily']) : '');
|
64 |
-
$possib_add_ffamily_google = (isset($_REQUEST['possib_add_ffamily_google']) ? sanitize_text_field($_REQUEST['possib_add_ffamily_google']) : '');
|
65 |
-
$global_options = array(
|
66 |
-
'default_layer_fweight' => $default_layer_fweight,
|
67 |
-
'default_layer_start' => $default_layer_start,
|
68 |
-
'default_layer_effect_in' => $default_layer_effect_in,
|
69 |
-
'default_layer_duration_eff_in' => $default_layer_duration_eff_in,
|
70 |
-
'default_layer_infinite_in' => $default_layer_infinite_in,
|
71 |
-
'default_layer_end' => $default_layer_end,
|
72 |
-
'default_layer_effect_out' => $default_layer_effect_out,
|
73 |
-
'default_layer_duration_eff_out' => $default_layer_duration_eff_out,
|
74 |
-
'default_layer_infinite_out' => $default_layer_infinite_out,
|
75 |
-
'default_layer_add_class' => $default_layer_add_class,
|
76 |
-
'default_layer_ffamily' => $default_layer_ffamily,
|
77 |
-
'default_layer_google_fonts' => $default_layer_google_fonts,
|
78 |
-
'register_scripts' => $register_scripts,
|
79 |
-
'loading_gif' => $loading_gif,
|
80 |
-
'spider_uploader' => $spider_uploader,
|
81 |
-
'possib_add_ffamily' => $possib_add_ffamily,
|
82 |
-
'possib_add_ffamily_google' => $possib_add_ffamily_google,
|
83 |
-
);
|
84 |
-
$global_options = json_encode($global_options);
|
85 |
-
update_option("wds_global_options", $global_options);
|
86 |
-
$page = WDW_S_Library::get('page');
|
87 |
-
WDW_S_Library::spider_redirect(add_query_arg(array( 'page' => $page,
|
88 |
-
'task' => 'display',
|
89 |
-
'message' => 1,
|
90 |
-
), admin_url('admin.php')));
|
91 |
-
}
|
92 |
-
|
93 |
-
|
94 |
-
public function change_layer_options() {
|
95 |
-
$choose_slider_id = (isset($_REQUEST["choose_slider"]) ? sanitize_text_field($_REQUEST['choose_slider']) : '');
|
96 |
-
$default_layer_ffamily_check = (isset($_REQUEST["default_layer_ffamily_check"]) ? sanitize_text_field($_REQUEST['default_layer_ffamily_check']) : 0);
|
97 |
-
$default_layer_fweight_check = (isset($_REQUEST["default_layer_fweight_check"]) ? sanitize_text_field($_REQUEST['default_layer_fweight_check']) : 0);
|
98 |
-
$default_layer_effect_in_check = (isset($_REQUEST["default_layer_effect_in_check"]) ? sanitize_text_field($_REQUEST['default_layer_effect_in_check']) : 0);
|
99 |
-
$default_layer_effect_out_check = (isset($_REQUEST["default_layer_effect_out_check"]) ? sanitize_text_field($_REQUEST['default_layer_effect_out_check']) : 0);
|
100 |
-
$default_layer_add_class_check = (isset($_REQUEST["default_layer_add_class_check"]) ? sanitize_text_field($_REQUEST['default_layer_add_class_check']) : 0);
|
101 |
-
|
102 |
-
$default_array = array();
|
103 |
-
if ($default_layer_ffamily_check) {
|
104 |
-
$default_layer_ffamily = (isset($_REQUEST['default_layer_ffamily']) ? sanitize_text_field($_REQUEST['default_layer_ffamily']) : '');
|
105 |
-
$default_layer_google_fonts = (isset($_REQUEST['default_layer_google_fonts']) ? sanitize_text_field($_REQUEST['default_layer_google_fonts']) : 0);
|
106 |
-
array_push($default_array, '`ffamily`="' . $default_layer_ffamily . '"', '`google_fonts`="' . $default_layer_google_fonts . '"');
|
107 |
-
}
|
108 |
-
if ($default_layer_fweight_check) {
|
109 |
-
$default_layer_fweight = (isset($_REQUEST['default_layer_fweight']) ? sanitize_text_field($_REQUEST['default_layer_fweight']) : '');
|
110 |
-
array_push($default_array, '`fweight`="' . $default_layer_fweight . '"');
|
111 |
-
}
|
112 |
-
if ($default_layer_effect_in_check) {
|
113 |
-
$default_layer_start = (isset($_REQUEST['default_layer_start']) ? sanitize_text_field($_REQUEST['default_layer_start']) : 0);
|
114 |
-
$default_layer_effect_in = (isset($_REQUEST['default_layer_effect_in']) ? sanitize_text_field($_REQUEST['default_layer_effect_in']) : '');
|
115 |
-
$default_layer_duration_eff_in = (isset($_REQUEST['default_layer_duration_eff_in']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_in']) : 0);
|
116 |
-
$default_layer_infinite_in = (isset($_REQUEST['default_layer_infinite_in']) ? sanitize_text_field($_REQUEST['default_layer_infinite_in']) : 1);
|
117 |
-
array_push($default_array, '`start`=' . $default_layer_start, '`layer_effect_in`="' . $default_layer_effect_in . '"', '`duration_eff_in`=' . $default_layer_duration_eff_in, '`infinite_in`=' . $default_layer_infinite_in);
|
118 |
-
}
|
119 |
-
if ($default_layer_effect_out_check) {
|
120 |
-
$default_layer_end = (isset($_REQUEST['default_layer_end']) ? sanitize_text_field($_REQUEST['default_layer_end']) : 0);
|
121 |
-
$default_layer_effect_out = (isset($_REQUEST['default_layer_effect_out']) ? sanitize_text_field($_REQUEST['default_layer_effect_out']) : '');
|
122 |
-
$default_layer_duration_eff_out = (isset($_REQUEST['default_layer_duration_eff_out']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_out']) : 0);
|
123 |
-
$default_layer_infinite_out = (isset($_REQUEST['default_layer_infinite_out']) ? sanitize_text_field($_REQUEST['default_layer_infinite_out']) : 1);
|
124 |
-
array_push($default_array, '`end`=' . $default_layer_end, 'layer_effect_out="' . $default_layer_effect_out . '"', 'duration_eff_out=' . $default_layer_duration_eff_out, '`infinite_out`=' . $default_layer_infinite_out);
|
125 |
-
}
|
126 |
-
if ($default_layer_add_class_check) {
|
127 |
-
$default_layer_add_class = (isset($_REQUEST['default_layer_add_class']) ? sanitize_text_field($_REQUEST['default_layer_add_class']) : '');
|
128 |
-
array_push($default_array, '`add_class`="' . $default_layer_add_class . '"');
|
129 |
-
}
|
130 |
-
global $wpdb;
|
131 |
-
$where = '';
|
132 |
-
if ($choose_slider_id != '') {
|
133 |
-
$slide_id_arr = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d'", $choose_slider_id));
|
134 |
-
$where = ' WHERE slide_id IN ('. implode(',', $slide_id_arr) .')';
|
135 |
-
}
|
136 |
-
$set = $wpdb->query('UPDATE ' . $wpdb->prefix . 'wdslayer SET ' . implode(',', $default_array) . $where);
|
137 |
-
$message = $wpdb->last_error ? 2 : 22;
|
138 |
-
$page = WDW_S_Library::get('page');
|
139 |
-
WDW_S_Library::spider_redirect(add_query_arg(array(
|
140 |
-
'page' => $page,
|
141 |
-
'task' => 'display',
|
142 |
-
'message' => $message,
|
143 |
-
), admin_url('admin.php')));
|
144 |
-
}
|
145 |
-
|
146 |
-
public function get_sliders() {
|
147 |
-
global $wpdb;
|
148 |
-
$sliders = $wpdb->get_results("SELECT id, name FROM " . $wpdb->prefix . "wdsslider ORDER BY `name` ASC", OBJECT_K);
|
149 |
-
if ($sliders) {
|
150 |
-
$sliders[0] = new stdclass();
|
151 |
-
$sliders[0]->id = '';
|
152 |
-
$sliders[0]->name = __('All sliders', WDS()->prefix);
|
153 |
-
}
|
154 |
-
else {
|
155 |
-
$sliders[0] = new stdclass();
|
156 |
-
$sliders[0]->id = 0;
|
157 |
-
$sliders[0]->name = __('-Select-', WDS()->prefix);
|
158 |
-
}
|
159 |
-
|
160 |
-
ksort($sliders);
|
161 |
-
|
162 |
-
return $sliders;
|
163 |
-
}
|
164 |
}
|
1 |
+
<?php
|
2 |
+
class WDSControllerGoptions_wds {
|
3 |
+
|
4 |
+
public function __construct() {
|
5 |
+
}
|
6 |
+
|
7 |
+
public function execute() {
|
8 |
+
$task = WDW_S_Library::get('task');
|
9 |
+
$id = WDW_S_Library::get('current_id', 0);
|
10 |
+
$message = WDW_S_Library::get('message');
|
11 |
+
echo WDW_S_Library::message_id($message);
|
12 |
+
if (method_exists($this, $task)) {
|
13 |
+
check_admin_referer('nonce_wd', 'nonce_wd');
|
14 |
+
$this->$task($id);
|
15 |
+
}
|
16 |
+
else {
|
17 |
+
$this->display();
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
public function display() {
|
22 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelGoptions_wds.php";
|
23 |
+
$model = new WDSModelGoptions_wds();
|
24 |
+
|
25 |
+
require_once WDS()->plugin_dir . "/admin/views/WDSViewGoptions_wds.php";
|
26 |
+
$view = new WDSViewGoptions_wds($model);
|
27 |
+
$view->display($this->get_sliders());
|
28 |
+
}
|
29 |
+
|
30 |
+
public function save_font_family() {
|
31 |
+
$wds_global_options = json_decode(get_option("wds_global_options"), true);
|
32 |
+
$possib_add_ffamily = (isset($_REQUEST['possib_add_ffamily']) ? sanitize_text_field($_REQUEST['possib_add_ffamily']) : '');
|
33 |
+
$possib_add_ffamily_google = (isset($_REQUEST['possib_add_ffamily_google']) ? sanitize_text_field($_REQUEST['possib_add_ffamily_google']) : '');
|
34 |
+
|
35 |
+
$wds_global_options['possib_add_ffamily'] = $possib_add_ffamily;
|
36 |
+
$wds_global_options['possib_add_ffamily_google'] = $possib_add_ffamily_google;
|
37 |
+
$global_options = json_encode($wds_global_options);
|
38 |
+
update_option("wds_global_options", $global_options);
|
39 |
+
|
40 |
+
$page = WDW_S_Library::get('page');
|
41 |
+
WDW_S_Library::spider_redirect(add_query_arg(array( 'page' => $page,
|
42 |
+
'task' => 'display',
|
43 |
+
'message' => 1,
|
44 |
+
), admin_url('admin.php')));
|
45 |
+
}
|
46 |
+
|
47 |
+
public function save() {
|
48 |
+
$register_scripts = (isset($_REQUEST['register_scripts']) ? (int) $_REQUEST['register_scripts'] : 0);
|
49 |
+
$loading_gif = (isset($_REQUEST['loading_gif']) ? sanitize_text_field($_REQUEST['loading_gif']) : 0);
|
50 |
+
$default_layer_fweight = (isset($_REQUEST['default_layer_fweight']) ? sanitize_text_field($_REQUEST['default_layer_fweight']) : '');
|
51 |
+
$default_layer_start = (isset($_REQUEST['default_layer_start']) ? sanitize_text_field($_REQUEST['default_layer_start']) : 0);
|
52 |
+
$default_layer_effect_in = (isset($_REQUEST['default_layer_effect_in']) ? sanitize_text_field($_REQUEST['default_layer_effect_in']) : '');
|
53 |
+
$default_layer_duration_eff_in = (isset($_REQUEST['default_layer_duration_eff_in']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_in']) : 0);
|
54 |
+
$default_layer_infinite_in = (isset($_REQUEST['default_layer_infinite_in']) ? sanitize_text_field($_REQUEST['default_layer_infinite_in']) : 1);
|
55 |
+
$default_layer_end = (isset($_REQUEST['default_layer_end']) ? sanitize_text_field($_REQUEST['default_layer_end']) : 0);
|
56 |
+
$default_layer_effect_out = (isset($_REQUEST['default_layer_effect_out']) ? sanitize_text_field($_REQUEST['default_layer_effect_out']) : '');
|
57 |
+
$default_layer_duration_eff_out = (isset($_REQUEST['default_layer_duration_eff_out']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_out']) : 0);
|
58 |
+
$default_layer_infinite_out = (isset($_REQUEST['default_layer_infinite_out']) ? sanitize_text_field($_REQUEST['default_layer_infinite_out']) : 1);
|
59 |
+
$default_layer_add_class = (isset($_REQUEST['default_layer_add_class']) ? sanitize_text_field($_REQUEST['default_layer_add_class']) : '');
|
60 |
+
$default_layer_ffamily = (isset($_REQUEST['default_layer_ffamily']) ? sanitize_text_field($_REQUEST['default_layer_ffamily']) : '');
|
61 |
+
$default_layer_google_fonts = (isset($_REQUEST['default_layer_google_fonts']) ? sanitize_text_field($_REQUEST['default_layer_google_fonts']) : 0);
|
62 |
+
$spider_uploader = (isset($_REQUEST['spider_uploader']) ? sanitize_text_field($_REQUEST['spider_uploader']) : 0);
|
63 |
+
$possib_add_ffamily = (isset($_REQUEST['possib_add_ffamily']) ? sanitize_text_field($_REQUEST['possib_add_ffamily']) : '');
|
64 |
+
$possib_add_ffamily_google = (isset($_REQUEST['possib_add_ffamily_google']) ? sanitize_text_field($_REQUEST['possib_add_ffamily_google']) : '');
|
65 |
+
$global_options = array(
|
66 |
+
'default_layer_fweight' => $default_layer_fweight,
|
67 |
+
'default_layer_start' => $default_layer_start,
|
68 |
+
'default_layer_effect_in' => $default_layer_effect_in,
|
69 |
+
'default_layer_duration_eff_in' => $default_layer_duration_eff_in,
|
70 |
+
'default_layer_infinite_in' => $default_layer_infinite_in,
|
71 |
+
'default_layer_end' => $default_layer_end,
|
72 |
+
'default_layer_effect_out' => $default_layer_effect_out,
|
73 |
+
'default_layer_duration_eff_out' => $default_layer_duration_eff_out,
|
74 |
+
'default_layer_infinite_out' => $default_layer_infinite_out,
|
75 |
+
'default_layer_add_class' => $default_layer_add_class,
|
76 |
+
'default_layer_ffamily' => $default_layer_ffamily,
|
77 |
+
'default_layer_google_fonts' => $default_layer_google_fonts,
|
78 |
+
'register_scripts' => $register_scripts,
|
79 |
+
'loading_gif' => $loading_gif,
|
80 |
+
'spider_uploader' => $spider_uploader,
|
81 |
+
'possib_add_ffamily' => $possib_add_ffamily,
|
82 |
+
'possib_add_ffamily_google' => $possib_add_ffamily_google,
|
83 |
+
);
|
84 |
+
$global_options = json_encode($global_options);
|
85 |
+
update_option("wds_global_options", $global_options);
|
86 |
+
$page = WDW_S_Library::get('page');
|
87 |
+
WDW_S_Library::spider_redirect(add_query_arg(array( 'page' => $page,
|
88 |
+
'task' => 'display',
|
89 |
+
'message' => 1,
|
90 |
+
), admin_url('admin.php')));
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
public function change_layer_options() {
|
95 |
+
$choose_slider_id = (isset($_REQUEST["choose_slider"]) ? sanitize_text_field($_REQUEST['choose_slider']) : '');
|
96 |
+
$default_layer_ffamily_check = (isset($_REQUEST["default_layer_ffamily_check"]) ? sanitize_text_field($_REQUEST['default_layer_ffamily_check']) : 0);
|
97 |
+
$default_layer_fweight_check = (isset($_REQUEST["default_layer_fweight_check"]) ? sanitize_text_field($_REQUEST['default_layer_fweight_check']) : 0);
|
98 |
+
$default_layer_effect_in_check = (isset($_REQUEST["default_layer_effect_in_check"]) ? sanitize_text_field($_REQUEST['default_layer_effect_in_check']) : 0);
|
99 |
+
$default_layer_effect_out_check = (isset($_REQUEST["default_layer_effect_out_check"]) ? sanitize_text_field($_REQUEST['default_layer_effect_out_check']) : 0);
|
100 |
+
$default_layer_add_class_check = (isset($_REQUEST["default_layer_add_class_check"]) ? sanitize_text_field($_REQUEST['default_layer_add_class_check']) : 0);
|
101 |
+
|
102 |
+
$default_array = array();
|
103 |
+
if ($default_layer_ffamily_check) {
|
104 |
+
$default_layer_ffamily = (isset($_REQUEST['default_layer_ffamily']) ? sanitize_text_field($_REQUEST['default_layer_ffamily']) : '');
|
105 |
+
$default_layer_google_fonts = (isset($_REQUEST['default_layer_google_fonts']) ? sanitize_text_field($_REQUEST['default_layer_google_fonts']) : 0);
|
106 |
+
array_push($default_array, '`ffamily`="' . $default_layer_ffamily . '"', '`google_fonts`="' . $default_layer_google_fonts . '"');
|
107 |
+
}
|
108 |
+
if ($default_layer_fweight_check) {
|
109 |
+
$default_layer_fweight = (isset($_REQUEST['default_layer_fweight']) ? sanitize_text_field($_REQUEST['default_layer_fweight']) : '');
|
110 |
+
array_push($default_array, '`fweight`="' . $default_layer_fweight . '"');
|
111 |
+
}
|
112 |
+
if ($default_layer_effect_in_check) {
|
113 |
+
$default_layer_start = (isset($_REQUEST['default_layer_start']) ? sanitize_text_field($_REQUEST['default_layer_start']) : 0);
|
114 |
+
$default_layer_effect_in = (isset($_REQUEST['default_layer_effect_in']) ? sanitize_text_field($_REQUEST['default_layer_effect_in']) : '');
|
115 |
+
$default_layer_duration_eff_in = (isset($_REQUEST['default_layer_duration_eff_in']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_in']) : 0);
|
116 |
+
$default_layer_infinite_in = (isset($_REQUEST['default_layer_infinite_in']) ? sanitize_text_field($_REQUEST['default_layer_infinite_in']) : 1);
|
117 |
+
array_push($default_array, '`start`=' . $default_layer_start, '`layer_effect_in`="' . $default_layer_effect_in . '"', '`duration_eff_in`=' . $default_layer_duration_eff_in, '`infinite_in`=' . $default_layer_infinite_in);
|
118 |
+
}
|
119 |
+
if ($default_layer_effect_out_check) {
|
120 |
+
$default_layer_end = (isset($_REQUEST['default_layer_end']) ? sanitize_text_field($_REQUEST['default_layer_end']) : 0);
|
121 |
+
$default_layer_effect_out = (isset($_REQUEST['default_layer_effect_out']) ? sanitize_text_field($_REQUEST['default_layer_effect_out']) : '');
|
122 |
+
$default_layer_duration_eff_out = (isset($_REQUEST['default_layer_duration_eff_out']) ? sanitize_text_field($_REQUEST['default_layer_duration_eff_out']) : 0);
|
123 |
+
$default_layer_infinite_out = (isset($_REQUEST['default_layer_infinite_out']) ? sanitize_text_field($_REQUEST['default_layer_infinite_out']) : 1);
|
124 |
+
array_push($default_array, '`end`=' . $default_layer_end, 'layer_effect_out="' . $default_layer_effect_out . '"', 'duration_eff_out=' . $default_layer_duration_eff_out, '`infinite_out`=' . $default_layer_infinite_out);
|
125 |
+
}
|
126 |
+
if ($default_layer_add_class_check) {
|
127 |
+
$default_layer_add_class = (isset($_REQUEST['default_layer_add_class']) ? sanitize_text_field($_REQUEST['default_layer_add_class']) : '');
|
128 |
+
array_push($default_array, '`add_class`="' . $default_layer_add_class . '"');
|
129 |
+
}
|
130 |
+
global $wpdb;
|
131 |
+
$where = '';
|
132 |
+
if ($choose_slider_id != '') {
|
133 |
+
$slide_id_arr = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d'", $choose_slider_id));
|
134 |
+
$where = ' WHERE slide_id IN ('. implode(',', $slide_id_arr) .')';
|
135 |
+
}
|
136 |
+
$set = $wpdb->query('UPDATE ' . $wpdb->prefix . 'wdslayer SET ' . implode(',', $default_array) . $where);
|
137 |
+
$message = $wpdb->last_error ? 2 : 22;
|
138 |
+
$page = WDW_S_Library::get('page');
|
139 |
+
WDW_S_Library::spider_redirect(add_query_arg(array(
|
140 |
+
'page' => $page,
|
141 |
+
'task' => 'display',
|
142 |
+
'message' => $message,
|
143 |
+
), admin_url('admin.php')));
|
144 |
+
}
|
145 |
+
|
146 |
+
public function get_sliders() {
|
147 |
+
global $wpdb;
|
148 |
+
$sliders = $wpdb->get_results("SELECT id, name FROM " . $wpdb->prefix . "wdsslider ORDER BY `name` ASC", OBJECT_K);
|
149 |
+
if ($sliders) {
|
150 |
+
$sliders[0] = new stdclass();
|
151 |
+
$sliders[0]->id = '';
|
152 |
+
$sliders[0]->name = __('All sliders', WDS()->prefix);
|
153 |
+
}
|
154 |
+
else {
|
155 |
+
$sliders[0] = new stdclass();
|
156 |
+
$sliders[0]->id = 0;
|
157 |
+
$sliders[0]->name = __('-Select-', WDS()->prefix);
|
158 |
+
}
|
159 |
+
|
160 |
+
ksort($sliders);
|
161 |
+
|
162 |
+
return $sliders;
|
163 |
+
}
|
164 |
}
|
admin/controllers/WDSControllerUninstall_wds.php
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSControllerUninstall_wds {
|
4 |
-
public function __construct() {
|
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();
|
12 |
-
$config->set_options($wds_options);
|
13 |
-
$deactivate_reasons = new TenWebLibDeactivate($config);
|
14 |
-
$deactivate_reasons->submit_and_deactivate();
|
15 |
-
}
|
16 |
-
}
|
17 |
-
|
18 |
-
public function execute() {
|
19 |
-
$task = ((isset($_POST['task'])) ? sanitize_text_field($_POST['task']) : '');
|
20 |
-
if (method_exists($this, $task)) {
|
21 |
-
check_admin_referer('nonce_wd', 'nonce_wd');
|
22 |
-
$this->$task();
|
23 |
-
}
|
24 |
-
else {
|
25 |
-
$this->display();
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
public function display() {
|
30 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelUninstall_wds.php";
|
31 |
-
$model = new WDSModelUninstall_wds();
|
32 |
-
|
33 |
-
require_once WDS()->plugin_dir . "/admin/views/WDSViewUninstall_wds.php";
|
34 |
-
$view = new WDSViewUninstall_wds($model);
|
35 |
-
$view->display();
|
36 |
-
}
|
37 |
-
|
38 |
-
public function uninstall() {
|
39 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelUninstall_wds.php";
|
40 |
-
$model = new WDSModelUninstall_wds();
|
41 |
-
|
42 |
-
require_once WDS()->plugin_dir . "/admin/views/WDSViewUninstall_wds.php";
|
43 |
-
$view = new WDSViewUninstall_wds($model);
|
44 |
-
$view->uninstall();
|
45 |
-
}
|
46 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSControllerUninstall_wds {
|
4 |
+
public function __construct() {
|
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();
|
12 |
+
$config->set_options($wds_options);
|
13 |
+
$deactivate_reasons = new TenWebLibDeactivate($config);
|
14 |
+
$deactivate_reasons->submit_and_deactivate();
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
public function execute() {
|
19 |
+
$task = ((isset($_POST['task'])) ? sanitize_text_field($_POST['task']) : '');
|
20 |
+
if (method_exists($this, $task)) {
|
21 |
+
check_admin_referer('nonce_wd', 'nonce_wd');
|
22 |
+
$this->$task();
|
23 |
+
}
|
24 |
+
else {
|
25 |
+
$this->display();
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
public function display() {
|
30 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelUninstall_wds.php";
|
31 |
+
$model = new WDSModelUninstall_wds();
|
32 |
+
|
33 |
+
require_once WDS()->plugin_dir . "/admin/views/WDSViewUninstall_wds.php";
|
34 |
+
$view = new WDSViewUninstall_wds($model);
|
35 |
+
$view->display();
|
36 |
+
}
|
37 |
+
|
38 |
+
public function uninstall() {
|
39 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelUninstall_wds.php";
|
40 |
+
$model = new WDSModelUninstall_wds();
|
41 |
+
|
42 |
+
require_once WDS()->plugin_dir . "/admin/views/WDSViewUninstall_wds.php";
|
43 |
+
$view = new WDSViewUninstall_wds($model);
|
44 |
+
$view->uninstall();
|
45 |
+
}
|
46 |
+
}
|
admin/controllers/WDSControllerWDSExport.php
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSControllerWDSExport {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
public function execute() {
|
22 |
-
// $task = WDW_S_Library::get('task');
|
23 |
-
// $id = WDW_S_Library::get('slider_id', 0);
|
24 |
-
$this->display();
|
25 |
-
}
|
26 |
-
|
27 |
-
public function display() {
|
28 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelWDSExport.php";
|
29 |
-
$model = new WDSModelWDSExport();
|
30 |
-
|
31 |
-
require_once WDS()->plugin_dir . "/admin/views/WDSViewWDSExport.php";
|
32 |
-
$view = new WDSViewWDSExport($model);
|
33 |
-
$slider_id = WDW_S_Library::get('current_id');
|
34 |
-
$view->display($slider_id);
|
35 |
-
}
|
36 |
-
|
37 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
-
// Getters & Setters //
|
39 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
-
// Private Methods //
|
42 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
44 |
-
// Listeners //
|
45 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSControllerWDSExport {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
public function execute() {
|
22 |
+
// $task = WDW_S_Library::get('task');
|
23 |
+
// $id = WDW_S_Library::get('slider_id', 0);
|
24 |
+
$this->display();
|
25 |
+
}
|
26 |
+
|
27 |
+
public function display() {
|
28 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelWDSExport.php";
|
29 |
+
$model = new WDSModelWDSExport();
|
30 |
+
|
31 |
+
require_once WDS()->plugin_dir . "/admin/views/WDSViewWDSExport.php";
|
32 |
+
$view = new WDSViewWDSExport($model);
|
33 |
+
$slider_id = WDW_S_Library::get('current_id');
|
34 |
+
$view->display($slider_id);
|
35 |
+
}
|
36 |
+
|
37 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
38 |
+
// Getters & Setters //
|
39 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
40 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
41 |
+
// Private Methods //
|
42 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
43 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
44 |
+
// Listeners //
|
45 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
46 |
}
|
admin/controllers/WDSControllerWDSShortcode.php
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSControllerWDSShortcode {
|
4 |
-
|
5 |
-
public function __construct() {
|
6 |
-
}
|
7 |
-
|
8 |
-
public function execute() {
|
9 |
-
$this->display();
|
10 |
-
}
|
11 |
-
|
12 |
-
public function display() {
|
13 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelWDSShortcode.php";
|
14 |
-
$model = new WDSModelWDSShortcode();
|
15 |
-
|
16 |
-
require_once WDS()->plugin_dir . "/admin/views/WDSViewWDSShortcode.php";
|
17 |
-
$view = new WDSViewWDSShortcode($model);
|
18 |
-
$view->display();
|
19 |
-
}
|
20 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSControllerWDSShortcode {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
}
|
7 |
+
|
8 |
+
public function execute() {
|
9 |
+
$this->display();
|
10 |
+
}
|
11 |
+
|
12 |
+
public function display() {
|
13 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelWDSShortcode.php";
|
14 |
+
$model = new WDSModelWDSShortcode();
|
15 |
+
|
16 |
+
require_once WDS()->plugin_dir . "/admin/views/WDSViewWDSShortcode.php";
|
17 |
+
$view = new WDSViewWDSShortcode($model);
|
18 |
+
$view->display();
|
19 |
+
}
|
20 |
}
|
admin/controllers/WDSControllerWidgetSlideshow.php
CHANGED
@@ -1,61 +1,61 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSControllerWidgetSlideshow extends WP_Widget {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
private $view;
|
14 |
-
private $model;
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
// Constructor & Destructor //
|
17 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
-
public function __construct() {
|
19 |
-
$widget_ops = array(
|
20 |
-
'classname' => 'wdslider',
|
21 |
-
'description' => __('Add Slider to Your widget area.', WDS()->prefix),
|
22 |
-
);
|
23 |
-
// Widget Control Settings.
|
24 |
-
$control_ops = array('id_base' => 'wdslider');
|
25 |
-
// Create the widget.
|
26 |
-
parent::__construct('wdslider', __('Slider WD', WDS()->prefix), $widget_ops, $control_ops);
|
27 |
-
require_once WDS()->plugin_dir . "/admin/models/WDSModelWidgetSlideshow.php";
|
28 |
-
$this->model = new WDSModelWidgetSlideshow();
|
29 |
-
|
30 |
-
require_once WDS()->plugin_dir . "/admin/views/WDSViewWidgetSlideshow.php";
|
31 |
-
$this->view = new WDSViewWidgetSlideshow($this->model);
|
32 |
-
}
|
33 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
-
// Public Methods //
|
35 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
-
|
37 |
-
public function widget($args, $instance) {
|
38 |
-
$this->view->widget($args, $instance);
|
39 |
-
}
|
40 |
-
|
41 |
-
public function form($instance) {
|
42 |
-
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('id'), parent::get_field_name('id'));
|
43 |
-
}
|
44 |
-
|
45 |
-
// Update Settings.
|
46 |
-
public function update($new_instance, $old_instance) {
|
47 |
-
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
-
$instance['id'] = $new_instance['id'];
|
49 |
-
return $instance;
|
50 |
-
}
|
51 |
-
|
52 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
53 |
-
// Getters & Setters //
|
54 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
55 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
-
// Private Methods //
|
57 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
-
// Listeners //
|
60 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSControllerWidgetSlideshow extends WP_Widget {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
private $view;
|
14 |
+
private $model;
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
// Constructor & Destructor //
|
17 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
18 |
+
public function __construct() {
|
19 |
+
$widget_ops = array(
|
20 |
+
'classname' => 'wdslider',
|
21 |
+
'description' => __('Add Slider to Your widget area.', WDS()->prefix),
|
22 |
+
);
|
23 |
+
// Widget Control Settings.
|
24 |
+
$control_ops = array('id_base' => 'wdslider');
|
25 |
+
// Create the widget.
|
26 |
+
parent::__construct('wdslider', __('Slider WD', WDS()->prefix), $widget_ops, $control_ops);
|
27 |
+
require_once WDS()->plugin_dir . "/admin/models/WDSModelWidgetSlideshow.php";
|
28 |
+
$this->model = new WDSModelWidgetSlideshow();
|
29 |
+
|
30 |
+
require_once WDS()->plugin_dir . "/admin/views/WDSViewWidgetSlideshow.php";
|
31 |
+
$this->view = new WDSViewWidgetSlideshow($this->model);
|
32 |
+
}
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
// Public Methods //
|
35 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
36 |
+
|
37 |
+
public function widget($args, $instance) {
|
38 |
+
$this->view->widget($args, $instance);
|
39 |
+
}
|
40 |
+
|
41 |
+
public function form($instance) {
|
42 |
+
$this->view->form($instance, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('id'), parent::get_field_name('id'));
|
43 |
+
}
|
44 |
+
|
45 |
+
// Update Settings.
|
46 |
+
public function update($new_instance, $old_instance) {
|
47 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
48 |
+
$instance['id'] = $new_instance['id'];
|
49 |
+
return $instance;
|
50 |
+
}
|
51 |
+
|
52 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
53 |
+
// Getters & Setters //
|
54 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
55 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
56 |
+
// Private Methods //
|
57 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
58 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
59 |
+
// Listeners //
|
60 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
61 |
}
|
admin/controllers/elementorWidget.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSElementor extends \Elementor\Widget_Base {
|
4 |
-
/**
|
5 |
-
* Get widget name.
|
6 |
-
*
|
7 |
-
* @return string Widget name.
|
8 |
-
*/
|
9 |
-
public function get_name() {
|
10 |
-
return 'wds-elementor';
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Get widget title.
|
15 |
-
*
|
16 |
-
* @return string Widget title.
|
17 |
-
*/
|
18 |
-
public function get_title() {
|
19 |
-
return __('Slider', WDS()->prefix);
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Get widget icon.
|
24 |
-
*
|
25 |
-
* @return string Widget icon.
|
26 |
-
*/
|
27 |
-
public function get_icon() {
|
28 |
-
return 'fa twbb-slider-wd twbb-widget-icon';
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Get widget categories.
|
33 |
-
*
|
34 |
-
* @return array Widget categories.
|
35 |
-
*/
|
36 |
-
public function get_categories() {
|
37 |
-
return [ 'tenweb-plugins-widgets' ];
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Register widget controls.
|
42 |
-
*/
|
43 |
-
protected function _register_controls() {
|
44 |
-
$this->start_controls_section(
|
45 |
-
'general',
|
46 |
-
[
|
47 |
-
'label' => __('Slider', WDS()->prefix),
|
48 |
-
]
|
49 |
-
);
|
50 |
-
|
51 |
-
$sliders = wds_get_sliders();
|
52 |
-
$sliders[0] = __('Select a Slider', WDS()->prefix);
|
53 |
-
$this->add_control(
|
54 |
-
'sliders',
|
55 |
-
[
|
56 |
-
'label_block' => TRUE,
|
57 |
-
'show_label' => FALSE,
|
58 |
-
'description' => __('Select the slider to display.', WDS()->prefix) . ' <a target="_balnk" href="' . add_query_arg(array( 'page' => 'sliders_' . WDS()->prefix ), admin_url('admin.php')) . '">' . __('Edit slider', WDS()->prefix) . '</a>',
|
59 |
-
'type' => \Elementor\Controls_Manager::SELECT,
|
60 |
-
'default' => 0,
|
61 |
-
'options' => $sliders,
|
62 |
-
]
|
63 |
-
);
|
64 |
-
|
65 |
-
$this->end_controls_section();
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Render widget output on the frontend.
|
70 |
-
*/
|
71 |
-
protected function render() {
|
72 |
-
$settings = $this->get_settings_for_display();
|
73 |
-
|
74 |
-
echo WDS()->front_end($settings['sliders']);
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new WDSElementor());
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSElementor extends \Elementor\Widget_Base {
|
4 |
+
/**
|
5 |
+
* Get widget name.
|
6 |
+
*
|
7 |
+
* @return string Widget name.
|
8 |
+
*/
|
9 |
+
public function get_name() {
|
10 |
+
return 'wds-elementor';
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Get widget title.
|
15 |
+
*
|
16 |
+
* @return string Widget title.
|
17 |
+
*/
|
18 |
+
public function get_title() {
|
19 |
+
return __('Slider', WDS()->prefix);
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get widget icon.
|
24 |
+
*
|
25 |
+
* @return string Widget icon.
|
26 |
+
*/
|
27 |
+
public function get_icon() {
|
28 |
+
return 'fa twbb-slider-wd twbb-widget-icon';
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get widget categories.
|
33 |
+
*
|
34 |
+
* @return array Widget categories.
|
35 |
+
*/
|
36 |
+
public function get_categories() {
|
37 |
+
return [ 'tenweb-plugins-widgets' ];
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Register widget controls.
|
42 |
+
*/
|
43 |
+
protected function _register_controls() {
|
44 |
+
$this->start_controls_section(
|
45 |
+
'general',
|
46 |
+
[
|
47 |
+
'label' => __('Slider', WDS()->prefix),
|
48 |
+
]
|
49 |
+
);
|
50 |
+
|
51 |
+
$sliders = wds_get_sliders();
|
52 |
+
$sliders[0] = __('Select a Slider', WDS()->prefix);
|
53 |
+
$this->add_control(
|
54 |
+
'sliders',
|
55 |
+
[
|
56 |
+
'label_block' => TRUE,
|
57 |
+
'show_label' => FALSE,
|
58 |
+
'description' => __('Select the slider to display.', WDS()->prefix) . ' <a target="_balnk" href="' . add_query_arg(array( 'page' => 'sliders_' . WDS()->prefix ), admin_url('admin.php')) . '">' . __('Edit slider', WDS()->prefix) . '</a>',
|
59 |
+
'type' => \Elementor\Controls_Manager::SELECT,
|
60 |
+
'default' => 0,
|
61 |
+
'options' => $sliders,
|
62 |
+
]
|
63 |
+
);
|
64 |
+
|
65 |
+
$this->end_controls_section();
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Render widget output on the frontend.
|
70 |
+
*/
|
71 |
+
protected function render() {
|
72 |
+
$settings = $this->get_settings_for_display();
|
73 |
+
|
74 |
+
echo WDS()->front_end($settings['sliders']);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new WDSElementor());
|
admin/controllers/embed.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class WDSControllerembed
|
5 |
-
*/
|
6 |
-
class WDSControllerembed {
|
7 |
-
public function execute() {
|
8 |
-
$this->display();
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Display.
|
13 |
-
*/
|
14 |
-
public function display() {
|
15 |
-
require_once WDS()->plugin_dir . "/admin/views/embed.php";
|
16 |
-
$view = new WDSViewembed();
|
17 |
-
$view->display();
|
18 |
-
}
|
19 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class WDSControllerembed
|
5 |
+
*/
|
6 |
+
class WDSControllerembed {
|
7 |
+
public function execute() {
|
8 |
+
$this->display();
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Display.
|
13 |
+
*/
|
14 |
+
public function display() {
|
15 |
+
require_once WDS()->plugin_dir . "/admin/views/embed.php";
|
16 |
+
$view = new WDSViewembed();
|
17 |
+
$view->display();
|
18 |
+
}
|
19 |
+
}
|
admin/controllers/posts.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class WDSControllerposts
|
5 |
-
*/
|
6 |
-
class WDSControllerposts {
|
7 |
-
public function execute() {
|
8 |
-
$this->display();
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Display.
|
13 |
-
*/
|
14 |
-
public function display() {
|
15 |
-
require_once WDS()->plugin_dir . "/admin/models/posts.php";
|
16 |
-
$model = new WDSModelposts();
|
17 |
-
|
18 |
-
require_once WDS()->plugin_dir . "/admin/views/posts.php";
|
19 |
-
$view = new WDSViewposts($model);
|
20 |
-
$view->display();
|
21 |
-
}
|
22 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class WDSControllerposts
|
5 |
+
*/
|
6 |
+
class WDSControllerposts {
|
7 |
+
public function execute() {
|
8 |
+
$this->display();
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Display.
|
13 |
+
*/
|
14 |
+
public function display() {
|
15 |
+
require_once WDS()->plugin_dir . "/admin/models/posts.php";
|
16 |
+
$model = new WDSModelposts();
|
17 |
+
|
18 |
+
require_once WDS()->plugin_dir . "/admin/views/posts.php";
|
19 |
+
$view = new WDSViewposts($model);
|
20 |
+
$view->display();
|
21 |
+
}
|
22 |
+
}
|
admin/models/Sliders.php
CHANGED
@@ -1,601 +1,601 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SlidersModel_wds
|
5 |
-
*/
|
6 |
-
class SlidersModel_wds {
|
7 |
-
/**
|
8 |
-
* Get slides row data.
|
9 |
-
*
|
10 |
-
* @param $slider_id
|
11 |
-
*
|
12 |
-
* @return array
|
13 |
-
*/
|
14 |
-
public function get_slides_row_data($slider_id) {
|
15 |
-
global $wpdb;
|
16 |
-
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
|
17 |
-
if (!$rows) {
|
18 |
-
$rows = array();
|
19 |
-
}
|
20 |
-
else {
|
21 |
-
foreach ($rows as $row) {
|
22 |
-
$row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WDS()->plugin_url . '/images/no-image.png';
|
23 |
-
$row->thumb_url = $row->thumb_url ? str_replace('{site_url}', site_url(), $row->thumb_url) : WDS()->plugin_url . '/images/no-image.png';
|
24 |
-
$title_dimension = json_decode($row->title);
|
25 |
-
if ($title_dimension) {
|
26 |
-
$row->att_width = isset($title_dimension->att_width) ? $title_dimension->att_width : 0;
|
27 |
-
$row->att_height = isset($title_dimension->att_height) ? $title_dimension->att_height : 0;
|
28 |
-
$row->video_duration = isset($title_dimension->video_duration) ? $title_dimension->video_duration : 0;
|
29 |
-
$row->title = isset($title_dimension->title) ? $title_dimension->title : '';
|
30 |
-
}
|
31 |
-
else {
|
32 |
-
$row->att_width = 0;
|
33 |
-
$row->att_height = 0;
|
34 |
-
$row->video_duration = 0;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
return $rows;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Get layers row data.
|
43 |
-
*
|
44 |
-
* @param array $slide_ids
|
45 |
-
*
|
46 |
-
* @return mixed
|
47 |
-
*/
|
48 |
-
public function get_layers_row_data( $slide_ids = array() ) {
|
49 |
-
global $wpdb;
|
50 |
-
$rows = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdslayer` WHERE `slide_id` IN (' . implode($slide_ids, ',') . ') ORDER BY `depth` ASC');
|
51 |
-
$data = array();
|
52 |
-
if ( !empty($rows) ) {
|
53 |
-
foreach ( $rows as $row ) {
|
54 |
-
$row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WDS()->plugin_url . '/images/no-image.png';
|
55 |
-
$title_dimension = json_decode($row->title);
|
56 |
-
if ($title_dimension) {
|
57 |
-
$row->attr_width = $title_dimension->attr_width;
|
58 |
-
$row->attr_height = $title_dimension->attr_height;
|
59 |
-
$row->title = $title_dimension->title;
|
60 |
-
}
|
61 |
-
else {
|
62 |
-
$row->attr_width = 0;
|
63 |
-
$row->attr_height = 0;
|
64 |
-
}
|
65 |
-
$data[$row->slide_id][] = $row;
|
66 |
-
}
|
67 |
-
}
|
68 |
-
return $data;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Get rows data.
|
73 |
-
*
|
74 |
-
* @param array $params
|
75 |
-
*
|
76 |
-
* @return array
|
77 |
-
*/
|
78 |
-
public function get_rows_data( $params= array() ) {
|
79 |
-
$order = $params['order'];
|
80 |
-
$orderby = $params['orderby'];
|
81 |
-
$page_per = $params['items_per_page'];
|
82 |
-
$page_num = $params['page_num'];
|
83 |
-
$search = $params['search'];
|
84 |
-
|
85 |
-
global $wpdb;
|
86 |
-
$where = !empty($search) ? ' WHERE `name` LIKE "%' . $search . '%"' : '';
|
87 |
-
|
88 |
-
$query = 'SELECT * FROM ' . $wpdb->prefix . 'wdsslider' . $where;
|
89 |
-
$query .= ' ORDER BY `' . $orderby . '` ' . $order;
|
90 |
-
$query .= ' LIMIT ' . $page_num . ',' . $page_per;
|
91 |
-
$rows = $wpdb->get_results($query);
|
92 |
-
$query1 = 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wdsslider' . $where;
|
93 |
-
$total = $wpdb->get_var($query1);
|
94 |
-
$data = array();
|
95 |
-
$data['rows'] = $rows;
|
96 |
-
$data['total'] = $total;
|
97 |
-
return $data;
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Get row data.
|
102 |
-
*
|
103 |
-
* @param $id
|
104 |
-
* @param $reset
|
105 |
-
*
|
106 |
-
* @return stdClass
|
107 |
-
*/
|
108 |
-
public function get_row_data( $id, $reset) {
|
109 |
-
global $wpdb;
|
110 |
-
if ($id != 0 && !$reset) {
|
111 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
|
112 |
-
if ($row) {
|
113 |
-
$row->enable_bullets = $row->bull_position == 'none' ? 0 : 1;
|
114 |
-
$row->enable_filmstrip = $row->film_pos == 'none' ? 0 : 1;
|
115 |
-
$row->enable_time_bar = $row->timer_bar_type == 'none' ? 0 : 1;
|
116 |
-
$row->music_url = str_replace('{site_url}', site_url(), $row->music_url);
|
117 |
-
$row->built_in_watermark_url = str_replace('{site_url}', site_url(), $row->built_in_watermark_url);
|
118 |
-
$row->right_butt_url = str_replace('{site_url}', site_url(), $row->right_butt_url);
|
119 |
-
$row->left_butt_url = str_replace('{site_url}', site_url(), $row->left_butt_url);
|
120 |
-
$row->right_butt_hov_url = str_replace('{site_url}', site_url(), $row->right_butt_hov_url);
|
121 |
-
$row->left_butt_hov_url = str_replace('{site_url}', site_url(), $row->left_butt_hov_url);
|
122 |
-
$row->bullets_img_main_url = str_replace('{site_url}', site_url(), $row->bullets_img_main_url);
|
123 |
-
$row->bullets_img_hov_url = str_replace('{site_url}', site_url(), $row->bullets_img_hov_url);
|
124 |
-
$row->play_butt_url = str_replace('{site_url}', site_url(), $row->play_butt_url);
|
125 |
-
$row->play_butt_hov_url = str_replace('{site_url}', site_url(), $row->play_butt_hov_url);
|
126 |
-
$row->paus_butt_url = str_replace('{site_url}', site_url(), $row->paus_butt_url);
|
127 |
-
$row->paus_butt_hov_url = str_replace('{site_url}', site_url(), $row->paus_butt_hov_url);
|
128 |
-
}
|
129 |
-
}
|
130 |
-
else {
|
131 |
-
$row = new stdClass();
|
132 |
-
if ($reset && $id) {
|
133 |
-
$row = $wpdb->get_row($wpdb->prepare('SELECT name FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
|
134 |
-
}
|
135 |
-
else {
|
136 |
-
$row->name = '';
|
137 |
-
}
|
138 |
-
$row->id = $id;
|
139 |
-
$row->width = 900;
|
140 |
-
$row->height = 400;
|
141 |
-
$row->full_width = 2;
|
142 |
-
$row->auto_height = 0;
|
143 |
-
$row->align = 'center';
|
144 |
-
$row->effect = 'fade';
|
145 |
-
$row->published = 1;
|
146 |
-
$row->time_intervval = 5;
|
147 |
-
$row->autoplay = 1;
|
148 |
-
$row->shuffle = 0;
|
149 |
-
$row->music = 0;
|
150 |
-
$row->music_url = '';
|
151 |
-
$row->preload_images = 1;
|
152 |
-
$row->background_color = '000000';
|
153 |
-
$row->background_transparent = 100;
|
154 |
-
$row->glb_border_width = 0;
|
155 |
-
$row->glb_border_style = 'none';
|
156 |
-
$row->glb_border_color = '000000';
|
157 |
-
$row->glb_border_radius = '';
|
158 |
-
$row->glb_margin = 0;
|
159 |
-
$row->glb_box_shadow = '';
|
160 |
-
$row->image_right_click = 0;
|
161 |
-
$row->layer_out_next = 0;
|
162 |
-
$row->prev_next_butt = 1;
|
163 |
-
$row->play_paus_butt = 0;
|
164 |
-
$row->navigation = 'hover';
|
165 |
-
$row->rl_butt_style = 'fa-angle';
|
166 |
-
$row->rl_butt_size = 40;
|
167 |
-
$row->pp_butt_size = 40;
|
168 |
-
$row->butts_color = '000000';
|
169 |
-
$row->hover_color = '000000';
|
170 |
-
$row->nav_border_width = 0;
|
171 |
-
$row->nav_border_style = 'none';
|
172 |
-
$row->nav_border_color = 'FFFFFF';
|
173 |
-
$row->nav_border_radius = '20px';
|
174 |
-
$row->nav_bg_color = 'FFFFFF';
|
175 |
-
$row->butts_transparent = 100;
|
176 |
-
$row->enable_bullets = 1;
|
177 |
-
$row->bull_position = 'bottom';
|
178 |
-
$row->bull_style = 'fa-square-o';
|
179 |
-
$row->bull_size = 20;
|
180 |
-
$row->bull_color = 'FFFFFF';
|
181 |
-
$row->bull_act_color = 'FFFFFF';
|
182 |
-
$row->bull_margin = 3;
|
183 |
-
$row->enable_filmstrip = 0;
|
184 |
-
$row->film_pos = 'none';
|
185 |
-
$row->film_thumb_width = 100;
|
186 |
-
$row->film_thumb_height = 50;
|
187 |
-
$row->film_bg_color = '000000';
|
188 |
-
$row->film_tmb_margin = 0;
|
189 |
-
$row->film_act_border_width = 0;
|
190 |
-
$row->film_act_border_style = 'none';
|
191 |
-
$row->film_act_border_color = 'FFFFFF';
|
192 |
-
$row->film_dac_transparent = 50;
|
193 |
-
$row->enable_time_bar = 1;
|
194 |
-
$row->timer_bar_type = 'top';
|
195 |
-
$row->timer_bar_size = 5;
|
196 |
-
$row->timer_bar_color = 'BBBBBB';
|
197 |
-
$row->timer_bar_transparent = 50;
|
198 |
-
$row->built_in_watermark_type = 'none';
|
199 |
-
$row->built_in_watermark_position = 'middle-center';
|
200 |
-
$row->built_in_watermark_size = 15;
|
201 |
-
$row->built_in_watermark_url = WDS()->plugin_url . '/images/watermark.png';
|
202 |
-
$row->built_in_watermark_text = '10Web.io';
|
203 |
-
$row->built_in_watermark_font_size = 20;
|
204 |
-
$row->built_in_watermark_font = '';
|
205 |
-
$row->built_in_watermark_color = 'FFFFFF';
|
206 |
-
$row->built_in_watermark_opacity = 70;
|
207 |
-
$row->stop_animation = 0;
|
208 |
-
$row->css = '';
|
209 |
-
$row->right_butt_url = WDS()->plugin_url . '/images/arrow/arrow11/1/2.png';
|
210 |
-
$row->left_butt_url = WDS()->plugin_url . '/images/arrow/arrow11/1/1.png';
|
211 |
-
$row->right_butt_hov_url = WDS()->plugin_url . '/images/arrow/arrow11/1/4.png';
|
212 |
-
$row->left_butt_hov_url = WDS()->plugin_url . '/images/arrow/arrow11/1/3.png';
|
213 |
-
$row->rl_butt_img_or_not = 'style';
|
214 |
-
$row->bullets_img_main_url = WDS()->plugin_url . '/images/bullet/bullet1/1/1.png';
|
215 |
-
$row->bullets_img_hov_url = WDS()->plugin_url . '/images/bullet/bullet1/1/2.png';
|
216 |
-
$row->bull_butt_img_or_not = 'style';
|
217 |
-
$row->play_paus_butt_img_or_not = 'style';
|
218 |
-
$row->play_butt_url = WDS()->plugin_url . '/images/button/button4/1/1.png';
|
219 |
-
$row->play_butt_hov_url = WDS()->plugin_url . '/images/button/button4/1/2.png';
|
220 |
-
$row->paus_butt_url = WDS()->plugin_url . '/images/button/button4/1/3.png';
|
221 |
-
$row->paus_butt_hov_url = WDS()->plugin_url . '/images/button/button4/1/4.png';
|
222 |
-
$row->start_slide_num = 1;
|
223 |
-
$row->effect_duration = 800;
|
224 |
-
$row->carousel = 0;
|
225 |
-
$row->carousel_image_counts = 7;
|
226 |
-
$row->carousel_image_parameters = 0.85;
|
227 |
-
$row->carousel_fit_containerWidth = 0;
|
228 |
-
$row->carousel_width = 1000;
|
229 |
-
$row->parallax_effect = 0;
|
230 |
-
$row->mouse_swipe_nav = 0;
|
231 |
-
$row->bull_hover = 1;
|
232 |
-
$row->touch_swipe_nav = 1;
|
233 |
-
$row->mouse_wheel_nav = 0;
|
234 |
-
$row->keyboard_nav = 0;
|
235 |
-
$row->possib_add_ffamily = '';
|
236 |
-
$row->show_thumbnail = 0;
|
237 |
-
$row->thumb_size = '0.3';
|
238 |
-
$row->fixed_bg = 0;
|
239 |
-
$row->smart_crop = 0;
|
240 |
-
$row->crop_image_position = 'center center';
|
241 |
-
$row->javascript = '';
|
242 |
-
$row->carousel_degree = 0;
|
243 |
-
$row->carousel_grayscale = 0;
|
244 |
-
$row->carousel_transparency = 0;
|
245 |
-
$row->bull_back_act_color = '000000';
|
246 |
-
$row->bull_back_color = 'CCCCCC';
|
247 |
-
$row->bull_radius = '20px';
|
248 |
-
$row->possib_add_google_fonts = 0;
|
249 |
-
$row->possib_add_ffamily_google = '';
|
250 |
-
$row->slider_loop = 1;
|
251 |
-
$row->hide_on_mobile = 0;
|
252 |
-
$row->twoway_slideshow = 0;
|
253 |
-
$row->full_width_for_mobile = 0;
|
254 |
-
$row->order_dir = 'asc';
|
255 |
-
}
|
256 |
-
return $row;
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Create Preview Slider post.
|
261 |
-
*
|
262 |
-
* @return string $guid
|
263 |
-
*/
|
264 |
-
public function get_slide_preview_post() {
|
265 |
-
$post_type = 'wds-slider';
|
266 |
-
$row = get_posts(array( 'post_type' => $post_type ));
|
267 |
-
if ( !empty($row[0]) ) {
|
268 |
-
return get_post_permalink($row[0]->ID);
|
269 |
-
}
|
270 |
-
else {
|
271 |
-
$post_params = array(
|
272 |
-
'post_author' => 1,
|
273 |
-
'post_status' => 'publish',
|
274 |
-
'post_content' => '[SliderPreview]',
|
275 |
-
'post_title' => 'Preview',
|
276 |
-
'post_type' => 'wds-slider',
|
277 |
-
'comment_status' => 'closed',
|
278 |
-
'ping_status' => 'closed',
|
279 |
-
'post_parent' => 0,
|
280 |
-
'menu_order' => 0,
|
281 |
-
'import_id' => 0,
|
282 |
-
);
|
283 |
-
// Create new post by type.
|
284 |
-
$insert_id = wp_insert_post($post_params);
|
285 |
-
if ( !is_wp_error($insert_id) ) {
|
286 |
-
flush_rewrite_rules();
|
287 |
-
return get_post_permalink($insert_id);
|
288 |
-
}
|
289 |
-
else {
|
290 |
-
return "";
|
291 |
-
}
|
292 |
-
}
|
293 |
-
}
|
294 |
-
|
295 |
-
/**
|
296 |
-
* Publish.
|
297 |
-
*
|
298 |
-
* @param $id
|
299 |
-
* @param bool $all
|
300 |
-
*
|
301 |
-
* @return int
|
302 |
-
*/
|
303 |
-
public function publish( $id, $all = FALSE ) {
|
304 |
-
global $wpdb;
|
305 |
-
$where = ($all ? '' : ' WHERE id=' . $id);
|
306 |
-
$updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'wdsslider` SET `published` = 1' . $where);
|
307 |
-
|
308 |
-
$message_id = 2;
|
309 |
-
if ( $updated !== FALSE ) {
|
310 |
-
$message_id = 9;
|
311 |
-
}
|
312 |
-
return $message_id;
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Unpublish.
|
317 |
-
*
|
318 |
-
* @param $id
|
319 |
-
* @param bool $all
|
320 |
-
*
|
321 |
-
* @return int
|
322 |
-
*/
|
323 |
-
public function unpublish( $id, $all = FALSE ) {
|
324 |
-
global $wpdb;
|
325 |
-
$where = ($all ? '' : ' WHERE id=' . $id);
|
326 |
-
$updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'wdsslider` SET `published` = 0' . $where);
|
327 |
-
|
328 |
-
$message_id = 2;
|
329 |
-
if ( $updated !== FALSE ) {
|
330 |
-
$message_id = 11;
|
331 |
-
}
|
332 |
-
return $message_id;
|
333 |
-
}
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Delete.
|
337 |
-
*
|
338 |
-
* @param $id
|
339 |
-
* @param bool $all
|
340 |
-
*
|
341 |
-
* @return int
|
342 |
-
*/
|
343 |
-
public function delete( $id, $all = FALSE ) {
|
344 |
-
global $wpdb;
|
345 |
-
$where = ($all ? '' : ' WHERE `id` = ' . $id);
|
346 |
-
$slide_where = ($all ? '' : ' WHERE `t1`.`slider_id` = ' . $id);
|
347 |
-
|
348 |
-
$delete = $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'wdsslider ' . $where);
|
349 |
-
if ($delete) {
|
350 |
-
$wpdb->query('DELETE t1.*, t2.* FROM `' . $wpdb->prefix . 'wdsslide` AS `t1` LEFT JOIN ' . $wpdb->prefix . 'wdslayer AS `t2` ON `t1`.`id` = `t2`.`slide_id` ' . $slide_where);
|
351 |
-
// TODO. need works the other version.
|
352 |
-
// $this->remove_frontend_js_file( $id );
|
353 |
-
}
|
354 |
-
$message_id = 2;
|
355 |
-
if ( $delete ) {
|
356 |
-
$message_id = 3;
|
357 |
-
if ( $all ) {
|
358 |
-
$message_id = 5;
|
359 |
-
}
|
360 |
-
}
|
361 |
-
return $message_id;
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Duplicate.
|
366 |
-
*
|
367 |
-
* @param $id
|
368 |
-
* @param bool $all
|
369 |
-
*
|
370 |
-
* @return int
|
371 |
-
*/
|
372 |
-
public function duplicate( $id, $all = FALSE ) {
|
373 |
-
global $wpdb;
|
374 |
-
$where = ($all ? '' : ' WHERE `id` = ' . $id);
|
375 |
-
|
376 |
-
$sliders = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslider`' . $where);
|
377 |
-
if ( !empty($sliders) ) {
|
378 |
-
foreach ( $sliders as $slider ) {
|
379 |
-
$slider_ids[] = $slider->id;
|
380 |
-
unset($slider->id);
|
381 |
-
$sliders_data[$id] = $slider;
|
382 |
-
}
|
383 |
-
// Get slides by slider ids.
|
384 |
-
$slides = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslide` WHERE `slider_id` IN(' . implode($slider_ids, ',') . ')');
|
385 |
-
if ( !empty($slides)) {
|
386 |
-
$slides_data = array();
|
387 |
-
foreach ( $slides as $slide ) {
|
388 |
-
$id = $slide->id;
|
389 |
-
$slider_id = $slide->slider_id;
|
390 |
-
$slide_ids[] = $slide->id;
|
391 |
-
unset($slide->id);
|
392 |
-
unset($slide->slider_id);
|
393 |
-
$slides_data[$slider_id][$id] = $slide;
|
394 |
-
}
|
395 |
-
// Get layers by slide ids.
|
396 |
-
$layers = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdslayer` WHERE `slide_id` IN (' . implode($slide_ids,',') . ')');
|
397 |
-
$layers_data = array();
|
398 |
-
if ( !empty($layers) ) {
|
399 |
-
foreach ( $layers as $layer ) {
|
400 |
-
$slide_id = $layer->slide_id;
|
401 |
-
unset($layer->id);
|
402 |
-
unset($layer->slide_id);
|
403 |
-
$layers_data[$slide_id][] = $layer;
|
404 |
-
}
|
405 |
-
}
|
406 |
-
}
|
407 |
-
// Insert slider data.
|
408 |
-
$slider_save = $this->insert_slides( array('sliders_data' => $sliders_data, 'slides_data' => $slides_data, 'layers_data' => $layers_data) );
|
409 |
-
}
|
410 |
-
|
411 |
-
$message_id = 2;
|
412 |
-
if ( $slider_save ) {
|
413 |
-
$message_id = 26;
|
414 |
-
}
|
415 |
-
return $message_id;
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Merge.
|
420 |
-
*
|
421 |
-
* @param $id
|
422 |
-
* @param bool $all
|
423 |
-
*
|
424 |
-
* @return int
|
425 |
-
*/
|
426 |
-
public function merge( $id, $all = FALSE ) {
|
427 |
-
global $wpdb;
|
428 |
-
$checkds = WDW_S_Library::get('check');
|
429 |
-
if ( !empty($checkds) ) {
|
430 |
-
if ( isset($checkds[$id]) ) {
|
431 |
-
unset($checkds[$id]);
|
432 |
-
}
|
433 |
-
$ids[] = $id;
|
434 |
-
foreach ( $checkds as $k => $v ){
|
435 |
-
$ids[] = $k;
|
436 |
-
}
|
437 |
-
}
|
438 |
-
$str_ids = implode( $ids, ',');
|
439 |
-
$where = ($all ? '' : ' WHERE `id` IN (' . $str_ids . ')');
|
440 |
-
$sliders = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslider` '. $where .' ORDER BY FIELD(`id`,' . $str_ids . ');');
|
441 |
-
if ( !empty($sliders) ) {
|
442 |
-
$name = "Merged sliders of ";
|
443 |
-
foreach ( $sliders as $slider ) {
|
444 |
-
$name .= $slider->name .', ';
|
445 |
-
$slider_ids[$slider->id] = $slider;
|
446 |
-
}
|
447 |
-
|
448 |
-
if ( !empty($slider_ids[$id]) ) {
|
449 |
-
$slider_data = $slider_ids[$id];
|
450 |
-
unset($slider_data->id);
|
451 |
-
$slider_data->name = rtrim($name, ', ');
|
452 |
-
$sliders_data[$id] = $slider_data;
|
453 |
-
$str_slider_ids = implode( array_keys($slider_ids), ',' );
|
454 |
-
$slides = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslide` WHERE `slider_id` IN ('. $str_slider_ids . ') ORDER BY FIELD(`slider_id`,' . $str_slider_ids . ')');
|
455 |
-
|
456 |
-
$order_slide = 1;
|
457 |
-
$slides_data = array();
|
458 |
-
foreach ( $slides as $slide ) {
|
459 |
-
$slide_id = $slide->id;
|
460 |
-
$slide_ids[] = $slide_id;
|
461 |
-
unset($slide->id);
|
462 |
-
unset($slide->slider_id);
|
463 |
-
$slide->order = $order_slide;
|
464 |
-
$slides_data[$id][$slide_id] = $slide;
|
465 |
-
$order_slide++;
|
466 |
-
}
|
467 |
-
// Get layers by slide ids.
|
468 |
-
$layers = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdslayer` WHERE `slide_id` IN (' . implode($slide_ids,',') . ') ORDER BY `slide_id` ASC');
|
469 |
-
$layers_data = array();
|
470 |
-
if ( !empty($layers) ) {
|
471 |
-
foreach ( $layers as $layer ) {
|
472 |
-
$slide_id = $layer->slide_id;
|
473 |
-
unset($layer->id);
|
474 |
-
unset($layer->slide_id);
|
475 |
-
$layers_data[$slide_id][] = $layer;
|
476 |
-
}
|
477 |
-
}
|
478 |
-
// Insert slider data.
|
479 |
-
$slider_save = $this->insert_slides( array('sliders_data' => $sliders_data, 'slides_data' => $slides_data, 'layers_data' => $layers_data) );
|
480 |
-
}
|
481 |
-
|
482 |
-
}
|
483 |
-
$message_id = 27;
|
484 |
-
if ( $slider_save ) {
|
485 |
-
$message_id = 28;
|
486 |
-
}
|
487 |
-
return $message_id;
|
488 |
-
}
|
489 |
-
|
490 |
-
/**
|
491 |
-
* Insert slides.
|
492 |
-
*
|
493 |
-
* @param array $params
|
494 |
-
* @return mixed
|
495 |
-
*/
|
496 |
-
public function insert_slides( $params = array() ) {
|
497 |
-
global $wpdb;
|
498 |
-
$sliders_data = $params['sliders_data'];
|
499 |
-
$slides_data = $params['slides_data'];
|
500 |
-
$layers_data = $params['layers_data'];
|
501 |
-
|
502 |
-
if ( !empty($sliders_data) ) {
|
503 |
-
foreach ( $sliders_data as $slider_id => $slider ) {
|
504 |
-
$slider_save = $wpdb->insert($wpdb->prefix . 'wdsslider', (array) $slider);
|
505 |
-
$new_slider_id = $wpdb->insert_id;
|
506 |
-
|
507 |
-
if ( !empty($slides_data[$slider_id]) ) {
|
508 |
-
foreach ( $slides_data[$slider_id] as $slid_id => $slide) {
|
509 |
-
|
510 |
-
$slide->slider_id = $new_slider_id;
|
511 |
-
$slid_save = $wpdb->insert($wpdb->prefix . 'wdsslide', (array) $slide);
|
512 |
-
$new_slide_id = $wpdb->insert_id;
|
513 |
-
|
514 |
-
if ( !empty($layers_data[$slid_id]) ) {
|
515 |
-
foreach ( $layers_data[$slid_id] as $layer ) {
|
516 |
-
$layer->slide_id = $new_slide_id;
|
517 |
-
$layer_save = $wpdb->insert($wpdb->prefix . 'wdslayer', (array) $layer);
|
518 |
-
}
|
519 |
-
}
|
520 |
-
}
|
521 |
-
}
|
522 |
-
}
|
523 |
-
return $new_slider_id;
|
524 |
-
}
|
525 |
-
return FALSE;
|
526 |
-
}
|
527 |
-
|
528 |
-
/**
|
529 |
-
* Get slides info.
|
530 |
-
*
|
531 |
-
* @param array $params
|
532 |
-
* @return array
|
533 |
-
*/
|
534 |
-
public function get_slides_info( $params = array() ) {
|
535 |
-
global $wpdb;
|
536 |
-
$ids = $params['ids'];
|
537 |
-
$rows = $wpdb->get_results('
|
538 |
-
SELECT
|
539 |
-
`slider_id`,
|
540 |
-
COUNT(*) AS `count`
|
541 |
-
FROM
|
542 |
-
' . $wpdb->prefix . 'wdsslide
|
543 |
-
WHERE
|
544 |
-
`slider_id` IN (' . implode(',', $ids) . ')
|
545 |
-
AND `image_url` <> ""
|
546 |
-
AND `image_url` NOT LIKE "%images/no-image.png%"
|
547 |
-
GROUP BY `slider_id`
|
548 |
-
');
|
549 |
-
$images_count = array();
|
550 |
-
if ( !empty($rows) ) {
|
551 |
-
foreach ( $rows as $row ) {
|
552 |
-
$images_count[$row->slider_id] = $row->count;
|
553 |
-
}
|
554 |
-
}
|
555 |
-
|
556 |
-
$rows = $wpdb->get_results('
|
557 |
-
SELECT
|
558 |
-
`slider_id`,
|
559 |
-
`thumb_url`,
|
560 |
-
`type`
|
561 |
-
FROM
|
562 |
-
' . $wpdb->prefix . 'wdsslide
|
563 |
-
WHERE
|
564 |
-
`slider_id` IN ('. implode(',', $ids) .')
|
565 |
-
ORDER BY `order` ASC
|
566 |
-
');
|
567 |
-
|
568 |
-
$preview_thumb_url = WDS()->plugin_url . '/images/no-image.png';
|
569 |
-
if ( $rows ) {
|
570 |
-
foreach ( $rows as $row ) {
|
571 |
-
$preview_thumb_url = ( $row->type == 'video' && ctype_digit($row->thumb_url) ) ? ( wp_get_attachment_url(get_post_thumbnail_id($row->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($row->thumb_url)) : WDS()->plugin_url . '/images/no-video.png') : $row->thumb_url;
|
572 |
-
if ($preview_thumb_url) {
|
573 |
-
$preview_thumb_url = str_replace('{site_url}', site_url(), $preview_thumb_url);
|
574 |
-
}
|
575 |
-
$thumbs[$row->slider_id] = $preview_thumb_url;
|
576 |
-
}
|
577 |
-
}
|
578 |
-
|
579 |
-
$data = array();
|
580 |
-
foreach ( $ids as $id ) {
|
581 |
-
$data[$id] = array (
|
582 |
-
'count' => !empty($images_count[$id]) ? $images_count[$id] : 0,
|
583 |
-
'preview_thumb' => !empty($thumbs[$id]) ? $thumbs[$id] : $preview_thumb_url
|
584 |
-
);
|
585 |
-
}
|
586 |
-
return $data;
|
587 |
-
}
|
588 |
-
|
589 |
-
/*
|
590 |
-
* Create frontend js file.
|
591 |
-
*
|
592 |
-
* @param int int
|
593 |
-
* @return bool
|
594 |
-
*/
|
595 |
-
public function create_frontend_js_file( $id ) {
|
596 |
-
$create_js = WDW_S_Library::create_frontend_js_file( $id );
|
597 |
-
global $wpdb;
|
598 |
-
$update = $wpdb->update( $wpdb->prefix . 'wdsslider', array('jsversion' => rand()), array('id' => $id) );
|
599 |
-
return $update;
|
600 |
-
}
|
601 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SlidersModel_wds
|
5 |
+
*/
|
6 |
+
class SlidersModel_wds {
|
7 |
+
/**
|
8 |
+
* Get slides row data.
|
9 |
+
*
|
10 |
+
* @param $slider_id
|
11 |
+
*
|
12 |
+
* @return array
|
13 |
+
*/
|
14 |
+
public function get_slides_row_data($slider_id) {
|
15 |
+
global $wpdb;
|
16 |
+
$rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
|
17 |
+
if (!$rows) {
|
18 |
+
$rows = array();
|
19 |
+
}
|
20 |
+
else {
|
21 |
+
foreach ($rows as $row) {
|
22 |
+
$row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WDS()->plugin_url . '/images/no-image.png';
|
23 |
+
$row->thumb_url = $row->thumb_url ? str_replace('{site_url}', site_url(), $row->thumb_url) : WDS()->plugin_url . '/images/no-image.png';
|
24 |
+
$title_dimension = json_decode($row->title);
|
25 |
+
if ($title_dimension) {
|
26 |
+
$row->att_width = isset($title_dimension->att_width) ? $title_dimension->att_width : 0;
|
27 |
+
$row->att_height = isset($title_dimension->att_height) ? $title_dimension->att_height : 0;
|
28 |
+
$row->video_duration = isset($title_dimension->video_duration) ? $title_dimension->video_duration : 0;
|
29 |
+
$row->title = isset($title_dimension->title) ? $title_dimension->title : '';
|
30 |
+
}
|
31 |
+
else {
|
32 |
+
$row->att_width = 0;
|
33 |
+
$row->att_height = 0;
|
34 |
+
$row->video_duration = 0;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
38 |
+
return $rows;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get layers row data.
|
43 |
+
*
|
44 |
+
* @param array $slide_ids
|
45 |
+
*
|
46 |
+
* @return mixed
|
47 |
+
*/
|
48 |
+
public function get_layers_row_data( $slide_ids = array() ) {
|
49 |
+
global $wpdb;
|
50 |
+
$rows = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdslayer` WHERE `slide_id` IN (' . implode($slide_ids, ',') . ') ORDER BY `depth` ASC');
|
51 |
+
$data = array();
|
52 |
+
if ( !empty($rows) ) {
|
53 |
+
foreach ( $rows as $row ) {
|
54 |
+
$row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WDS()->plugin_url . '/images/no-image.png';
|
55 |
+
$title_dimension = json_decode($row->title);
|
56 |
+
if ($title_dimension) {
|
57 |
+
$row->attr_width = $title_dimension->attr_width;
|
58 |
+
$row->attr_height = $title_dimension->attr_height;
|
59 |
+
$row->title = $title_dimension->title;
|
60 |
+
}
|
61 |
+
else {
|
62 |
+
$row->attr_width = 0;
|
63 |
+
$row->attr_height = 0;
|
64 |
+
}
|
65 |
+
$data[$row->slide_id][] = $row;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return $data;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Get rows data.
|
73 |
+
*
|
74 |
+
* @param array $params
|
75 |
+
*
|
76 |
+
* @return array
|
77 |
+
*/
|
78 |
+
public function get_rows_data( $params= array() ) {
|
79 |
+
$order = $params['order'];
|
80 |
+
$orderby = $params['orderby'];
|
81 |
+
$page_per = $params['items_per_page'];
|
82 |
+
$page_num = $params['page_num'];
|
83 |
+
$search = $params['search'];
|
84 |
+
|
85 |
+
global $wpdb;
|
86 |
+
$where = !empty($search) ? ' WHERE `name` LIKE "%' . $search . '%"' : '';
|
87 |
+
|
88 |
+
$query = 'SELECT * FROM ' . $wpdb->prefix . 'wdsslider' . $where;
|
89 |
+
$query .= ' ORDER BY `' . $orderby . '` ' . $order;
|
90 |
+
$query .= ' LIMIT ' . $page_num . ',' . $page_per;
|
91 |
+
$rows = $wpdb->get_results($query);
|
92 |
+
$query1 = 'SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wdsslider' . $where;
|
93 |
+
$total = $wpdb->get_var($query1);
|
94 |
+
$data = array();
|
95 |
+
$data['rows'] = $rows;
|
96 |
+
$data['total'] = $total;
|
97 |
+
return $data;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Get row data.
|
102 |
+
*
|
103 |
+
* @param $id
|
104 |
+
* @param $reset
|
105 |
+
*
|
106 |
+
* @return stdClass
|
107 |
+
*/
|
108 |
+
public function get_row_data( $id, $reset) {
|
109 |
+
global $wpdb;
|
110 |
+
if ($id != 0 && !$reset) {
|
111 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
|
112 |
+
if ($row) {
|
113 |
+
$row->enable_bullets = $row->bull_position == 'none' ? 0 : 1;
|
114 |
+
$row->enable_filmstrip = $row->film_pos == 'none' ? 0 : 1;
|
115 |
+
$row->enable_time_bar = $row->timer_bar_type == 'none' ? 0 : 1;
|
116 |
+
$row->music_url = str_replace('{site_url}', site_url(), $row->music_url);
|
117 |
+
$row->built_in_watermark_url = str_replace('{site_url}', site_url(), $row->built_in_watermark_url);
|
118 |
+
$row->right_butt_url = str_replace('{site_url}', site_url(), $row->right_butt_url);
|
119 |
+
$row->left_butt_url = str_replace('{site_url}', site_url(), $row->left_butt_url);
|
120 |
+
$row->right_butt_hov_url = str_replace('{site_url}', site_url(), $row->right_butt_hov_url);
|
121 |
+
$row->left_butt_hov_url = str_replace('{site_url}', site_url(), $row->left_butt_hov_url);
|
122 |
+
$row->bullets_img_main_url = str_replace('{site_url}', site_url(), $row->bullets_img_main_url);
|
123 |
+
$row->bullets_img_hov_url = str_replace('{site_url}', site_url(), $row->bullets_img_hov_url);
|
124 |
+
$row->play_butt_url = str_replace('{site_url}', site_url(), $row->play_butt_url);
|
125 |
+
$row->play_butt_hov_url = str_replace('{site_url}', site_url(), $row->play_butt_hov_url);
|
126 |
+
$row->paus_butt_url = str_replace('{site_url}', site_url(), $row->paus_butt_url);
|
127 |
+
$row->paus_butt_hov_url = str_replace('{site_url}', site_url(), $row->paus_butt_hov_url);
|
128 |
+
}
|
129 |
+
}
|
130 |
+
else {
|
131 |
+
$row = new stdClass();
|
132 |
+
if ($reset && $id) {
|
133 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT name FROM ' . $wpdb->prefix . 'wdsslider WHERE id="%d"', $id));
|
134 |
+
}
|
135 |
+
else {
|
136 |
+
$row->name = '';
|
137 |
+
}
|
138 |
+
$row->id = $id;
|
139 |
+
$row->width = 900;
|
140 |
+
$row->height = 400;
|
141 |
+
$row->full_width = 2;
|
142 |
+
$row->auto_height = 0;
|
143 |
+
$row->align = 'center';
|
144 |
+
$row->effect = 'fade';
|
145 |
+
$row->published = 1;
|
146 |
+
$row->time_intervval = 5;
|
147 |
+
$row->autoplay = 1;
|
148 |
+
$row->shuffle = 0;
|
149 |
+
$row->music = 0;
|
150 |
+
$row->music_url = '';
|
151 |
+
$row->preload_images = 1;
|
152 |
+
$row->background_color = '000000';
|
153 |
+
$row->background_transparent = 100;
|
154 |
+
$row->glb_border_width = 0;
|
155 |
+
$row->glb_border_style = 'none';
|
156 |
+
$row->glb_border_color = '000000';
|
157 |
+
$row->glb_border_radius = '';
|
158 |
+
$row->glb_margin = 0;
|
159 |
+
$row->glb_box_shadow = '';
|
160 |
+
$row->image_right_click = 0;
|
161 |
+
$row->layer_out_next = 0;
|
162 |
+
$row->prev_next_butt = 1;
|
163 |
+
$row->play_paus_butt = 0;
|
164 |
+
$row->navigation = 'hover';
|
165 |
+
$row->rl_butt_style = 'fa-angle';
|
166 |
+
$row->rl_butt_size = 40;
|
167 |
+
$row->pp_butt_size = 40;
|
168 |
+
$row->butts_color = '000000';
|
169 |
+
$row->hover_color = '000000';
|
170 |
+
$row->nav_border_width = 0;
|
171 |
+
$row->nav_border_style = 'none';
|
172 |
+
$row->nav_border_color = 'FFFFFF';
|
173 |
+
$row->nav_border_radius = '20px';
|
174 |
+
$row->nav_bg_color = 'FFFFFF';
|
175 |
+
$row->butts_transparent = 100;
|
176 |
+
$row->enable_bullets = 1;
|
177 |
+
$row->bull_position = 'bottom';
|
178 |
+
$row->bull_style = 'fa-square-o';
|
179 |
+
$row->bull_size = 20;
|
180 |
+
$row->bull_color = 'FFFFFF';
|
181 |
+
$row->bull_act_color = 'FFFFFF';
|
182 |
+
$row->bull_margin = 3;
|
183 |
+
$row->enable_filmstrip = 0;
|
184 |
+
$row->film_pos = 'none';
|
185 |
+
$row->film_thumb_width = 100;
|
186 |
+
$row->film_thumb_height = 50;
|
187 |
+
$row->film_bg_color = '000000';
|
188 |
+
$row->film_tmb_margin = 0;
|
189 |
+
$row->film_act_border_width = 0;
|
190 |
+
$row->film_act_border_style = 'none';
|
191 |
+
$row->film_act_border_color = 'FFFFFF';
|
192 |
+
$row->film_dac_transparent = 50;
|
193 |
+
$row->enable_time_bar = 1;
|
194 |
+
$row->timer_bar_type = 'top';
|
195 |
+
$row->timer_bar_size = 5;
|
196 |
+
$row->timer_bar_color = 'BBBBBB';
|
197 |
+
$row->timer_bar_transparent = 50;
|
198 |
+
$row->built_in_watermark_type = 'none';
|
199 |
+
$row->built_in_watermark_position = 'middle-center';
|
200 |
+
$row->built_in_watermark_size = 15;
|
201 |
+
$row->built_in_watermark_url = WDS()->plugin_url . '/images/watermark.png';
|
202 |
+
$row->built_in_watermark_text = '10Web.io';
|
203 |
+
$row->built_in_watermark_font_size = 20;
|
204 |
+
$row->built_in_watermark_font = '';
|
205 |
+
$row->built_in_watermark_color = 'FFFFFF';
|
206 |
+
$row->built_in_watermark_opacity = 70;
|
207 |
+
$row->stop_animation = 0;
|
208 |
+
$row->css = '';
|
209 |
+
$row->right_butt_url = WDS()->plugin_url . '/images/arrow/arrow11/1/2.png';
|
210 |
+
$row->left_butt_url = WDS()->plugin_url . '/images/arrow/arrow11/1/1.png';
|
211 |
+
$row->right_butt_hov_url = WDS()->plugin_url . '/images/arrow/arrow11/1/4.png';
|
212 |
+
$row->left_butt_hov_url = WDS()->plugin_url . '/images/arrow/arrow11/1/3.png';
|
213 |
+
$row->rl_butt_img_or_not = 'style';
|
214 |
+
$row->bullets_img_main_url = WDS()->plugin_url . '/images/bullet/bullet1/1/1.png';
|
215 |
+
$row->bullets_img_hov_url = WDS()->plugin_url . '/images/bullet/bullet1/1/2.png';
|
216 |
+
$row->bull_butt_img_or_not = 'style';
|
217 |
+
$row->play_paus_butt_img_or_not = 'style';
|
218 |
+
$row->play_butt_url = WDS()->plugin_url . '/images/button/button4/1/1.png';
|
219 |
+
$row->play_butt_hov_url = WDS()->plugin_url . '/images/button/button4/1/2.png';
|
220 |
+
$row->paus_butt_url = WDS()->plugin_url . '/images/button/button4/1/3.png';
|
221 |
+
$row->paus_butt_hov_url = WDS()->plugin_url . '/images/button/button4/1/4.png';
|
222 |
+
$row->start_slide_num = 1;
|
223 |
+
$row->effect_duration = 800;
|
224 |
+
$row->carousel = 0;
|
225 |
+
$row->carousel_image_counts = 7;
|
226 |
+
$row->carousel_image_parameters = 0.85;
|
227 |
+
$row->carousel_fit_containerWidth = 0;
|
228 |
+
$row->carousel_width = 1000;
|
229 |
+
$row->parallax_effect = 0;
|
230 |
+
$row->mouse_swipe_nav = 0;
|
231 |
+
$row->bull_hover = 1;
|
232 |
+
$row->touch_swipe_nav = 1;
|
233 |
+
$row->mouse_wheel_nav = 0;
|
234 |
+
$row->keyboard_nav = 0;
|
235 |
+
$row->possib_add_ffamily = '';
|
236 |
+
$row->show_thumbnail = 0;
|
237 |
+
$row->thumb_size = '0.3';
|
238 |
+
$row->fixed_bg = 0;
|
239 |
+
$row->smart_crop = 0;
|
240 |
+
$row->crop_image_position = 'center center';
|
241 |
+
$row->javascript = '';
|
242 |
+
$row->carousel_degree = 0;
|
243 |
+
$row->carousel_grayscale = 0;
|
244 |
+
$row->carousel_transparency = 0;
|
245 |
+
$row->bull_back_act_color = '000000';
|
246 |
+
$row->bull_back_color = 'CCCCCC';
|
247 |
+
$row->bull_radius = '20px';
|
248 |
+
$row->possib_add_google_fonts = 0;
|
249 |
+
$row->possib_add_ffamily_google = '';
|
250 |
+
$row->slider_loop = 1;
|
251 |
+
$row->hide_on_mobile = 0;
|
252 |
+
$row->twoway_slideshow = 0;
|
253 |
+
$row->full_width_for_mobile = 0;
|
254 |
+
$row->order_dir = 'asc';
|
255 |
+
}
|
256 |
+
return $row;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Create Preview Slider post.
|
261 |
+
*
|
262 |
+
* @return string $guid
|
263 |
+
*/
|
264 |
+
public function get_slide_preview_post() {
|
265 |
+
$post_type = 'wds-slider';
|
266 |
+
$row = get_posts(array( 'post_type' => $post_type ));
|
267 |
+
if ( !empty($row[0]) ) {
|
268 |
+
return get_post_permalink($row[0]->ID);
|
269 |
+
}
|
270 |
+
else {
|
271 |
+
$post_params = array(
|
272 |
+
'post_author' => 1,
|
273 |
+
'post_status' => 'publish',
|
274 |
+
'post_content' => '[SliderPreview]',
|
275 |
+
'post_title' => 'Preview',
|
276 |
+
'post_type' => 'wds-slider',
|
277 |
+
'comment_status' => 'closed',
|
278 |
+
'ping_status' => 'closed',
|
279 |
+
'post_parent' => 0,
|
280 |
+
'menu_order' => 0,
|
281 |
+
'import_id' => 0,
|
282 |
+
);
|
283 |
+
// Create new post by type.
|
284 |
+
$insert_id = wp_insert_post($post_params);
|
285 |
+
if ( !is_wp_error($insert_id) ) {
|
286 |
+
flush_rewrite_rules();
|
287 |
+
return get_post_permalink($insert_id);
|
288 |
+
}
|
289 |
+
else {
|
290 |
+
return "";
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Publish.
|
297 |
+
*
|
298 |
+
* @param $id
|
299 |
+
* @param bool $all
|
300 |
+
*
|
301 |
+
* @return int
|
302 |
+
*/
|
303 |
+
public function publish( $id, $all = FALSE ) {
|
304 |
+
global $wpdb;
|
305 |
+
$where = ($all ? '' : ' WHERE id=' . $id);
|
306 |
+
$updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'wdsslider` SET `published` = 1' . $where);
|
307 |
+
|
308 |
+
$message_id = 2;
|
309 |
+
if ( $updated !== FALSE ) {
|
310 |
+
$message_id = 9;
|
311 |
+
}
|
312 |
+
return $message_id;
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Unpublish.
|
317 |
+
*
|
318 |
+
* @param $id
|
319 |
+
* @param bool $all
|
320 |
+
*
|
321 |
+
* @return int
|
322 |
+
*/
|
323 |
+
public function unpublish( $id, $all = FALSE ) {
|
324 |
+
global $wpdb;
|
325 |
+
$where = ($all ? '' : ' WHERE id=' . $id);
|
326 |
+
$updated = $wpdb->query('UPDATE `' . $wpdb->prefix . 'wdsslider` SET `published` = 0' . $where);
|
327 |
+
|
328 |
+
$message_id = 2;
|
329 |
+
if ( $updated !== FALSE ) {
|
330 |
+
$message_id = 11;
|
331 |
+
}
|
332 |
+
return $message_id;
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Delete.
|
337 |
+
*
|
338 |
+
* @param $id
|
339 |
+
* @param bool $all
|
340 |
+
*
|
341 |
+
* @return int
|
342 |
+
*/
|
343 |
+
public function delete( $id, $all = FALSE ) {
|
344 |
+
global $wpdb;
|
345 |
+
$where = ($all ? '' : ' WHERE `id` = ' . $id);
|
346 |
+
$slide_where = ($all ? '' : ' WHERE `t1`.`slider_id` = ' . $id);
|
347 |
+
|
348 |
+
$delete = $wpdb->query('DELETE FROM ' . $wpdb->prefix . 'wdsslider ' . $where);
|
349 |
+
if ($delete) {
|
350 |
+
$wpdb->query('DELETE t1.*, t2.* FROM `' . $wpdb->prefix . 'wdsslide` AS `t1` LEFT JOIN ' . $wpdb->prefix . 'wdslayer AS `t2` ON `t1`.`id` = `t2`.`slide_id` ' . $slide_where);
|
351 |
+
// TODO. need works the other version.
|
352 |
+
// $this->remove_frontend_js_file( $id );
|
353 |
+
}
|
354 |
+
$message_id = 2;
|
355 |
+
if ( $delete ) {
|
356 |
+
$message_id = 3;
|
357 |
+
if ( $all ) {
|
358 |
+
$message_id = 5;
|
359 |
+
}
|
360 |
+
}
|
361 |
+
return $message_id;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Duplicate.
|
366 |
+
*
|
367 |
+
* @param $id
|
368 |
+
* @param bool $all
|
369 |
+
*
|
370 |
+
* @return int
|
371 |
+
*/
|
372 |
+
public function duplicate( $id, $all = FALSE ) {
|
373 |
+
global $wpdb;
|
374 |
+
$where = ($all ? '' : ' WHERE `id` = ' . $id);
|
375 |
+
|
376 |
+
$sliders = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslider`' . $where);
|
377 |
+
if ( !empty($sliders) ) {
|
378 |
+
foreach ( $sliders as $slider ) {
|
379 |
+
$slider_ids[] = $slider->id;
|
380 |
+
unset($slider->id);
|
381 |
+
$sliders_data[$id] = $slider;
|
382 |
+
}
|
383 |
+
// Get slides by slider ids.
|
384 |
+
$slides = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslide` WHERE `slider_id` IN(' . implode($slider_ids, ',') . ')');
|
385 |
+
if ( !empty($slides)) {
|
386 |
+
$slides_data = array();
|
387 |
+
foreach ( $slides as $slide ) {
|
388 |
+
$id = $slide->id;
|
389 |
+
$slider_id = $slide->slider_id;
|
390 |
+
$slide_ids[] = $slide->id;
|
391 |
+
unset($slide->id);
|
392 |
+
unset($slide->slider_id);
|
393 |
+
$slides_data[$slider_id][$id] = $slide;
|
394 |
+
}
|
395 |
+
// Get layers by slide ids.
|
396 |
+
$layers = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdslayer` WHERE `slide_id` IN (' . implode($slide_ids,',') . ')');
|
397 |
+
$layers_data = array();
|
398 |
+
if ( !empty($layers) ) {
|
399 |
+
foreach ( $layers as $layer ) {
|
400 |
+
$slide_id = $layer->slide_id;
|
401 |
+
unset($layer->id);
|
402 |
+
unset($layer->slide_id);
|
403 |
+
$layers_data[$slide_id][] = $layer;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
}
|
407 |
+
// Insert slider data.
|
408 |
+
$slider_save = $this->insert_slides( array('sliders_data' => $sliders_data, 'slides_data' => $slides_data, 'layers_data' => $layers_data) );
|
409 |
+
}
|
410 |
+
|
411 |
+
$message_id = 2;
|
412 |
+
if ( $slider_save ) {
|
413 |
+
$message_id = 26;
|
414 |
+
}
|
415 |
+
return $message_id;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Merge.
|
420 |
+
*
|
421 |
+
* @param $id
|
422 |
+
* @param bool $all
|
423 |
+
*
|
424 |
+
* @return int
|
425 |
+
*/
|
426 |
+
public function merge( $id, $all = FALSE ) {
|
427 |
+
global $wpdb;
|
428 |
+
$checkds = WDW_S_Library::get('check');
|
429 |
+
if ( !empty($checkds) ) {
|
430 |
+
if ( isset($checkds[$id]) ) {
|
431 |
+
unset($checkds[$id]);
|
432 |
+
}
|
433 |
+
$ids[] = $id;
|
434 |
+
foreach ( $checkds as $k => $v ){
|
435 |
+
$ids[] = $k;
|
436 |
+
}
|
437 |
+
}
|
438 |
+
$str_ids = implode( $ids, ',');
|
439 |
+
$where = ($all ? '' : ' WHERE `id` IN (' . $str_ids . ')');
|
440 |
+
$sliders = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslider` '. $where .' ORDER BY FIELD(`id`,' . $str_ids . ');');
|
441 |
+
if ( !empty($sliders) ) {
|
442 |
+
$name = "Merged sliders of ";
|
443 |
+
foreach ( $sliders as $slider ) {
|
444 |
+
$name .= $slider->name .', ';
|
445 |
+
$slider_ids[$slider->id] = $slider;
|
446 |
+
}
|
447 |
+
|
448 |
+
if ( !empty($slider_ids[$id]) ) {
|
449 |
+
$slider_data = $slider_ids[$id];
|
450 |
+
unset($slider_data->id);
|
451 |
+
$slider_data->name = rtrim($name, ', ');
|
452 |
+
$sliders_data[$id] = $slider_data;
|
453 |
+
$str_slider_ids = implode( array_keys($slider_ids), ',' );
|
454 |
+
$slides = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdsslide` WHERE `slider_id` IN ('. $str_slider_ids . ') ORDER BY FIELD(`slider_id`,' . $str_slider_ids . ')');
|
455 |
+
|
456 |
+
$order_slide = 1;
|
457 |
+
$slides_data = array();
|
458 |
+
foreach ( $slides as $slide ) {
|
459 |
+
$slide_id = $slide->id;
|
460 |
+
$slide_ids[] = $slide_id;
|
461 |
+
unset($slide->id);
|
462 |
+
unset($slide->slider_id);
|
463 |
+
$slide->order = $order_slide;
|
464 |
+
$slides_data[$id][$slide_id] = $slide;
|
465 |
+
$order_slide++;
|
466 |
+
}
|
467 |
+
// Get layers by slide ids.
|
468 |
+
$layers = $wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'wdslayer` WHERE `slide_id` IN (' . implode($slide_ids,',') . ') ORDER BY `slide_id` ASC');
|
469 |
+
$layers_data = array();
|
470 |
+
if ( !empty($layers) ) {
|
471 |
+
foreach ( $layers as $layer ) {
|
472 |
+
$slide_id = $layer->slide_id;
|
473 |
+
unset($layer->id);
|
474 |
+
unset($layer->slide_id);
|
475 |
+
$layers_data[$slide_id][] = $layer;
|
476 |
+
}
|
477 |
+
}
|
478 |
+
// Insert slider data.
|
479 |
+
$slider_save = $this->insert_slides( array('sliders_data' => $sliders_data, 'slides_data' => $slides_data, 'layers_data' => $layers_data) );
|
480 |
+
}
|
481 |
+
|
482 |
+
}
|
483 |
+
$message_id = 27;
|
484 |
+
if ( $slider_save ) {
|
485 |
+
$message_id = 28;
|
486 |
+
}
|
487 |
+
return $message_id;
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Insert slides.
|
492 |
+
*
|
493 |
+
* @param array $params
|
494 |
+
* @return mixed
|
495 |
+
*/
|
496 |
+
public function insert_slides( $params = array() ) {
|
497 |
+
global $wpdb;
|
498 |
+
$sliders_data = $params['sliders_data'];
|
499 |
+
$slides_data = $params['slides_data'];
|
500 |
+
$layers_data = $params['layers_data'];
|
501 |
+
|
502 |
+
if ( !empty($sliders_data) ) {
|
503 |
+
foreach ( $sliders_data as $slider_id => $slider ) {
|
504 |
+
$slider_save = $wpdb->insert($wpdb->prefix . 'wdsslider', (array) $slider);
|
505 |
+
$new_slider_id = $wpdb->insert_id;
|
506 |
+
|
507 |
+
if ( !empty($slides_data[$slider_id]) ) {
|
508 |
+
foreach ( $slides_data[$slider_id] as $slid_id => $slide) {
|
509 |
+
|
510 |
+
$slide->slider_id = $new_slider_id;
|
511 |
+
$slid_save = $wpdb->insert($wpdb->prefix . 'wdsslide', (array) $slide);
|
512 |
+
$new_slide_id = $wpdb->insert_id;
|
513 |
+
|
514 |
+
if ( !empty($layers_data[$slid_id]) ) {
|
515 |
+
foreach ( $layers_data[$slid_id] as $layer ) {
|
516 |
+
$layer->slide_id = $new_slide_id;
|
517 |
+
$layer_save = $wpdb->insert($wpdb->prefix . 'wdslayer', (array) $layer);
|
518 |
+
}
|
519 |
+
}
|
520 |
+
}
|
521 |
+
}
|
522 |
+
}
|
523 |
+
return $new_slider_id;
|
524 |
+
}
|
525 |
+
return FALSE;
|
526 |
+
}
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Get slides info.
|
530 |
+
*
|
531 |
+
* @param array $params
|
532 |
+
* @return array
|
533 |
+
*/
|
534 |
+
public function get_slides_info( $params = array() ) {
|
535 |
+
global $wpdb;
|
536 |
+
$ids = $params['ids'];
|
537 |
+
$rows = $wpdb->get_results('
|
538 |
+
SELECT
|
539 |
+
`slider_id`,
|
540 |
+
COUNT(*) AS `count`
|
541 |
+
FROM
|
542 |
+
' . $wpdb->prefix . 'wdsslide
|
543 |
+
WHERE
|
544 |
+
`slider_id` IN (' . implode(',', $ids) . ')
|
545 |
+
AND `image_url` <> ""
|
546 |
+
AND `image_url` NOT LIKE "%images/no-image.png%"
|
547 |
+
GROUP BY `slider_id`
|
548 |
+
');
|
549 |
+
$images_count = array();
|
550 |
+
if ( !empty($rows) ) {
|
551 |
+
foreach ( $rows as $row ) {
|
552 |
+
$images_count[$row->slider_id] = $row->count;
|
553 |
+
}
|
554 |
+
}
|
555 |
+
|
556 |
+
$rows = $wpdb->get_results('
|
557 |
+
SELECT
|
558 |
+
`slider_id`,
|
559 |
+
`thumb_url`,
|
560 |
+
`type`
|
561 |
+
FROM
|
562 |
+
' . $wpdb->prefix . 'wdsslide
|
563 |
+
WHERE
|
564 |
+
`slider_id` IN ('. implode(',', $ids) .')
|
565 |
+
ORDER BY `order` ASC
|
566 |
+
');
|
567 |
+
|
568 |
+
$preview_thumb_url = WDS()->plugin_url . '/images/no-image.png';
|
569 |
+
if ( $rows ) {
|
570 |
+
foreach ( $rows as $row ) {
|
571 |
+
$preview_thumb_url = ( $row->type == 'video' && ctype_digit($row->thumb_url) ) ? ( wp_get_attachment_url(get_post_thumbnail_id($row->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($row->thumb_url)) : WDS()->plugin_url . '/images/no-video.png') : $row->thumb_url;
|
572 |
+
if ($preview_thumb_url) {
|
573 |
+
$preview_thumb_url = str_replace('{site_url}', site_url(), $preview_thumb_url);
|
574 |
+
}
|
575 |
+
$thumbs[$row->slider_id] = $preview_thumb_url;
|
576 |
+
}
|
577 |
+
}
|
578 |
+
|
579 |
+
$data = array();
|
580 |
+
foreach ( $ids as $id ) {
|
581 |
+
$data[$id] = array (
|
582 |
+
'count' => !empty($images_count[$id]) ? $images_count[$id] : 0,
|
583 |
+
'preview_thumb' => !empty($thumbs[$id]) ? $thumbs[$id] : $preview_thumb_url
|
584 |
+
);
|
585 |
+
}
|
586 |
+
return $data;
|
587 |
+
}
|
588 |
+
|
589 |
+
/*
|
590 |
+
* Create frontend js file.
|
591 |
+
*
|
592 |
+
* @param int int
|
593 |
+
* @return bool
|
594 |
+
*/
|
595 |
+
public function create_frontend_js_file( $id ) {
|
596 |
+
$create_js = WDW_S_Library::create_frontend_js_file( $id );
|
597 |
+
global $wpdb;
|
598 |
+
$update = $wpdb->update( $wpdb->prefix . 'wdsslider', array('jsversion' => rand()), array('id' => $id) );
|
599 |
+
return $update;
|
600 |
+
}
|
601 |
}
|
admin/models/WDSModelGoptions_wds.php
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
<?php
|
2 |
class WDSModelGoptions_wds {}
|
1 |
+
<?php
|
2 |
class WDSModelGoptions_wds {}
|
admin/models/WDSModelUninstall_wds.php
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSModelUninstall_wds {
|
4 |
-
public function __construct() {
|
5 |
-
}
|
6 |
-
public function delete_db_tables() {
|
7 |
-
global $wpdb;
|
8 |
-
|
9 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "wdsslider");
|
10 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "wdsslide");
|
11 |
-
$wpdb->query("DROP TABLE " . $wpdb->prefix . "wdslayer");
|
12 |
-
|
13 |
-
delete_option(
|
14 |
-
delete_option("
|
15 |
-
delete_option("
|
16 |
-
delete_option("
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
21 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSModelUninstall_wds {
|
4 |
+
public function __construct() {
|
5 |
+
}
|
6 |
+
public function delete_db_tables() {
|
7 |
+
global $wpdb;
|
8 |
+
|
9 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "wdsslider");
|
10 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "wdsslide");
|
11 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "wdslayer");
|
12 |
+
|
13 |
+
delete_option('tenweb_notice_status');
|
14 |
+
delete_option("wds_version");
|
15 |
+
delete_option("wds_theme_version");
|
16 |
+
delete_option("wds_global_options");
|
17 |
+
delete_option("wds_subscribe_done");
|
18 |
+
|
19 |
+
$wds_post_type = $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "posts WHERE post_type = 'wds-slider'");
|
20 |
+
wp_delete_post($wds_post_type);
|
21 |
+
}
|
22 |
}
|
admin/models/WDSModelWDSExport.php
CHANGED
@@ -1,115 +1,115 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSModelWDSExport {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function export_one() {
|
23 |
-
global $wpdb;
|
24 |
-
$slider_id = WDW_S_Library::get('current_id', 0);
|
25 |
-
$sliders_to_export = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider where id="%d"', $slider_id));
|
26 |
-
foreach ($sliders_to_export as $slider) {
|
27 |
-
$slider->music_url = str_replace('{site_url}', site_url(), $slider->music_url);
|
28 |
-
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
29 |
-
$slider->right_butt_url = str_replace('{site_url}', site_url(), $slider->right_butt_url);
|
30 |
-
$slider->left_butt_url = str_replace('{site_url}', site_url(), $slider->left_butt_url);
|
31 |
-
$slider->right_butt_hov_url = str_replace('{site_url}', site_url(), $slider->right_butt_hov_url);
|
32 |
-
$slider->left_butt_hov_url = str_replace('{site_url}', site_url(), $slider->left_butt_hov_url);
|
33 |
-
$slider->bullets_img_main_url = str_replace('{site_url}', site_url(), $slider->bullets_img_main_url);
|
34 |
-
$slider->bullets_img_hov_url = str_replace('{site_url}', site_url(), $slider->bullets_img_hov_url);
|
35 |
-
$slider->play_butt_url = str_replace('{site_url}', site_url(), $slider->play_butt_url);
|
36 |
-
$slider->play_butt_hov_url = str_replace('{site_url}', site_url(), $slider->play_butt_hov_url);
|
37 |
-
$slider->paus_butt_url = str_replace('{site_url}', site_url(), $slider->paus_butt_url);
|
38 |
-
$slider->paus_butt_hov_url = str_replace('{site_url}', site_url(), $slider->paus_butt_hov_url);
|
39 |
-
$slides = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"', $slider->id));
|
40 |
-
|
41 |
-
if ($slides) {
|
42 |
-
foreach ($slides as $slide) {
|
43 |
-
$slide->image_url = str_replace('{site_url}', site_url(), $slide->image_url);
|
44 |
-
$slide->thumb_url = str_replace('{site_url}', site_url(), $slide->thumb_url);
|
45 |
-
|
46 |
-
$slidelayers = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdslayer WHERE slide_id="%d"', $slide->id));
|
47 |
-
foreach ($slidelayers as $layer) {
|
48 |
-
$layer->image_url = str_replace('{site_url}', site_url(), $layer->image_url);
|
49 |
-
}
|
50 |
-
$slide->slidelayers = $slidelayers;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
$slider->slides = $slides;
|
54 |
-
}
|
55 |
-
return $sliders_to_export;
|
56 |
-
}
|
57 |
-
|
58 |
-
public function export_full() {
|
59 |
-
global $wpdb;
|
60 |
-
$slider_ids_string = WDW_S_Library::get('slider_ids', 0);
|
61 |
-
$slider_ids_string = rtrim($slider_ids_string, ",");
|
62 |
-
$slider_ids = explode(',', $slider_ids_string);
|
63 |
-
$sliders_to_export = array();
|
64 |
-
if ($slider_ids_string == 'all') {
|
65 |
-
$sliders = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'wdsslider');
|
66 |
-
}
|
67 |
-
else {
|
68 |
-
$sliders = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id IN (' . $slider_ids_string . ')');
|
69 |
-
}
|
70 |
-
foreach ($sliders as $slider) {
|
71 |
-
array_push($sliders_to_export, $slider);
|
72 |
-
}
|
73 |
-
foreach ($sliders_to_export as $slider) {
|
74 |
-
$slider->music_url = str_replace('{site_url}', site_url(), $slider->music_url);
|
75 |
-
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
76 |
-
$slider->right_butt_url = str_replace('{site_url}', site_url(), $slider->right_butt_url);
|
77 |
-
$slider->left_butt_url = str_replace('{site_url}', site_url(), $slider->left_butt_url);
|
78 |
-
$slider->right_butt_hov_url = str_replace('{site_url}', site_url(), $slider->right_butt_hov_url);
|
79 |
-
$slider->left_butt_hov_url = str_replace('{site_url}', site_url(), $slider->left_butt_hov_url);
|
80 |
-
$slider->bullets_img_main_url = str_replace('{site_url}', site_url(), $slider->bullets_img_main_url);
|
81 |
-
$slider->bullets_img_hov_url = str_replace('{site_url}', site_url(), $slider->bullets_img_hov_url);
|
82 |
-
$slider->play_butt_url = str_replace('{site_url}', site_url(), $slider->play_butt_url);
|
83 |
-
$slider->play_butt_hov_url = str_replace('{site_url}', site_url(), $slider->play_butt_hov_url);
|
84 |
-
$slider->paus_butt_url = str_replace('{site_url}', site_url(), $slider->paus_butt_url);
|
85 |
-
$slider->paus_butt_hov_url = str_replace('{site_url}', site_url(), $slider->paus_butt_hov_url);
|
86 |
-
$slides = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"', $slider->id));
|
87 |
-
|
88 |
-
$slides = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"', $slider->id));
|
89 |
-
if ($slides) {
|
90 |
-
foreach ($slides as $slide) {
|
91 |
-
$slide->image_url = str_replace('{site_url}', site_url(), $slide->image_url);
|
92 |
-
$slide->thumb_url = str_replace('{site_url}', site_url(), $slide->thumb_url);
|
93 |
-
|
94 |
-
$slidelayers = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdslayer WHERE slide_id="%d"', $slide->id));
|
95 |
-
foreach ($slidelayers as $layer) {
|
96 |
-
$layer->image_url = str_replace('{site_url}', site_url(), $layer->image_url);
|
97 |
-
}
|
98 |
-
$slide->slidelayers = $slidelayers;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
$slider->slides = $slides;
|
102 |
-
}
|
103 |
-
return $sliders_to_export;
|
104 |
-
}
|
105 |
-
|
106 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
107 |
-
// Getters & Setters //
|
108 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
109 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
110 |
-
// Private Methods //
|
111 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
112 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
113 |
-
// Listeners //
|
114 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSModelWDSExport {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function export_one() {
|
23 |
+
global $wpdb;
|
24 |
+
$slider_id = WDW_S_Library::get('current_id', 0);
|
25 |
+
$sliders_to_export = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslider where id="%d"', $slider_id));
|
26 |
+
foreach ($sliders_to_export as $slider) {
|
27 |
+
$slider->music_url = str_replace('{site_url}', site_url(), $slider->music_url);
|
28 |
+
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
29 |
+
$slider->right_butt_url = str_replace('{site_url}', site_url(), $slider->right_butt_url);
|
30 |
+
$slider->left_butt_url = str_replace('{site_url}', site_url(), $slider->left_butt_url);
|
31 |
+
$slider->right_butt_hov_url = str_replace('{site_url}', site_url(), $slider->right_butt_hov_url);
|
32 |
+
$slider->left_butt_hov_url = str_replace('{site_url}', site_url(), $slider->left_butt_hov_url);
|
33 |
+
$slider->bullets_img_main_url = str_replace('{site_url}', site_url(), $slider->bullets_img_main_url);
|
34 |
+
$slider->bullets_img_hov_url = str_replace('{site_url}', site_url(), $slider->bullets_img_hov_url);
|
35 |
+
$slider->play_butt_url = str_replace('{site_url}', site_url(), $slider->play_butt_url);
|
36 |
+
$slider->play_butt_hov_url = str_replace('{site_url}', site_url(), $slider->play_butt_hov_url);
|
37 |
+
$slider->paus_butt_url = str_replace('{site_url}', site_url(), $slider->paus_butt_url);
|
38 |
+
$slider->paus_butt_hov_url = str_replace('{site_url}', site_url(), $slider->paus_butt_hov_url);
|
39 |
+
$slides = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"', $slider->id));
|
40 |
+
|
41 |
+
if ($slides) {
|
42 |
+
foreach ($slides as $slide) {
|
43 |
+
$slide->image_url = str_replace('{site_url}', site_url(), $slide->image_url);
|
44 |
+
$slide->thumb_url = str_replace('{site_url}', site_url(), $slide->thumb_url);
|
45 |
+
|
46 |
+
$slidelayers = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdslayer WHERE slide_id="%d"', $slide->id));
|
47 |
+
foreach ($slidelayers as $layer) {
|
48 |
+
$layer->image_url = str_replace('{site_url}', site_url(), $layer->image_url);
|
49 |
+
}
|
50 |
+
$slide->slidelayers = $slidelayers;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
$slider->slides = $slides;
|
54 |
+
}
|
55 |
+
return $sliders_to_export;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function export_full() {
|
59 |
+
global $wpdb;
|
60 |
+
$slider_ids_string = WDW_S_Library::get('slider_ids', 0);
|
61 |
+
$slider_ids_string = rtrim($slider_ids_string, ",");
|
62 |
+
$slider_ids = explode(',', $slider_ids_string);
|
63 |
+
$sliders_to_export = array();
|
64 |
+
if ($slider_ids_string == 'all') {
|
65 |
+
$sliders = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'wdsslider');
|
66 |
+
}
|
67 |
+
else {
|
68 |
+
$sliders = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'wdsslider WHERE id IN (' . $slider_ids_string . ')');
|
69 |
+
}
|
70 |
+
foreach ($sliders as $slider) {
|
71 |
+
array_push($sliders_to_export, $slider);
|
72 |
+
}
|
73 |
+
foreach ($sliders_to_export as $slider) {
|
74 |
+
$slider->music_url = str_replace('{site_url}', site_url(), $slider->music_url);
|
75 |
+
$slider->built_in_watermark_url = str_replace('{site_url}', site_url(), $slider->built_in_watermark_url);
|
76 |
+
$slider->right_butt_url = str_replace('{site_url}', site_url(), $slider->right_butt_url);
|
77 |
+
$slider->left_butt_url = str_replace('{site_url}', site_url(), $slider->left_butt_url);
|
78 |
+
$slider->right_butt_hov_url = str_replace('{site_url}', site_url(), $slider->right_butt_hov_url);
|
79 |
+
$slider->left_butt_hov_url = str_replace('{site_url}', site_url(), $slider->left_butt_hov_url);
|
80 |
+
$slider->bullets_img_main_url = str_replace('{site_url}', site_url(), $slider->bullets_img_main_url);
|
81 |
+
$slider->bullets_img_hov_url = str_replace('{site_url}', site_url(), $slider->bullets_img_hov_url);
|
82 |
+
$slider->play_butt_url = str_replace('{site_url}', site_url(), $slider->play_butt_url);
|
83 |
+
$slider->play_butt_hov_url = str_replace('{site_url}', site_url(), $slider->play_butt_hov_url);
|
84 |
+
$slider->paus_butt_url = str_replace('{site_url}', site_url(), $slider->paus_butt_url);
|
85 |
+
$slider->paus_butt_hov_url = str_replace('{site_url}', site_url(), $slider->paus_butt_hov_url);
|
86 |
+
$slides = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"', $slider->id));
|
87 |
+
|
88 |
+
$slides = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdsslide WHERE slider_id="%d"', $slider->id));
|
89 |
+
if ($slides) {
|
90 |
+
foreach ($slides as $slide) {
|
91 |
+
$slide->image_url = str_replace('{site_url}', site_url(), $slide->image_url);
|
92 |
+
$slide->thumb_url = str_replace('{site_url}', site_url(), $slide->thumb_url);
|
93 |
+
|
94 |
+
$slidelayers = $wpdb->get_results($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'wdslayer WHERE slide_id="%d"', $slide->id));
|
95 |
+
foreach ($slidelayers as $layer) {
|
96 |
+
$layer->image_url = str_replace('{site_url}', site_url(), $layer->image_url);
|
97 |
+
}
|
98 |
+
$slide->slidelayers = $slidelayers;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
$slider->slides = $slides;
|
102 |
+
}
|
103 |
+
return $sliders_to_export;
|
104 |
+
}
|
105 |
+
|
106 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
107 |
+
// Getters & Setters //
|
108 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
109 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
110 |
+
// Private Methods //
|
111 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
112 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
113 |
+
// Listeners //
|
114 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
115 |
}
|
admin/models/WDSModelWDSShortcode.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSModelWDSShortcode {
|
4 |
-
|
5 |
-
public function __construct() {
|
6 |
-
}
|
7 |
-
|
8 |
-
public function get_row_data() {
|
9 |
-
global $wpdb;
|
10 |
-
$rows = $wpdb->get_results('SELECT `id`, `name` FROM `' . $wpdb->prefix . 'wdsslider` ORDER BY `name` ASC');
|
11 |
-
return $rows;
|
12 |
-
}
|
13 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSModelWDSShortcode {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
}
|
7 |
+
|
8 |
+
public function get_row_data() {
|
9 |
+
global $wpdb;
|
10 |
+
$rows = $wpdb->get_results('SELECT `id`, `name` FROM `' . $wpdb->prefix . 'wdsslider` ORDER BY `name` ASC');
|
11 |
+
return $rows;
|
12 |
+
}
|
13 |
}
|
admin/models/WDSModelWidgetSlideshow.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WDSModelWidgetSlideshow {
|
4 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
-
// Events //
|
6 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Constants //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Variables //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Constructor & Destructor //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
-
public function __construct() {
|
17 |
-
}
|
18 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
-
// Public Methods //
|
20 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
-
|
22 |
-
public function get_slider_rows_data() {
|
23 |
-
global $wpdb;
|
24 |
-
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdsslider WHERE published=1");
|
25 |
-
return $rows;
|
26 |
-
}
|
27 |
-
|
28 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
-
// Getters & Setters //
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
-
// Private Methods //
|
33 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
-
// Listeners //
|
36 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WDSModelWidgetSlideshow {
|
4 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
5 |
+
// Events //
|
6 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
7 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
+
// Constants //
|
9 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
+
// Variables //
|
12 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
+
// Constructor & Destructor //
|
15 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
+
public function __construct() {
|
17 |
+
}
|
18 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
19 |
+
// Public Methods //
|
20 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
+
|
22 |
+
public function get_slider_rows_data() {
|
23 |
+
global $wpdb;
|
24 |
+
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "wdsslider WHERE published=1");
|
25 |
+
return $rows;
|
26 |
+
}
|
27 |
+
|
28 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
29 |
+
// Getters & Setters //
|
30 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
+
// Private Methods //
|
33 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
34 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
35 |
+
// Listeners //
|
36 |
+
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
}
|
admin/models/posts.php
CHANGED
@@ -1,65 +1,65 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class WDSModelposts
|
5 |
-
*/
|
6 |
-
class WDSModelposts {
|
7 |
-
public function get_rows_data() {
|
8 |
-
$search_value = ((isset($_POST['search_value'])) ? sanitize_text_field($_POST['search_value']) : '');
|
9 |
-
$category_id = ((isset($_POST['category_id']) && $_POST['category_id'] != -1) ? sanitize_text_field($_POST['category_id']) : '');
|
10 |
-
$category_name = $category_id ? get_the_category_by_ID($category_id) : '';
|
11 |
-
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? sanitize_text_field($_POST['asc_or_desc']) : 'ASC');
|
12 |
-
$order_by = (isset($_POST['order_by']) ? sanitize_text_field($_POST['order_by']) : 'date');
|
13 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
14 |
-
$limit = ((int) sanitize_text_field($_POST['page_number']) - 1) * 20;
|
15 |
-
}
|
16 |
-
else {
|
17 |
-
$limit = 0;
|
18 |
-
}
|
19 |
-
$page_limit = (int) ($limit / 20 + 1);
|
20 |
-
$args = array(
|
21 |
-
'posts_per_page' => 255,
|
22 |
-
'category_name' => $category_name,
|
23 |
-
'orderby' => $order_by,
|
24 |
-
'order' => $asc_or_desc,
|
25 |
-
'post_status' => 'publish',
|
26 |
-
);
|
27 |
-
|
28 |
-
$posts = get_posts($args);
|
29 |
-
$row = array();
|
30 |
-
$counter = 0;
|
31 |
-
for ($i = 0; $i < count($posts); $i++) {
|
32 |
-
$post = $posts[$i];
|
33 |
-
if (has_post_thumbnail($post->ID) && (!$search_value || (stristr($post->post_title, $search_value) !== FALSE))) {
|
34 |
-
$counter++;
|
35 |
-
if ($counter > $limit && $counter <= $limit + 20) {
|
36 |
-
$row[$post->ID] = new stdClass();
|
37 |
-
$row[$post->ID]->id = $post->ID;
|
38 |
-
$image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
|
39 |
-
$row[$post->ID]->image_url = $image_url[0];
|
40 |
-
$thumb_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail');
|
41 |
-
$row[$post->ID]->thumb_url = $thumb_url[0] ? $thumb_url[0] : $image_url[0];
|
42 |
-
$row[$post->ID]->title = $post->post_title;
|
43 |
-
$row[$post->ID]->date = $post->post_date;
|
44 |
-
$row[$post->ID]->modified = $post->post_modified;
|
45 |
-
$row[$post->ID]->type = $post->post_type;
|
46 |
-
$row[$post->ID]->author = get_the_author_meta('display_name', $post->post_author);
|
47 |
-
$row[$post->ID]->link = get_permalink($post->ID);
|
48 |
-
$row[$post->ID]->content = $this->add_more_link(strip_tags($post->post_content), 250);
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
return array($row, $counter, $page_limit);
|
54 |
-
}
|
55 |
-
|
56 |
-
public function add_more_link($content, $charlength) {
|
57 |
-
if (mb_strlen($content) > $charlength) {
|
58 |
-
$subex = mb_substr($content, 0, $charlength);
|
59 |
-
return $subex . '<a target="_blank" class="wds_more"> ...</a>';
|
60 |
-
}
|
61 |
-
else {
|
62 |
-
return $content;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class WDSModelposts
|
5 |
+
*/
|
6 |
+
class WDSModelposts {
|
7 |
+
public function get_rows_data() {
|
8 |
+
$search_value = ((isset($_POST['search_value'])) ? sanitize_text_field($_POST['search_value']) : '');
|
9 |
+
$category_id = ((isset($_POST['category_id']) && $_POST['category_id'] != -1) ? sanitize_text_field($_POST['category_id']) : '');
|
10 |
+
$category_name = $category_id ? get_the_category_by_ID($category_id) : '';
|
11 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc'])) ? sanitize_text_field($_POST['asc_or_desc']) : 'ASC');
|
12 |
+
$order_by = (isset($_POST['order_by']) ? sanitize_text_field($_POST['order_by']) : 'date');
|
13 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
14 |
+
$limit = ((int) sanitize_text_field($_POST['page_number']) - 1) * 20;
|
15 |
+
}
|
16 |
+
else {
|
17 |
+
$limit = 0;
|
18 |
+
}
|
19 |
+
$page_limit = (int) ($limit / 20 + 1);
|
20 |
+
$args = array(
|
21 |
+
'posts_per_page' => 255,
|
22 |
+
'category_name' => $category_name,
|
23 |
+
'orderby' => $order_by,
|
24 |
+
'order' => $asc_or_desc,
|
25 |
+
'post_status' => 'publish',
|
26 |
+
);
|
27 |
+
|
28 |
+
$posts = get_posts($args);
|
29 |
+
$row = array();
|
30 |
+
$counter = 0;
|
31 |
+
for ($i = 0; $i < count($posts); $i++) {
|
32 |
+
$post = $posts[$i];
|
33 |
+
if (has_post_thumbnail($post->ID) && (!$search_value || (stristr($post->post_title, $search_value) !== FALSE))) {
|
34 |
+
$counter++;
|
35 |
+
if ($counter > $limit && $counter <= $limit + 20) {
|
36 |
+
$row[$post->ID] = new stdClass();
|
37 |
+
$row[$post->ID]->id = $post->ID;
|
38 |
+
$image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
|
39 |
+
$row[$post->ID]->image_url = $image_url[0];
|
40 |
+
$thumb_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail');
|
41 |
+
$row[$post->ID]->thumb_url = $thumb_url[0] ? $thumb_url[0] : $image_url[0];
|
42 |
+
$row[$post->ID]->title = $post->post_title;
|
43 |
+
$row[$post->ID]->date = $post->post_date;
|
44 |
+
$row[$post->ID]->modified = $post->post_modified;
|
45 |
+
$row[$post->ID]->type = $post->post_type;
|
46 |
+
$row[$post->ID]->author = get_the_author_meta('display_name', $post->post_author);
|
47 |
+
$row[$post->ID]->link = get_permalink($post->ID);
|
48 |
+
$row[$post->ID]->content = $this->add_more_link(strip_tags($post->post_content), 250);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
return array($row, $counter, $page_limit);
|
54 |
+
}
|
55 |
+
|
56 |
+
public function add_more_link($content, $charlength) {
|
57 |
+
if (mb_strlen($content) > $charlength) {
|
58 |
+
$subex = mb_substr($content, 0, $charlength);
|
59 |
+
return $subex . '<a target="_blank" class="wds_more"> ...</a>';
|
60 |
+
}
|
61 |
+
else {
|
62 |
+
return $content;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
}
|
admin/views/AdminView.php
CHANGED
@@ -1,336 +1,336 @@
|
|
1 |
-
<?php
|
2 |
-
defined('ABSPATH') || die('Access Denied');
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Admin view class.
|
6 |
-
*/
|
7 |
-
class AdminView_wds {
|
8 |
-
|
9 |
-
public function __construct() {
|
10 |
-
wp_enqueue_style(WDS()->prefix . '_tables');
|
11 |
-
wp_enqueue_script(WDS()->prefix . '_admin');
|
12 |
-
}
|
13 |
-
/**
|
14 |
-
* Generate form.
|
15 |
-
*
|
16 |
-
* @param string $content
|
17 |
-
* @param array $attr
|
18 |
-
*
|
19 |
-
* @return string Form html.
|
20 |
-
*/
|
21 |
-
protected function form($content = '', $attr = array()) {
|
22 |
-
ob_start();
|
23 |
-
// Form.
|
24 |
-
$action = isset($attr['action']) ? esc_attr($attr['action']) : '';
|
25 |
-
$method = isset($attr['method']) ? esc_attr($attr['method']) : 'post';
|
26 |
-
$name = isset($attr['name']) ? esc_attr($attr['name']) : WDS()->prefix . '_form';
|
27 |
-
$id = isset($attr['id']) ? esc_attr($attr['id']) : '';
|
28 |
-
$class = isset($attr['class']) ? esc_attr($attr['class']) : WDS()->prefix . '_form';
|
29 |
-
$style = isset($attr['style']) ? esc_attr($attr['style']) : '';
|
30 |
-
$current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
|
31 |
-
$task = isset($attr['task']) ? esc_attr($attr['task']) : '';
|
32 |
-
?><div class="wrap<?php echo (isset($_GET['action']) ? ' wd-wrap-ajax' : ''); ?>">
|
33 |
-
<?php
|
34 |
-
// Generate message container by message id or directly by message.
|
35 |
-
$message_id = WDW_S_Library::get('message', 0);
|
36 |
-
$message = WDW_S_Library::get('msg', '');
|
37 |
-
echo WDW_S_Library::message_id($message_id, $message);
|
38 |
-
?>
|
39 |
-
<form
|
40 |
-
<?php echo $action ? 'action="' . $action . '"' : ''; ?>
|
41 |
-
<?php echo $method ? 'method="' . $method . '"' : ''; ?>
|
42 |
-
<?php echo $name ? ' name="' . $name . '"' : ''; ?>
|
43 |
-
<?php echo $id ? ' id="' . $id . '"' : ''; ?>
|
44 |
-
<?php echo $class ? ' class="' . $class . '"' : ''; ?>
|
45 |
-
<?php echo $style ? ' style="' . $style . '"' : ''; ?>
|
46 |
-
><h1 class="hidden"></h1><?php
|
47 |
-
echo $content;
|
48 |
-
// Add nonce to form.
|
49 |
-
wp_nonce_field(WDS()->nonce, WDS()->nonce);
|
50 |
-
?>
|
51 |
-
<input id="task" name="task" type="hidden" value="<?php echo $task; ?>"/>
|
52 |
-
<input id="current_id" name="current_id" type="hidden" value="<?php echo $current_id; ?>"/>
|
53 |
-
</form>
|
54 |
-
</div><?php
|
55 |
-
return ob_get_clean();
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Generate title.
|
60 |
-
*
|
61 |
-
* @param array $params
|
62 |
-
*
|
63 |
-
* @return string Title html.
|
64 |
-
*/
|
65 |
-
protected function title($params) {
|
66 |
-
$title = !empty($params['title']) ? $params['title'] : '';
|
67 |
-
$title_class = !empty($params['title_class']) ? $params['title_class'] : '';
|
68 |
-
$title_name = !empty($params['title_name']) ? $params['title_name'] : '';
|
69 |
-
$title_id = !empty($params['title_id']) ? $params['title_id'] : '';
|
70 |
-
$title_value = !empty($params['title_value']) ? $params['title_value'] : '';
|
71 |
-
$add_new_button = !empty($params['add_new_button']) ? $params['add_new_button'] : '';
|
72 |
-
|
73 |
-
$attributes = '';
|
74 |
-
if ( !empty($add_new_button) && is_array($add_new_button) ) {
|
75 |
-
foreach ( $add_new_button as $key => $val ) {
|
76 |
-
$attributes .= $key . '="' . $val . '"';
|
77 |
-
}
|
78 |
-
}
|
79 |
-
|
80 |
-
ob_start();
|
81 |
-
?><div class="wd-page-title <?php echo $title_class; ?>">
|
82 |
-
<h1 class="wp-heading-inline"><?php echo $title; ?>
|
83 |
-
<?php
|
84 |
-
if ( $title_name || $title_id || $title_value ) {
|
85 |
-
?>
|
86 |
-
<span id="fm-title-edit">
|
87 |
-
<input type="text" id="<?php echo $title_id; ?>" name="<?php echo $title_name; ?>" value="<?php echo $title_value; ?>" />
|
88 |
-
</span>
|
89 |
-
<?php
|
90 |
-
}
|
91 |
-
if ( $add_new_button ) {
|
92 |
-
?>
|
93 |
-
<a class="page-title-action" <?php echo $attributes; ?>>
|
94 |
-
<?php _e('Add New', WDS()->prefix); ?>
|
95 |
-
</a>
|
96 |
-
<?php
|
97 |
-
}
|
98 |
-
?>
|
99 |
-
</h1>
|
100 |
-
</div><?php
|
101 |
-
return ob_get_clean();
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Generate buttons.
|
106 |
-
*
|
107 |
-
* @param array $buttons
|
108 |
-
* @param bool $single
|
109 |
-
* @param array $parent
|
110 |
-
*
|
111 |
-
* @return array Buttons html.
|
112 |
-
*/
|
113 |
-
protected function buttons($buttons = array(), $single = FALSE, $parent = array()) {
|
114 |
-
ob_start();
|
115 |
-
if ( !$single ) {
|
116 |
-
$parent_id = isset($parent['id']) ? esc_attr($parent['id']) : '';
|
117 |
-
$parent_class = isset($parent['class']) ? esc_attr($parent['class']) : 'wd-buttons';
|
118 |
-
$parent_style = isset($parent['style']) ? esc_attr($parent['style']) : '';
|
119 |
-
?>
|
120 |
-
<div
|
121 |
-
<?php echo $parent_id ? 'id="' . $parent_id . '"' : ''; ?>
|
122 |
-
<?php echo $parent_class ? ' class="' . $parent_class . '"' : ''; ?>
|
123 |
-
<?php echo $parent_style ? ' style="' . $parent_style . '"' : ''; ?>
|
124 |
-
>
|
125 |
-
<?php
|
126 |
-
}
|
127 |
-
foreach ($buttons as $button) {
|
128 |
-
$title = isset($button['title']) ? esc_attr($button['title']) : '';
|
129 |
-
$value = isset($button['value']) ? esc_attr($button['value']) : '';
|
130 |
-
$name = isset($button['name']) ? esc_attr($button['name']) : '';
|
131 |
-
$id = isset($button['id']) ? esc_attr($button['id']) : '';
|
132 |
-
$class = isset($button['class']) ? esc_attr($button['class']) : '';
|
133 |
-
$style = isset($button['style']) ? esc_attr($button['style']) : '';
|
134 |
-
$onclick = isset($button['onclick']) ? esc_attr($button['onclick']) : '';
|
135 |
-
?><button type="submit"
|
136 |
-
<?php echo $value ? ' value="' . $value . '"' : ''; ?>
|
137 |
-
<?php echo $name ? ' name="' . $name . '"' : ''; ?>
|
138 |
-
<?php echo $id ? ' id="' . $id . '"' : ''; ?>
|
139 |
-
class="wd-button <?php echo $class; ?>"
|
140 |
-
<?php echo $style ? ' style="' . $style . '"' : ''; ?>
|
141 |
-
<?php echo $onclick ? ' onclick="' . $onclick . '"' : ''; ?>
|
142 |
-
><?php echo $title; ?></button><?php
|
143 |
-
}
|
144 |
-
if ( !$single ) {
|
145 |
-
?>
|
146 |
-
</div>
|
147 |
-
<?php
|
148 |
-
}
|
149 |
-
return ob_get_clean();
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Search.
|
154 |
-
*
|
155 |
-
* @param array $params
|
156 |
-
* @return string
|
157 |
-
*/
|
158 |
-
protected function search( $params = array() ) {
|
159 |
-
$search = WDW_S_Library::get('s', '');
|
160 |
-
ob_start();
|
161 |
-
?>
|
162 |
-
<p class="search-box">
|
163 |
-
<input name="s" value="<?php echo $search; ?>" type="search" onkeypress="return input_search(event, this)" />
|
164 |
-
<input class="button" value="<?php echo __('Search', WDS()->prefix) . ' ' . ( !empty( $params['search_item_name'] ) ? $params['search_item_name'] : '' ); ?>" type="button" onclick="search(this)" />
|
165 |
-
</p>
|
166 |
-
<?php
|
167 |
-
return ob_get_clean();
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Pagination.
|
172 |
-
*
|
173 |
-
* @param $page_url
|
174 |
-
* @param $total
|
175 |
-
* @param int $items_per_page
|
176 |
-
*
|
177 |
-
* @return string
|
178 |
-
*/
|
179 |
-
protected function pagination($page_url, $total, $items_per_page = 20) {
|
180 |
-
$page_number = WDW_S_Library::get('paged', 1);
|
181 |
-
$search = WDW_S_Library::get('s', '');
|
182 |
-
$orderby = WDW_S_Library::get('orderby', '');
|
183 |
-
$order = WDW_S_Library::get('order', '');
|
184 |
-
$url_arg = array();
|
185 |
-
if( !empty($search) ) {
|
186 |
-
$url_arg['s'] = $search;
|
187 |
-
}
|
188 |
-
if( !empty($orderby) ) {
|
189 |
-
$url_arg['orderby'] = $orderby;
|
190 |
-
}
|
191 |
-
if( !empty($order) ) {
|
192 |
-
$url_arg['order'] = $order;
|
193 |
-
}
|
194 |
-
$page_url = add_query_arg($url_arg, $page_url);
|
195 |
-
|
196 |
-
if ( $total ) {
|
197 |
-
if ( $total % $items_per_page ) {
|
198 |
-
$pages_count = ($total - $total % $items_per_page) / $items_per_page + 1;
|
199 |
-
}
|
200 |
-
else {
|
201 |
-
$pages_count = ($total - $total % $items_per_page) / $items_per_page;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
else {
|
205 |
-
$pages_count = 1;
|
206 |
-
}
|
207 |
-
ob_start();
|
208 |
-
?>
|
209 |
-
<div class="tablenav-pages">
|
210 |
-
<span class="displaying-num">
|
211 |
-
<?php printf(_n('%s item', '%s items', $total, WDS()->prefix), $total); ?>
|
212 |
-
</span>
|
213 |
-
<?php
|
214 |
-
if ( $total > $items_per_page ) {
|
215 |
-
?>
|
216 |
-
<span class="pagination-links" data-pages-count="<?php echo $pages_count; ?>">
|
217 |
-
<?php
|
218 |
-
if ( $page_number == 1 ) {
|
219 |
-
?>
|
220 |
-
<span class="tablenav-pages-navspan" aria-hidden="true">«</span>
|
221 |
-
<span class="tablenav-pages-navspan" aria-hidden="true">‹</span>
|
222 |
-
<?php
|
223 |
-
}
|
224 |
-
else {
|
225 |
-
?>
|
226 |
-
<a data-paged="<?php echo 1; ?>" href="<?php echo add_query_arg(array('paged' => 1), $page_url); ?>" class="wd-page first-page"><span class="screen-reader-text"><?php _e('First page', WDS()->prefix); ?></span><span aria-hidden="true">«</span></a>
|
227 |
-
<a data-paged="<?php echo ($page_number == 1 ? 1 : ($page_number - 1)); ?>" href="<?php echo add_query_arg(array('paged' => ($page_number == 1 ? 1 : ($page_number - 1))), $page_url); ?>" class="wd-page previous-page"><span class="screen-reader-text"><?php _e('Previous page', WDS()->prefix); ?></span><span aria-hidden="true">‹</span></a>
|
228 |
-
<?php
|
229 |
-
}
|
230 |
-
?>
|
231 |
-
<span class="paging-input">
|
232 |
-
<label for="current-page-selector" class="screen-reader-text"><?php _e('Current Page', WDS()->prefix); ?></label>
|
233 |
-
<input type="text" class="current-page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return input_pagination(event, this)" size="1" />
|
234 |
-
<span class="tablenav-paging-text">
|
235 |
-
<?php _e('of', WDS()->prefix); ?>
|
236 |
-
<span class="total-pages"><?php echo $pages_count; ?></span>
|
237 |
-
</span>
|
238 |
-
</span>
|
239 |
-
<?php
|
240 |
-
if ( $page_number >= $pages_count ) {
|
241 |
-
?>
|
242 |
-
<span class="tablenav-pages-navspan" aria-hidden="true">›</span>
|
243 |
-
<span class="tablenav-pages-navspan" aria-hidden="true">»</span>
|
244 |
-
<?php
|
245 |
-
}
|
246 |
-
else {
|
247 |
-
?>
|
248 |
-
<a data-paged="<?php echo ($page_number >= $pages_count ? $pages_count : ($page_number + 1)); ?>" href="<?php echo add_query_arg(array('paged' => ($page_number >= $pages_count ? $pages_count : ($page_number + 1))), $page_url); ?>" class="wd-page next-page"><span class="screen-reader-text"><?php _e('Next page', WDS()->prefix); ?></span><span aria-hidden="true">›</span></a>
|
249 |
-
<a data-paged="<?php echo $pages_count; ?>" href="<?php echo add_query_arg(array('paged' => $pages_count), $page_url); ?>" class="wd-page last-page"><span class="screen-reader-text"><?php _e('Last page', WDS()->prefix); ?></span><span aria-hidden="true">»</span></a>
|
250 |
-
<?php
|
251 |
-
}
|
252 |
-
?>
|
253 |
-
</span>
|
254 |
-
<?php
|
255 |
-
}
|
256 |
-
?>
|
257 |
-
</div>
|
258 |
-
<?php
|
259 |
-
|
260 |
-
return ob_get_clean();
|
261 |
-
}
|
262 |
-
|
263 |
-
/**
|
264 |
-
* Bulk actions list.
|
265 |
-
*
|
266 |
-
* @param $actions
|
267 |
-
* @param bool $select_all
|
268 |
-
* @param string $name
|
269 |
-
*
|
270 |
-
* @return string
|
271 |
-
*/
|
272 |
-
protected function bulk_actions($actions, $select_all = FALSE, $name = "bulk_action") {
|
273 |
-
ob_start();
|
274 |
-
?>
|
275 |
-
<div class="alignleft actions bulkactions">
|
276 |
-
<?php if ( $select_all ) { ?>
|
277 |
-
<span class="button wd-check-all" onclick="spider_check_all_items(event)">
|
278 |
-
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox(event)" />
|
279 |
-
<span><?php _e('Select All', WDS()->prefix); ?></span>
|
280 |
-
</span>
|
281 |
-
<?php } ?>
|
282 |
-
<label for="bulk-action-selector-top" class="screen-reader-text"><?php _e('Select bulk action', WDS()->prefix); ?></label>
|
283 |
-
<select name="<?php echo $name; ?>" id="bulk-action-selector-top">
|
284 |
-
<option value="-1"><?php _e('Bulk Actions', WDS()->prefix); ?></option>
|
285 |
-
<?php
|
286 |
-
foreach ( $actions as $key => $action ) {
|
287 |
-
?>
|
288 |
-
<option value="<?php echo $key; ?>"><?php echo $action['title']; ?></option>
|
289 |
-
<?php
|
290 |
-
}
|
291 |
-
?>
|
292 |
-
</select>
|
293 |
-
<input type="button" id="doaction" class="button action" onclick="wd_bulk_action('#bulk-action-selector-top')" value="<?php _e('Apply', WDS()->prefix); ?>" />
|
294 |
-
</div>
|
295 |
-
<?php
|
296 |
-
return ob_get_clean();
|
297 |
-
}
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Filters.
|
301 |
-
*
|
302 |
-
* @param array $params
|
303 |
-
* @return string
|
304 |
-
*/
|
305 |
-
protected function filters( $params = array() ) {
|
306 |
-
ob_start();
|
307 |
-
if ( !empty($params['filters']) ) {
|
308 |
-
$filters = $params['filters'];
|
309 |
-
?>
|
310 |
-
<div class="alignleft actions">
|
311 |
-
<?php
|
312 |
-
foreach ( $filters as $filter_key => $filter_values ) {
|
313 |
-
$filter_by_key = 'filter-by-' . $filter_key;
|
314 |
-
$filter_by = WDW_S_Library::get($filter_by_key, '');
|
315 |
-
?>
|
316 |
-
<label for="filter-by-<?php echo $filter_key ?>" class="screen-reader-text"><?php echo $filter_values['label']; ?></label>
|
317 |
-
<select class="wd-filter" name="filter[filter-by-<?php echo $filter_key ?>]" id="filter-by-<?php echo $filter_key ?>">
|
318 |
-
<?php
|
319 |
-
foreach ( $filter_values['items'] as $item_key => $item_value ) {
|
320 |
-
$selected = ($filter_by == $item_key ? 'selected' : '');
|
321 |
-
?>
|
322 |
-
<option <?php echo $selected; ?> value="<?php echo $item_key ?>"><?php echo $item_value ?></option>
|
323 |
-
<?php
|
324 |
-
}
|
325 |
-
?>
|
326 |
-
</select>
|
327 |
-
<?php
|
328 |
-
}
|
329 |
-
?>
|
330 |
-
</div>
|
331 |
-
<?php
|
332 |
-
}
|
333 |
-
|
334 |
-
return ob_get_clean();
|
335 |
-
}
|
336 |
-
}
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') || die('Access Denied');
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Admin view class.
|
6 |
+
*/
|
7 |
+
class AdminView_wds {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
wp_enqueue_style(WDS()->prefix . '_tables');
|
11 |
+
wp_enqueue_script(WDS()->prefix . '_admin');
|
12 |
+
}
|
13 |
+
/**
|
14 |
+
* Generate form.
|
15 |
+
*
|
16 |
+
* @param string $content
|
17 |
+
* @param array $attr
|
18 |
+
*
|
19 |
+
* @return string Form html.
|
20 |
+
*/
|
21 |
+
protected function form($content = '', $attr = array()) {
|
22 |
+
ob_start();
|
23 |
+
// Form.
|
24 |
+
$action = isset($attr['action']) ? esc_attr($attr['action']) : '';
|
25 |
+
$method = isset($attr['method']) ? esc_attr($attr['method']) : 'post';
|
26 |
+
$name = isset($attr['name']) ? esc_attr($attr['name']) : WDS()->prefix . '_form';
|
27 |
+
$id = isset($attr['id']) ? esc_attr($attr['id']) : '';
|
28 |
+
$class = isset($attr['class']) ? esc_attr($attr['class']) : WDS()->prefix . '_form';
|
29 |
+
$style = isset($attr['style']) ? esc_attr($attr['style']) : '';
|
30 |
+
$current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
|
31 |
+
$task = isset($attr['task']) ? esc_attr($attr['task']) : '';
|
32 |
+
?><div class="wrap<?php echo (isset($_GET['action']) ? ' wd-wrap-ajax' : ''); ?>">
|
33 |
+
<?php
|
34 |
+
// Generate message container by message id or directly by message.
|
35 |
+
$message_id = WDW_S_Library::get('message', 0);
|
36 |
+
$message = WDW_S_Library::get('msg', '');
|
37 |
+
echo WDW_S_Library::message_id($message_id, $message);
|
38 |
+
?>
|
39 |
+
<form
|
40 |
+
<?php echo $action ? 'action="' . $action . '"' : ''; ?>
|
41 |
+
<?php echo $method ? 'method="' . $method . '"' : ''; ?>
|
42 |
+
<?php echo $name ? ' name="' . $name . '"' : ''; ?>
|
43 |
+
<?php echo $id ? ' id="' . $id . '"' : ''; ?>
|
44 |
+
<?php echo $class ? ' class="' . $class . '"' : ''; ?>
|
45 |
+
<?php echo $style ? ' style="' . $style . '"' : ''; ?>
|
46 |
+
><h1 class="hidden"></h1><?php
|
47 |
+
echo $content;
|
48 |
+
// Add nonce to form.
|
49 |
+
wp_nonce_field(WDS()->nonce, WDS()->nonce);
|
50 |
+
?>
|
51 |
+
<input id="task" name="task" type="hidden" value="<?php echo $task; ?>"/>
|
52 |
+
<input id="current_id" name="current_id" type="hidden" value="<?php echo $current_id; ?>"/>
|
53 |
+
</form>
|
54 |
+
</div><?php
|
55 |
+
return ob_get_clean();
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Generate title.
|
60 |
+
*
|
61 |
+
* @param array $params
|
62 |
+
*
|
63 |
+
* @return string Title html.
|
64 |
+
*/
|
65 |
+
protected function title($params) {
|
66 |
+
$title = !empty($params['title']) ? $params['title'] : '';
|
67 |
+
$title_class = !empty($params['title_class']) ? $params['title_class'] : '';
|
68 |
+
$title_name = !empty($params['title_name']) ? $params['title_name'] : '';
|
69 |
+
$title_id = !empty($params['title_id']) ? $params['title_id'] : '';
|
70 |
+
$title_value = !empty($params['title_value']) ? $params['title_value'] : '';
|
71 |
+
$add_new_button = !empty($params['add_new_button']) ? $params['add_new_button'] : '';
|
72 |
+
|
73 |
+
$attributes = '';
|
74 |
+
if ( !empty($add_new_button) && is_array($add_new_button) ) {
|
75 |
+
foreach ( $add_new_button as $key => $val ) {
|
76 |
+
$attributes .= $key . '="' . $val . '"';
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
ob_start();
|
81 |
+
?><div class="wd-page-title <?php echo $title_class; ?>">
|
82 |
+
<h1 class="wp-heading-inline"><?php echo $title; ?>
|
83 |
+
<?php
|
84 |
+
if ( $title_name || $title_id || $title_value ) {
|
85 |
+
?>
|
86 |
+
<span id="fm-title-edit">
|
87 |
+
<input type="text" id="<?php echo $title_id; ?>" name="<?php echo $title_name; ?>" value="<?php echo $title_value; ?>" />
|
88 |
+
</span>
|
89 |
+
<?php
|
90 |
+
}
|
91 |
+
if ( $add_new_button ) {
|
92 |
+
?>
|
93 |
+
<a class="page-title-action" <?php echo $attributes; ?>>
|
94 |
+
<?php _e('Add New', WDS()->prefix); ?>
|
95 |
+
</a>
|
96 |
+
<?php
|
97 |
+
}
|
98 |
+
?>
|
99 |
+
</h1>
|
100 |
+
</div><?php
|
101 |
+
return ob_get_clean();
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Generate buttons.
|
106 |
+
*
|
107 |
+
* @param array $buttons
|
108 |
+
* @param bool $single
|
109 |
+
* @param array $parent
|
110 |
+
*
|
111 |
+
* @return array Buttons html.
|
112 |
+
*/
|
113 |
+
protected function buttons($buttons = array(), $single = FALSE, $parent = array()) {
|
114 |
+
ob_start();
|
115 |
+
if ( !$single ) {
|
116 |
+
$parent_id = isset($parent['id']) ? esc_attr($parent['id']) : '';
|
117 |
+
$parent_class = isset($parent['class']) ? esc_attr($parent['class']) : 'wd-buttons';
|
118 |
+
$parent_style = isset($parent['style']) ? esc_attr($parent['style']) : '';
|
119 |
+
?>
|
120 |
+
<div
|
121 |
+
<?php echo $parent_id ? 'id="' . $parent_id . '"' : ''; ?>
|
122 |
+
<?php echo $parent_class ? ' class="' . $parent_class . '"' : ''; ?>
|
123 |
+
<?php echo $parent_style ? ' style="' . $parent_style . '"' : ''; ?>
|
124 |
+
>
|
125 |
+
<?php
|
126 |
+
}
|
127 |
+
foreach ($buttons as $button) {
|
128 |
+
$title = isset($button['title']) ? esc_attr($button['title']) : '';
|
129 |
+
$value = isset($button['value']) ? esc_attr($button['value']) : '';
|
130 |
+
$name = isset($button['name']) ? esc_attr($button['name']) : '';
|
131 |
+
$id = isset($button['id']) ? esc_attr($button['id']) : '';
|
132 |
+
$class = isset($button['class']) ? esc_attr($button['class']) : '';
|
133 |
+
$style = isset($button['style']) ? esc_attr($button['style']) : '';
|
134 |
+
$onclick = isset($button['onclick']) ? esc_attr($button['onclick']) : '';
|
135 |
+
?><button type="submit"
|
136 |
+
<?php echo $value ? ' value="' . $value . '"' : ''; ?>
|
137 |
+
<?php echo $name ? ' name="' . $name . '"' : ''; ?>
|
138 |
+
<?php echo $id ? ' id="' . $id . '"' : ''; ?>
|
139 |
+
class="wd-button <?php echo $class; ?>"
|
140 |
+
<?php echo $style ? ' style="' . $style . '"' : ''; ?>
|
141 |
+
<?php echo $onclick ? ' onclick="' . $onclick . '"' : ''; ?>
|
142 |
+
><?php echo $title; ?></button><?php
|
143 |
+
}
|
144 |
+
if ( !$single ) {
|
145 |
+
?>
|
146 |
+
</div>
|
147 |
+
<?php
|
148 |
+
}
|
149 |
+
return ob_get_clean();
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Search.
|
154 |
+
*
|
155 |
+
* @param array $params
|
156 |
+
* @return string
|
157 |
+
*/
|
158 |
+
protected function search( $params = array() ) {
|
159 |
+
$search = WDW_S_Library::get('s', '');
|
160 |
+
ob_start();
|
161 |
+
?>
|
162 |
+
<p class="search-box">
|
163 |
+
<input name="s" value="<?php echo $search; ?>" type="search" onkeypress="return input_search(event, this)" />
|
164 |
+
<input class="button" value="<?php echo __('Search', WDS()->prefix) . ' ' . ( !empty( $params['search_item_name'] ) ? $params['search_item_name'] : '' ); ?>" type="button" onclick="search(this)" />
|
165 |
+
</p>
|
166 |
+
<?php
|
167 |
+
return ob_get_clean();
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Pagination.
|
172 |
+
*
|
173 |
+
* @param $page_url
|
174 |
+
* @param $total
|
175 |
+
* @param int $items_per_page
|
176 |
+
*
|
177 |
+
* @return string
|
178 |
+
*/
|
179 |
+
protected function pagination($page_url, $total, $items_per_page = 20) {
|
180 |
+
$page_number = WDW_S_Library::get('paged', 1);
|
181 |
+
$search = WDW_S_Library::get('s', '');
|
182 |
+
$orderby = WDW_S_Library::get('orderby', '');
|
183 |
+
$order = WDW_S_Library::get('order', '');
|
184 |
+
$url_arg = array();
|
185 |
+
if( !empty($search) ) {
|
186 |
+
$url_arg['s'] = $search;
|
187 |
+
}
|
188 |
+
if( !empty($orderby) ) {
|
189 |
+
$url_arg['orderby'] = $orderby;
|
190 |
+
}
|
191 |
+
if( !empty($order) ) {
|
192 |
+
$url_arg['order'] = $order;
|
193 |
+
}
|
194 |
+
$page_url = add_query_arg($url_arg, $page_url);
|
195 |
+
|
196 |
+
if ( $total ) {
|
197 |
+
if ( $total % $items_per_page ) {
|
198 |
+
$pages_count = ($total - $total % $items_per_page) / $items_per_page + 1;
|
199 |
+
}
|
200 |
+
else {
|
201 |
+
$pages_count = ($total - $total % $items_per_page) / $items_per_page;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
else {
|
205 |
+
$pages_count = 1;
|
206 |
+
}
|
207 |
+
ob_start();
|
208 |
+
?>
|
209 |
+
<div class="tablenav-pages">
|
210 |
+
<span class="displaying-num">
|
211 |
+
<?php printf(_n('%s item', '%s items', $total, WDS()->prefix), $total); ?>
|
212 |
+
</span>
|
213 |
+
<?php
|
214 |
+
if ( $total > $items_per_page ) {
|
215 |
+
?>
|
216 |
+
<span class="pagination-links" data-pages-count="<?php echo $pages_count; ?>">
|
217 |
+
<?php
|
218 |
+
if ( $page_number == 1 ) {
|
219 |
+
?>
|
220 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">«</span>
|
221 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">‹</span>
|
222 |
+
<?php
|
223 |
+
}
|
224 |
+
else {
|
225 |
+
?>
|
226 |
+
<a data-paged="<?php echo 1; ?>" href="<?php echo add_query_arg(array('paged' => 1), $page_url); ?>" class="wd-page first-page"><span class="screen-reader-text"><?php _e('First page', WDS()->prefix); ?></span><span aria-hidden="true">«</span></a>
|
227 |
+
<a data-paged="<?php echo ($page_number == 1 ? 1 : ($page_number - 1)); ?>" href="<?php echo add_query_arg(array('paged' => ($page_number == 1 ? 1 : ($page_number - 1))), $page_url); ?>" class="wd-page previous-page"><span class="screen-reader-text"><?php _e('Previous page', WDS()->prefix); ?></span><span aria-hidden="true">‹</span></a>
|
228 |
+
<?php
|
229 |
+
}
|
230 |
+
?>
|
231 |
+
<span class="paging-input">
|
232 |
+
<label for="current-page-selector" class="screen-reader-text"><?php _e('Current Page', WDS()->prefix); ?></label>
|
233 |
+
<input type="text" class="current-page" name="current_page" value="<?php echo $page_number; ?>" onkeypress="return input_pagination(event, this)" size="1" />
|
234 |
+
<span class="tablenav-paging-text">
|
235 |
+
<?php _e('of', WDS()->prefix); ?>
|
236 |
+
<span class="total-pages"><?php echo $pages_count; ?></span>
|
237 |
+
</span>
|
238 |
+
</span>
|
239 |
+
<?php
|
240 |
+
if ( $page_number >= $pages_count ) {
|
241 |
+
?>
|
242 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">›</span>
|
243 |
+
<span class="tablenav-pages-navspan" aria-hidden="true">»</span>
|
244 |
+
<?php
|
245 |
+
}
|
246 |
+
else {
|
247 |
+
?>
|
248 |
+
<a data-paged="<?php echo ($page_number >= $pages_count ? $pages_count : ($page_number + 1)); ?>" href="<?php echo add_query_arg(array('paged' => ($page_number >= $pages_count ? $pages_count : ($page_number + 1))), $page_url); ?>" class="wd-page next-page"><span class="screen-reader-text"><?php _e('Next page', WDS()->prefix); ?></span><span aria-hidden="true">›</span></a>
|
249 |
+
<a data-paged="<?php echo $pages_count; ?>" href="<?php echo add_query_arg(array('paged' => $pages_count), $page_url); ?>" class="wd-page last-page"><span class="screen-reader-text"><?php _e('Last page', WDS()->prefix); ?></span><span aria-hidden="true">»</span></a>
|
250 |
+
<?php
|
251 |
+
}
|
252 |
+
?>
|
253 |
+
</span>
|
254 |
+
<?php
|
255 |
+
}
|
256 |
+
?>
|
257 |
+
</div>
|
258 |
+
<?php
|
259 |
+
|
260 |
+
return ob_get_clean();
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Bulk actions list.
|
265 |
+
*
|
266 |
+
* @param $actions
|
267 |
+
* @param bool $select_all
|
268 |
+
* @param string $name
|
269 |
+
*
|
270 |
+
* @return string
|
271 |
+
*/
|
272 |
+
protected function bulk_actions($actions, $select_all = FALSE, $name = "bulk_action") {
|
273 |
+
ob_start();
|
274 |
+
?>
|
275 |
+
<div class="alignleft actions bulkactions">
|
276 |
+
<?php if ( $select_all ) { ?>
|
277 |
+
<span class="button wd-check-all" onclick="spider_check_all_items(event)">
|
278 |
+
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox(event)" />
|
279 |
+
<span><?php _e('Select All', WDS()->prefix); ?></span>
|
280 |
+
</span>
|
281 |
+
<?php } ?>
|
282 |
+
<label for="bulk-action-selector-top" class="screen-reader-text"><?php _e('Select bulk action', WDS()->prefix); ?></label>
|
283 |
+
<select name="<?php echo $name; ?>" id="bulk-action-selector-top">
|
284 |
+
<option value="-1"><?php _e('Bulk Actions', WDS()->prefix); ?></option>
|
285 |
+
<?php
|
286 |
+
foreach ( $actions as $key => $action ) {
|
287 |
+
?>
|
288 |
+
<option value="<?php echo $key; ?>"><?php echo $action['title']; ?></option>
|
289 |
+
<?php
|
290 |
+
}
|
291 |
+
?>
|
292 |
+
</select>
|
293 |
+
<input type="button" id="doaction" class="button action" onclick="wd_bulk_action('#bulk-action-selector-top')" value="<?php _e('Apply', WDS()->prefix); ?>" />
|
294 |
+
</div>
|
295 |
+
<?php
|
296 |
+
return ob_get_clean();
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Filters.
|
301 |
+
*
|
302 |
+
* @param array $params
|
303 |
+
* @return string
|
304 |
+
*/
|
305 |
+
protected function filters( $params = array() ) {
|
306 |
+
ob_start();
|
307 |
+
if ( !empty($params['filters']) ) {
|
308 |
+
$filters = $params['filters'];
|
309 |
+
?>
|
310 |
+
<div class="alignleft actions">
|
311 |
+
<?php
|
312 |
+
foreach ( $filters as $filter_key => $filter_values ) {
|
313 |
+
$filter_by_key = 'filter-by-' . $filter_key;
|
314 |
+
$filter_by = WDW_S_Library::get($filter_by_key, '');
|
315 |
+
?>
|
316 |
+
<label for="filter-by-<?php echo $filter_key ?>" class="screen-reader-text"><?php echo $filter_values['label']; ?></label>
|
317 |
+
<select class="wd-filter" name="filter[filter-by-<?php echo $filter_key ?>]" id="filter-by-<?php echo $filter_key ?>">
|
318 |
+
<?php
|
319 |
+
foreach ( $filter_values['items'] as $item_key => $item_value ) {
|
320 |
+
$selected = ($filter_by == $item_key ? 'selected' : '');
|
321 |
+
?>
|
322 |
+
<option <?php echo $selected; ?> value="<?php echo $item_key ?>"><?php echo $item_value ?></option>
|
323 |
+
<?php
|
324 |
+
}
|
325 |
+
?>
|
326 |
+
</select>
|
327 |
+
<?php
|
328 |
+
}
|
329 |
+
?>
|
330 |
+
</div>
|
331 |
+
<?php
|
332 |
+
}
|
333 |
+
|
334 |
+
return ob_get_clean();
|
335 |
+
}
|
336 |
+
}
|
admin/views/Sliders.php
CHANGED
@@ -1,4191 +1,4191 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class SlidersView_wds
|
5 |
-
*/
|
6 |
-
class SlidersView_wds extends AdminView_wds {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Display.
|
10 |
-
*
|
11 |
-
* @param array $params
|
12 |
-
*/
|
13 |
-
public function display( $params = array() ) {
|
14 |
-
ob_start();
|
15 |
-
echo $this->body($params);
|
16 |
-
$form_attr = array(
|
17 |
-
'id' => WDS()->prefix . '_sliders_form',
|
18 |
-
'name' => WDS()->prefix . '_sliders',
|
19 |
-
'class' => WDS()->prefix . '_sliders wd-form',
|
20 |
-
'action' => add_query_arg(array( 'page' => 'sliders_' . WDS()->prefix ), 'admin.php'),
|
21 |
-
);
|
22 |
-
echo $this->form(ob_get_clean(), $form_attr);
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Body.
|
27 |
-
*
|
28 |
-
* @param array $params
|
29 |
-
*/
|
30 |
-
public function body( $params = array() ) {
|
31 |
-
echo $this->title(array(
|
32 |
-
'title' => $params['page_title'],
|
33 |
-
'title_class' => 'wd-header',
|
34 |
-
'add_new_button' => array(
|
35 |
-
'href' => add_query_arg( array(
|
36 |
-
'page' => $params['page'],
|
37 |
-
'task' => 'edit',
|
38 |
-
), admin_url('admin.php')),
|
39 |
-
),
|
40 |
-
));
|
41 |
-
echo $this->search();
|
42 |
-
?>
|
43 |
-
<div class="tablenav top">
|
44 |
-
<?php
|
45 |
-
echo $this->bulk_actions($params['actions'], TRUE);
|
46 |
-
echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']);
|
47 |
-
?>
|
48 |
-
</div>
|
49 |
-
<table class="adminlist table table-striped wp-list-table widefat fixed pages media">
|
50 |
-
<thead>
|
51 |
-
<td id="cb" class="column-cb check-column">
|
52 |
-
<label class="screen-reader-text" for="cb-select-all-1"><?php _e('Title', WDS()->prefix); ?></label>
|
53 |
-
<input id="check_all" type="checkbox">
|
54 |
-
</td>
|
55 |
-
<?php echo WDW_S_Library::ordering('name', $params['orderby'], $params['order'], __('Title', WDS()->prefix), $params['page_url'], 'column-primary'); ?>
|
56 |
-
<th class="col-slides-count"><?php _e('Slides count', WDS()->prefix); ?></th>
|
57 |
-
<th class="col-shortcode"><?php _e('Shortcode', WDS()->prefix); ?></th>
|
58 |
-
<th class="col-function"><?php _e('PHP function', WDS()->prefix); ?></th>
|
59 |
-
</thead>
|
60 |
-
<tbody>
|
61 |
-
<?php
|
62 |
-
if ( $params['rows'] ) {
|
63 |
-
foreach ( $params['rows'] as $row ) {
|
64 |
-
$alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
|
65 |
-
$edit_url = add_query_arg(array(
|
66 |
-
'page' => $params['page'],
|
67 |
-
'task' => 'edit',
|
68 |
-
'current_id' => $row->id,
|
69 |
-
), admin_url('admin.php'));
|
70 |
-
$publish_url = add_query_arg(array(
|
71 |
-
'task' => ($row->published ? 'unpublish' : 'publish'),
|
72 |
-
'current_id' => $row->id,
|
73 |
-
), $params['page_url']);
|
74 |
-
$delete_url = add_query_arg( array(
|
75 |
-
'task' => 'delete',
|
76 |
-
'current_id' => $row->id
|
77 |
-
), $params['page_url']
|
78 |
-
);
|
79 |
-
|
80 |
-
$preview_url = add_query_arg( array(
|
81 |
-
'slider_id' => $row->id
|
82 |
-
), $params['preview_url']
|
83 |
-
);
|
84 |
-
$images_count = !empty($params['slides_info'][$row->id]['count']) ? $params['slides_info'][$row->id]['count'] : 0;
|
85 |
-
$preview_image = !empty($params['slides_info'][$row->id]['preview_thumb']) ? $params['slides_info'][$row->id]['preview_thumb'] : WDS()->plugin_url . '/images/no-image.png';
|
86 |
-
?>
|
87 |
-
<tr id="tr_<?php echo $row->id; ?>" <?php echo $alternate; ?>>
|
88 |
-
<th class="check-column">
|
89 |
-
<input type="checkbox" id="check_<?php echo $row->id; ?>" name="check[<?php echo $row->id; ?>]" onclick="spider_check_all(this)" />
|
90 |
-
</th>
|
91 |
-
<td class="column-primary column-title" data-colname="<?php _e('Title', WDS()->prefix); ?>">
|
92 |
-
<strong class="has-media-icon">
|
93 |
-
<a href="<?php echo $edit_url; ?>">
|
94 |
-
<span class="media-icon image-icon">
|
95 |
-
<img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
|
96 |
-
</span>
|
97 |
-
<?php echo $row->name; ?>
|
98 |
-
</a>
|
99 |
-
<?php if ( !$row->published ) { ?>
|
100 |
-
— <span class="post-state"><?php _e('Unpublished', WDS()->prefix); ?></span>
|
101 |
-
<?php } ?>
|
102 |
-
</strong>
|
103 |
-
<div class="row-actions">
|
104 |
-
<span><a href="<?php echo $edit_url; ?>"><?php _e('Edit', WDS()->prefix); ?></a> |</span>
|
105 |
-
<span><a href="<?php echo $publish_url; ?>"><?php echo($row->published ? __('Unpublish', WDS()->prefix) : __('Publish', WDS()->prefix)); ?></a> |</span>
|
106 |
-
<span class="trash"><a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDS()->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', WDS()->prefix); ?></a> |</span>
|
107 |
-
<span><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e('Preview', WDS()->prefix); ?></a></span>
|
108 |
-
</div>
|
109 |
-
<button class="toggle-row" type="button">
|
110 |
-
<span class="screen-reader-text"><?php _e('Show more details', WDS()->prefix); ?></span>
|
111 |
-
</button>
|
112 |
-
</td>
|
113 |
-
<td data-colname="<?php _e('Slides count', WDS()->prefix); ?>"><?php echo $images_count; ?></td>
|
114 |
-
<td data-colname="<?php _e('Shortcode', WDS()->prefix); ?>">
|
115 |
-
<input type="text" value='[wds id="<?php echo $row->id; ?>"]' onclick="spider_select_value(this)" size="11" readonly="readonly" />
|
116 |
-
</td>
|
117 |
-
<td data-colname="<?php _e('PHP function', WDS()->prefix); ?>">
|
118 |
-
<input type="text" value="<?php if( function_exists('wd_slider') ) { wd_slider(<?php echo $row->id; ?>); } ?>" onclick="spider_select_value(this)" size="17" readonly="readonly" />
|
119 |
-
</td>
|
120 |
-
</tr>
|
121 |
-
<?php
|
122 |
-
}
|
123 |
-
}
|
124 |
-
else {
|
125 |
-
echo WDW_S_Library::no_items('sliders', 5);
|
126 |
-
}
|
127 |
-
?>
|
128 |
-
</tbody>
|
129 |
-
</table>
|
130 |
-
<div class="tablenav bottom">
|
131 |
-
<?php echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']); ?>
|
132 |
-
</div>
|
133 |
-
<?php if ( !empty($params['rows']) ) { ?>
|
134 |
-
<div class="wds_opacity_merge" onclick="jQuery('.wds_opacity_merge').hide();jQuery('.wds_merge').hide();"></div>
|
135 |
-
<div class="wds_merge">
|
136 |
-
<select class="select_icon select_icon_320" style="width:200px" name="select_slider_merge" id="select_slider_merge" style="margin-bottom: 6px;">
|
137 |
-
<option><?php _e('-select-', WDS()->prefix); ?></option>
|
138 |
-
<?php foreach ( $params['rows'] as $row ) { ?>
|
139 |
-
<option value="<?php echo $row->id; ?>"><?php echo $row->name; ?></option>
|
140 |
-
<?php } ?>
|
141 |
-
</select>
|
142 |
-
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'merge');" value="<?php _e('Merge', WDS()->prefix); ?>" />
|
143 |
-
<input type="button" class="button-secondary" onclick="jQuery('.wds_merge').hide();jQuery('.wds_opacity_merge').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
144 |
-
<p class="description"><?php _e('Select slider to use settings from.', WDS()->prefix); ?></p>
|
145 |
-
</div>
|
146 |
-
<?php } ?>
|
147 |
-
<div class="wds_opacity_export" onclick="jQuery('.wds_opacity_export').hide();jQuery('.wds_exports').hide();"></div>
|
148 |
-
<div class="wds_exports">
|
149 |
-
<input type="checkbox" name="imagesexport" id="imagesexport" checked="checked" />
|
150 |
-
<label for="imagesexport"><?php _e('Check the box to export the images included within sliders', WDS()->prefix); ?></label>
|
151 |
-
<a class="button-secondary wds_export" type="button" href="<?php echo add_query_arg(array('action' => 'WDSExport'), admin_url('admin-ajax.php')); ?>" onclick="wds_get_checked()"><?php _e('Export', WDS()->prefix); ?></a>
|
152 |
-
<input type="button" class="button-secondary" onclick="jQuery('.wds_exports').hide();jQuery('.wds_opacity_export').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
153 |
-
</div>
|
154 |
-
<?php
|
155 |
-
global $wp_version;
|
156 |
-
if (version_compare($wp_version, '4','<')) {
|
157 |
-
?>
|
158 |
-
<style>
|
159 |
-
#wpwrap {
|
160 |
-
background-color: #F1F1F1;
|
161 |
-
}
|
162 |
-
@media screen and (max-width: 640px) {
|
163 |
-
.buttons_div input {
|
164 |
-
width: 31%;
|
165 |
-
font-size: 10px;
|
166 |
-
}
|
167 |
-
.tablenav{
|
168 |
-
height:auto
|
169 |
-
}
|
170 |
-
#wpcontent {
|
171 |
-
margin-left: 40px !important
|
172 |
-
}
|
173 |
-
.alignleft {
|
174 |
-
display:none;
|
175 |
-
}
|
176 |
-
}
|
177 |
-
</style>
|
178 |
-
<?php
|
179 |
-
}
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Edit.
|
184 |
-
*
|
185 |
-
* @param array $params
|
186 |
-
*/
|
187 |
-
public function edit( $params = array() ) {
|
188 |
-
$id = $params['id'];
|
189 |
-
$row = $params['row'];
|
190 |
-
$slides_row = $params['slides_row'];
|
191 |
-
$layers_row = $params['layers_row'];
|
192 |
-
$global_options = $params['global_options'];
|
193 |
-
$options_values = $params['options_values'];
|
194 |
-
$slider_preview_link = $params['slider_preview_link'];
|
195 |
-
$spider_uploader = isset($global_options->spider_uploader) ? $global_options->spider_uploader : 0;
|
196 |
-
$page_title = $params['page_title'];
|
197 |
-
$save_btn_name = $params['save_btn_name'];
|
198 |
-
$sub_tab_type = $params['sub_tab_type'];
|
199 |
-
// Get options values.
|
200 |
-
$aligns = $options_values['aligns'];
|
201 |
-
$border_styles = $options_values['border_styles'];
|
202 |
-
$button_styles = $options_values['button_styles'];
|
203 |
-
$bull_styles = $options_values['bull_styles'];
|
204 |
-
$font_families = $options_values['font_families'];
|
205 |
-
$google_fonts = $options_values['google_fonts'];
|
206 |
-
$font_weights = $options_values['font_weights'];
|
207 |
-
$social_buttons = $options_values['social_buttons'];
|
208 |
-
$effects = $options_values['effects'];
|
209 |
-
$layer_effects_in = $options_values['layer_effects_in'];
|
210 |
-
$layer_effects_out = $options_values['layer_effects_out'];
|
211 |
-
$hotp_text_positions = $options_values['hotp_text_positions'];
|
212 |
-
$slider_callbacks = $options_values['slider_callbacks'];
|
213 |
-
$layer_callbacks = $options_values['layer_callbacks'];
|
214 |
-
$text_alignments = $options_values['text_alignments'];
|
215 |
-
$built_in_watermark_fonts = $options_values['built_in_watermark_fonts'];
|
216 |
-
$slider_fillmode_option = $options_values['slider_fillmode_option'];
|
217 |
-
$free_effects = array('none', 'fade', 'sliceH', 'fan', 'scaleIn');
|
218 |
-
$fv = (WDS()->is_free && get_option("wds_theme_version") ? TRUE : FALSE);
|
219 |
-
|
220 |
-
$query_url = add_query_arg(array('action' => 'addImage', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif'), admin_url('admin-ajax.php'));
|
221 |
-
$query_url = wp_nonce_url($query_url, 'addImage', WDS()->nonce);
|
222 |
-
$slide_ids_string = '';
|
223 |
-
?>
|
224 |
-
<div class="spider_message_cont"></div>
|
225 |
-
<div class="spider_load">
|
226 |
-
<div class="spider_load_cont"></div>
|
227 |
-
<div class="spider_load_icon"><img class="spider_ajax_loading" src="<?php echo WDS()->plugin_url . '/images/ajax_loader_back.gif'; ?>"></div>
|
228 |
-
</div>
|
229 |
-
<form class="wrap wds_form wds-check-change_form js" method="post" id="sliders_form" action="admin.php?page=sliders_wds">
|
230 |
-
<h1 class="hidden"></h1>
|
231 |
-
<?php wp_nonce_field(WDS()->nonce, WDS()->nonce); ?>
|
232 |
-
<span class="slider-icon"></span>
|
233 |
-
<h2 class="wds_default"><?php echo $page_title; ?></h2>
|
234 |
-
<div class="buttons_conteiner">
|
235 |
-
<h1 class="wp-heading-inline"><?php _e('Slider Title', WDS()->prefix); ?></h1>
|
236 |
-
<input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="20" class="wds_requried" data-name="<?php _e('Slider title', WDS()->prefix); ?>" />
|
237 |
-
<div class="wds_buttons">
|
238 |
-
<button class="button button-primary button-large" onclick="spider_set_input_value('task', 'apply'); if(!wds_spider_ajax_save('sliders_form', event)) return false;">
|
239 |
-
<?php echo $save_btn_name; ?>
|
240 |
-
</button>
|
241 |
-
<button class="button button-large" <?php echo ($id == 0) ? 'disabled="disabled"' : 'onclick="window.open(\''. add_query_arg( array('slider_id' => $id), $slider_preview_link ) .'\', \'_blank\'); return false;"'; ?>><?php _e('Preview', WDS()->prefix); ?></button>
|
242 |
-
<button class="button button-secondary button-large wd-hidden reset-all-settings" onclick="wds_reset(event); return false;"><?php _e('Reset all settings', WDS()->prefix); ?></button>
|
243 |
-
</div>
|
244 |
-
</div>
|
245 |
-
<div>
|
246 |
-
<div class="tab_conteiner">
|
247 |
-
<div class="tab_button_wrap slides_tab_button_wrap" onclick="wds_change_tab(this, 'wds_slides_box')" >
|
248 |
-
<a class="wds_button-secondary wds_slides" href="#">
|
249 |
-
<span tab_type="slides" class="wds_tab_label"><span class="dashicons dashicons-format-gallery"></span><?php _e('Slides', WDS()->prefix); ?></span>
|
250 |
-
</a>
|
251 |
-
</div>
|
252 |
-
<div class="tab_button_wrap settings_tab_button_wrap" onclick="wds_change_tab(this, 'wds_settings_box')">
|
253 |
-
<a class="wds_button-secondary wds_settings" href="#">
|
254 |
-
<span tab_type="settings" class="wds_tab_label"><span class="dashicons dashicons-admin-generic"></span><?php _e('Settings', WDS()->prefix); ?></span>
|
255 |
-
</a>
|
256 |
-
</div>
|
257 |
-
<div class="tab_button_wrap howto_tab_button_wrap <?php echo (!$row->id) ? 'hide' : ''; ?>" onclick="wds_change_tab(this, 'wds_howto_box')">
|
258 |
-
<a class="wds_button-secondary wds_howto" href="#">
|
259 |
-
<span tab_type="howto" class="wds_tab_label"><span class="dashicons dashicons-editor-help"></span><?php _e('How to use', WDS()->prefix); ?></span>
|
260 |
-
</a>
|
261 |
-
</div>
|
262 |
-
</div>
|
263 |
-
<!--------------Settings tab----------->
|
264 |
-
<div class="wds_box wds_settings_box">
|
265 |
-
<div class="clear"></div>
|
266 |
-
<div class="wds_nav_tabs">
|
267 |
-
<div class="wds_menu_icon" onclick="jQuery('.wds_nav_tabs ul').slideToggle(500);"></div>
|
268 |
-
<ul>
|
269 |
-
<li tab_type="global" onclick="wds_change_nav(this, 'wds_nav_global_box')">
|
270 |
-
<a href="#"><?php _e('Global', WDS()->prefix); ?></a>
|
271 |
-
</li>
|
272 |
-
<li tab_type="carousel" onclick="wds_change_nav(this, 'wds_nav_carousel_box')">
|
273 |
-
<a href="#"><?php _e('Carousel', WDS()->prefix); ?></a>
|
274 |
-
</li>
|
275 |
-
<li tab_type="navigation" onclick="wds_change_nav(this, 'wds_nav_navigation_box')" >
|
276 |
-
<a href="#"><?php _e('Navigation', WDS()->prefix); ?></a>
|
277 |
-
</li>
|
278 |
-
<li tab_type="bullets" onclick="wds_change_nav(this, 'wds_nav_bullets_box')" >
|
279 |
-
<a href="#"><?php _e('Bullets', WDS()->prefix); ?></a>
|
280 |
-
</li>
|
281 |
-
<li tab_type="filmstrip" onclick="wds_change_nav(this, 'wds_nav_filmstrip_box')" >
|
282 |
-
<a href="#"><?php _e('Filmstrip', WDS()->prefix); ?></a>
|
283 |
-
</li>
|
284 |
-
<li tab_type="timer_bar" onclick="wds_change_nav(this, 'wds_nav_timer_bar_box')" >
|
285 |
-
<a href="#"><?php _e('Timer bar', WDS()->prefix); ?></a>
|
286 |
-
</li>
|
287 |
-
<li tab_type="watermark" onclick="wds_change_nav(this, 'wds_nav_watermark_box')" >
|
288 |
-
<a href="#"><?php _e('Watermark', WDS()->prefix); ?></a>
|
289 |
-
</li>
|
290 |
-
<li tab_type="css" onclick="wds_change_nav(this, 'wds_nav_css_box')" >
|
291 |
-
<a href="#"><?php _e('CSS', WDS()->prefix); ?></a>
|
292 |
-
</li>
|
293 |
-
<li tab_type="callbacks" onclick="wds_change_nav(this, 'wds_nav_callbacks_box')" >
|
294 |
-
<a href="#"><?php _e('Slider Callbacks', WDS()->prefix); ?></a>
|
295 |
-
</li>
|
296 |
-
</ul>
|
297 |
-
</div>
|
298 |
-
<div>
|
299 |
-
<div class="wds_nav_box wds_nav_global_box">
|
300 |
-
<div class="wd-table">
|
301 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
302 |
-
<div class="wd-box-section">
|
303 |
-
<div class="wd-box-content">
|
304 |
-
<span class="wd-group">
|
305 |
-
<input type="radio" onclick="hide_dimmension_ratio()" id="full_width2" name="full_width" <?php echo (($row->full_width == '2' || $row->full_width == '') ? 'checked="checked"' : ''); ?> value="2" />
|
306 |
-
<label <?php echo (($row->full_width == 2) ? 'class="selected_color"' : ''); ?> for="full_width2"><?php _e('Boxed layout', WDS()->prefix); ?></label>
|
307 |
-
<input type="radio" onclick="hide_dimmension_ratio()" id="full_width1" name="full_width" <?php echo (($row->full_width == '1') ? 'checked="checked"' : ''); ?> value="1" />
|
308 |
-
<label <?php echo ($row->full_width == 1) ? 'class="selected_color"' : ''; ?> for="full_width1"><?php _e('Full width', WDS()->prefix); ?></label>
|
309 |
-
<input type="radio" onclick="hide_dimmension_ratio()" id="full_width0" name="full_width" <?php echo (($row->full_width == '0') ? 'checked="checked"' : ''); ?> value="0" />
|
310 |
-
<label <?php echo ($row->full_width == 0) ? 'class="selected_color"' : ''; ?> for="full_width0"><?php _e('Custom', WDS()->prefix); ?></label>
|
311 |
-
<p class="description full_width_desc" id="full_width2_desc"><?php _e('With Boxed layout, the slideshow will take the 100% width of its parent container.', WDS()->prefix); ?></p>
|
312 |
-
<p class="description full_width_desc" id="full_width1_desc"><?php _e('The slider will take the full width of the page. Height will be applied based on the ratio of dimensions or auto height option.', WDS()->prefix); ?></p>
|
313 |
-
<p class="description full_width_desc" id="full_width0_desc"><?php _e('This option lets you specify custom dimensions for your slider.', WDS()->prefix); ?></p>
|
314 |
-
</span>
|
315 |
-
<span class="wd-group" id="auto_height">
|
316 |
-
<label class="wd-label"><?php _e('Auto height', WDS()->prefix); ?></label>
|
317 |
-
<input type="radio" onclick="hide_dimmension_ratio()" id="auto_height1" name="auto_height" <?php echo (($row->auto_height) ? 'checked="checked"' : ''); ?> value="1" />
|
318 |
-
<label <?php echo (($row->auto_height) ? 'class="selected_color"' : ''); ?> for="auto_height1"><?php _e('Yes', WDS()->prefix); ?></label>
|
319 |
-
<input type="radio" onclick="hide_dimmension_ratio()" id="auto_height0" name="auto_height" <?php echo (($row->auto_height) ? '' : 'checked="checked"'); ?> value="0" />
|
320 |
-
<label <?php echo ($row->auto_height) ? '' : 'class="selected_color"'; ?> for="auto_height0"><?php _e('No', WDS()->prefix); ?></label>
|
321 |
-
<p class="description"><?php _e('The slider will take the full height of the screen.', WDS()->prefix); ?></p>
|
322 |
-
</span>
|
323 |
-
<span class="wd-group" id="dimensions">
|
324 |
-
<label class="wd-label"><?php _e('Dimensions', WDS()->prefix); ?></label>
|
325 |
-
<input type="text" name="width" id="width" value="<?php echo $row->width; ?>" class="spider_int_input" onchange="wds_whr('width')" onkeypress="return spider_check_isnum(event)" /> x
|
326 |
-
<input type="text" name="height" id="height" value="<?php echo $row->height; ?>" class="spider_int_input" onchange="wds_whr('height')" onkeypress="return spider_check_isnum(event)" /> px
|
327 |
-
<input type="text" name="ratio" id="ratio" value="" class="spider_int_input" onchange="wds_whr('ratio')" onkeypress="return spider_check_isnum(event)" title = "<?php _e('The slider height will be applied based on the ratio of dimensions.', WDS()->prefix); ?>"/><?php _e(' ratio', WDS()->prefix); ?>
|
328 |
-
<p class="description"><?php _e('Maximum width and height for slider.', WDS()->prefix); ?></p>
|
329 |
-
</span>
|
330 |
-
<span class="wd-group">
|
331 |
-
<label class="wd-label" for="effect"><?php _e('Effect', WDS()->prefix); ?></label>
|
332 |
-
<select class="select_icon select_icon_320" name="effect" id="effect">
|
333 |
-
<?php
|
334 |
-
foreach ($effects as $key => $effect) {
|
335 |
-
?>
|
336 |
-
<option value="<?php echo $key; ?>" <?php echo (WDS()->is_free && !in_array($key, $free_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> <?php if ($row->effect == $key) echo 'selected="selected"'; ?>><?php echo $effect; ?></option>
|
337 |
-
<?php
|
338 |
-
}
|
339 |
-
?>
|
340 |
-
</select>
|
341 |
-
<p class="description"><?php _e('Select the effect which will be applied when navigating through slides.', WDS()->prefix); ?></p>
|
342 |
-
</span>
|
343 |
-
<span class="wd-group">
|
344 |
-
<label class="wd-label" for="effect_duration"><?php _e('Еffect duration', WDS()->prefix); ?></label>
|
345 |
-
<input type="text" id="effect_duration" name="effect_duration" value="<?php echo $row->effect_duration; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> ms
|
346 |
-
<p class="description"><?php _e('Set the duration for the effect.', WDS()->prefix); ?></p>
|
347 |
-
</span>
|
348 |
-
<span class="wd-group">
|
349 |
-
<label class="wd-label" for="hide_on_mobile"><?php _e('Hide on small screens', WDS()->prefix); ?></label>
|
350 |
-
<input type="text" id="hide_on_mobile" name="hide_on_mobile" value="<?php echo $row->hide_on_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
351 |
-
<p class="description"><?php _e('Hide slider when screen size is smaller than this value.', WDS()->prefix); ?></p>
|
352 |
-
</span>
|
353 |
-
<span class="wd-group">
|
354 |
-
<label class="wd-label" for="full_width_for_mobile"><?php _e('Full width on small screens', WDS()->prefix); ?></label>
|
355 |
-
<input type="text" id="full_width_for_mobile" name="full_width_for_mobile" value="<?php echo $row->full_width_for_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
356 |
-
<p class="description"><?php _e('The slider will have full width when screen size is smaller than this value.', WDS()->prefix); ?></p>
|
357 |
-
</span>
|
358 |
-
<span class="wd-group" id="tr_smart_crop">
|
359 |
-
<label class="wd-label"><?php _e('Smart Crop', WDS()->prefix); ?></label>
|
360 |
-
<input onClick="wds_enable_disable('', 'tr_crop_pos', 'smart_crop1')" type="radio" id="smart_crop1" name="smart_crop" <?php echo (($row->smart_crop) ? 'checked="checked"' : ''); ?> value="1" />
|
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>
|
368 |
-
<table class="wds_position_table">
|
369 |
-
<tbody>
|
370 |
-
<tr>
|
371 |
-
<td class="wds_position_td"><input type="radio" value="left top" name="crop_image_position" <?php if ($row->crop_image_position == "left top") echo 'checked="checked"'; ?> ></td>
|
372 |
-
<td class="wds_position_td"><input type="radio" value="center top" name="crop_image_position" <?php if ($row->crop_image_position == "center top") echo 'checked="checked"'; ?> ></td>
|
373 |
-
<td class="wds_position_td"><input type="radio" value="right top" name="crop_image_position" <?php if ($row->crop_image_position == "right top") echo 'checked="checked"'; ?> ></td>
|
374 |
-
</tr>
|
375 |
-
<tr>
|
376 |
-
<td class="wds_position_td"><input type="radio" value="left center" name="crop_image_position" <?php if ($row->crop_image_position == "left center") echo 'checked="checked"'; ?> ></td>
|
377 |
-
<td class="wds_position_td"><input type="radio" value="center center" name="crop_image_position" <?php if ($row->crop_image_position == "center center") echo 'checked="checked"'; ?> ></td>
|
378 |
-
<td class="wds_position_td"><input type="radio" value="right center" name="crop_image_position" <?php if ($row->crop_image_position == "right center") echo 'checked="checked"'; ?> ></td>
|
379 |
-
</tr>
|
380 |
-
<tr>
|
381 |
-
<td class="wds_position_td"><input type="radio" value="left bottom" name="crop_image_position" <?php if ($row->crop_image_position == "left bottom") echo 'checked="checked"'; ?> ></td>
|
382 |
-
<td class="wds_position_td"><input type="radio" value="center bottom" name="crop_image_position" <?php if ($row->crop_image_position == "center bottom") echo 'checked="checked"'; ?> ></td>
|
383 |
-
<td class="wds_position_td"><input type="radio" value="right bottom" name="crop_image_position" <?php if ($row->crop_image_position == "right bottom") echo 'checked="checked"'; ?> ></td>
|
384 |
-
</tr>
|
385 |
-
</tbody>
|
386 |
-
</table>
|
387 |
-
</span>
|
388 |
-
<span class="wd-group">
|
389 |
-
<label class="wd-label"><?php _e('Fixed background:', WDS()->prefix); ?></label>
|
390 |
-
<input type="radio" id="fixed_bg1" name="fixed_bg" <?php echo (($row->fixed_bg) ? 'checked="checked"' : ''); ?> value="1" />
|
391 |
-
<label <?php echo (($row->fixed_bg) ? 'class="selected_color"' : ''); ?> for="fixed_bg1"><?php _e('Yes', WDS()->prefix); ?></label>
|
392 |
-
<input type="radio" id="fixed_bg0" name="fixed_bg" <?php echo (($row->fixed_bg) ? '' : 'checked="checked"'); ?> value="0" />
|
393 |
-
<label <?php echo ((!$row->fixed_bg) ? 'class="selected_color"' : ''); ?> for="fixed_bg0"><?php _e('No', WDS()->prefix); ?></label>
|
394 |
-
<p class="description"></p>
|
395 |
-
</span>
|
396 |
-
<span class="wd-group">
|
397 |
-
<label class="wd-label"><?php _e('Slides order direction:', WDS()->prefix); ?></label>
|
398 |
-
<input type="radio" id="order_dir1" name="order_dir" <?php echo checked('asc', $row->order_dir); ?> value="asc" />
|
399 |
-
<label <?php echo (($row->order_dir == 'asc') ? 'class="selected_color"' : ''); ?> for="order_dir1"><?php _e('Ascending', WDS()->prefix); ?></label>
|
400 |
-
<input type="radio" id="order_dir0" name="order_dir" <?php checked('desc', $row->order_dir); ?> value="desc" />
|
401 |
-
<label <?php echo (($row->order_dir == 'desc') ? 'class="selected_color"' : ''); ?> for="order_dir0"><?php _e('Descending', WDS()->prefix); ?></label>
|
402 |
-
<p class="description"></p>
|
403 |
-
</span>
|
404 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
405 |
-
<label class="wd-label"><?php _e('Parallax Effect', WDS()->prefix); ?></label>
|
406 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="parallax_effect1" name="parallax_effect" <?php echo (($row->parallax_effect) ? 'checked="checked"' : ''); ?> value="1" />
|
407 |
-
<label <?php echo (($row->parallax_effect) ? 'class="selected_color"' : ''); ?> for="parallax_effect1"><?php _e('Yes', WDS()->prefix); ?></label>
|
408 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="parallax_effect0" name="parallax_effect" <?php echo (($row->parallax_effect) ? '' : 'checked="checked"'); ?> value="0" />
|
409 |
-
<label <?php echo (($row->parallax_effect) ? '' : 'class="selected_color"'); ?> for="parallax_effect0"><?php _e('No', WDS()->prefix); ?></label>
|
410 |
-
<p class="description"><?php _e('The direction of the movement, as well as the layer moving pace depend on the z-index value.', WDS()->prefix); ?></p>
|
411 |
-
</span>
|
412 |
-
<span class="wd-group">
|
413 |
-
<label class="wd-label"><?php _e('Smart Load', WDS()->prefix); ?></label>
|
414 |
-
<input type="radio" id="preload_images1" name="preload_images" <?php echo (($row->preload_images) ? 'checked="checked"' : ''); ?> value="1" />
|
415 |
-
<label <?php echo (($row->preload_images) ? 'class="selected_color"' : ''); ?> for="preload_images1"><?php _e('Yes', WDS()->prefix); ?></label>
|
416 |
-
<input type="radio" id="preload_images0" name="preload_images" <?php echo (($row->preload_images) ? '' : 'checked="checked"'); ?> value="0" />
|
417 |
-
<label <?php echo (($row->preload_images) ? '' : 'class="selected_color"'); ?> for="preload_images0"><?php _e('No', WDS()->prefix); ?></label>
|
418 |
-
<p class="description"><?php _e('Turn this option on to have faster loading for the first few images and process the rest meanwhile.', WDS()->prefix); ?></p>
|
419 |
-
</span>
|
420 |
-
<span class="wd-group">
|
421 |
-
<label class="wd-label"><?php _e('Right click protection', WDS()->prefix); ?></label>
|
422 |
-
<input type="radio" name="image_right_click" id="image_right_click_1" value="1" <?php if ($row->image_right_click) echo 'checked="checked"'; ?> />
|
423 |
-
<label <?php echo $row->image_right_click ? 'class="selected_color"' : ''; ?> for="image_right_click_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
424 |
-
<input type="radio" name="image_right_click" id="image_right_click_0" value="0" <?php if (!$row->image_right_click) echo 'checked="checked"'; ?> />
|
425 |
-
<label <?php echo $row->image_right_click ? '' : 'class="selected_color"'; ?> for="image_right_click_0"><?php _e('No', WDS()->prefix); ?></label>
|
426 |
-
<p class="description"><?php _e('Disable right-click on slider images.', WDS()->prefix); ?></p>
|
427 |
-
</span>
|
428 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
429 |
-
<label class="wd-label"><?php _e('Layer out on next', WDS()->prefix); ?></label>
|
430 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" name="layer_out_next" id="layer_out_next_1" value="1" <?php if ($row->layer_out_next) echo 'checked="checked"'; ?> />
|
431 |
-
<label <?php echo $row->layer_out_next ? 'class="selected_color"' : ''; ?> for="layer_out_next_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
432 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" name="layer_out_next" id="layer_out_next_0" value="0" <?php if (!$row->layer_out_next) echo 'checked="checked"'; ?> />
|
433 |
-
<label <?php echo $row->layer_out_next ? '' : 'class="selected_color"'; ?> for="layer_out_next_0"><?php _e('No', WDS()->prefix); ?></label>
|
434 |
-
<p class="description"><?php _e('Enable this option to have the layer effect out regardless of the timing between the hit to the next slider.', WDS()->prefix); ?></p>
|
435 |
-
</span>
|
436 |
-
<span class="wd-group">
|
437 |
-
<label class="wd-label"><?php _e('Published', WDS()->prefix); ?></label>
|
438 |
-
<input type="radio" id="published1" name="published" <?php echo (($row->published) ? 'checked="checked"' : ''); ?> value="1" />
|
439 |
-
<label <?php echo (($row->published) ? 'class="selected_color"' : ''); ?> for="published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
440 |
-
<input type="radio" id="published0" name="published" <?php echo (($row->published) ? '' : 'checked="checked"'); ?> value="0" />
|
441 |
-
<label <?php echo (($row->published) ? '' : 'class="selected_color"'); ?> for="published0"><?php _e('No', WDS()->prefix); ?></label>
|
442 |
-
<p class="description"></p>
|
443 |
-
</span>
|
444 |
-
</div>
|
445 |
-
</div>
|
446 |
-
</div>
|
447 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
448 |
-
<div class="wd-box-section">
|
449 |
-
<div class="wd-box-content">
|
450 |
-
<span class="wd-group">
|
451 |
-
<label class="wd-label"><?php _e('Autoplay', WDS()->prefix); ?></label>
|
452 |
-
<input type="radio" id="autoplay1" name="autoplay" <?php echo (($row->autoplay) ? 'checked="checked"' : ''); ?> value="1" />
|
453 |
-
<label <?php echo (($row->autoplay) ? 'class="selected_color"' : ''); ?> for="autoplay1"><?php _e('Yes', WDS()->prefix); ?></label>
|
454 |
-
<input type="radio" id="autoplay0" name="autoplay" <?php echo (($row->autoplay) ? '' : 'checked="checked"'); ?> value="0" />
|
455 |
-
<label <?php echo (($row->autoplay) ? '' : 'class="selected_color"'); ?> for="autoplay0"><?php _e('No', WDS()->prefix); ?></label>
|
456 |
-
<p class="description"><?php _e('Enable this option to autoplay the slider.', WDS()->prefix); ?></p>
|
457 |
-
</span>
|
458 |
-
<span class="wd-group">
|
459 |
-
<label class="wd-label" for="time_intervval"><?php _e('Time Interval', WDS()->prefix); ?></label>
|
460 |
-
<input type="text" id="time_intervval" name="time_intervval" value="<?php echo $row->time_intervval; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> sec.
|
461 |
-
<p class="description"><?php _e('Set the time interval between the slides when autoplay is on.', WDS()->prefix); ?></p>
|
462 |
-
</span>
|
463 |
-
<span class="wd-group">
|
464 |
-
<label class="wd-label"><?php _e('Enable loop', WDS()->prefix); ?></label>
|
465 |
-
<input type="radio" id="slider_loop1" name="slider_loop" <?php echo (($row->slider_loop) ? 'checked="checked"' : ''); ?> value="1" />
|
466 |
-
<label <?php echo (($row->slider_loop) ? 'class="selected_color"' : ''); ?> for="slider_loop1"><?php _e('Yes', WDS()->prefix); ?></label>
|
467 |
-
<input type="radio" id="slider_loop0" name="slider_loop" <?php echo (($row->slider_loop) ? '' : 'checked="checked"'); ?> value="0" />
|
468 |
-
<label <?php echo (($row->slider_loop) ? '' : 'class="selected_color"'); ?> for="slider_loop0"><?php _e('No', WDS()->prefix); ?></label>
|
469 |
-
<p class="description"></p>
|
470 |
-
</span>
|
471 |
-
<span class="wd-group">
|
472 |
-
<label class="wd-label"><?php _e('Shuffle', WDS()->prefix); ?></label>
|
473 |
-
<input type="radio" id="shuffle1" name="shuffle" <?php echo (($row->shuffle) ? 'checked="checked"' : ''); ?> value="1" />
|
474 |
-
<label <?php echo (($row->shuffle) ? 'class="selected_color"' : ''); ?> for="shuffle1"><?php _e('Yes', WDS()->prefix); ?></label>
|
475 |
-
<input type="radio" id="shuffle0" name="shuffle" <?php echo (($row->shuffle) ? '' : 'checked="checked"'); ?> value="0" />
|
476 |
-
<label <?php echo (($row->shuffle) ? '' : 'class="selected_color"'); ?> for="shuffle0"><?php _e('No', WDS()->prefix); ?></label>
|
477 |
-
<p class="description"><?php _e('Enable this setting to have the slides change in random order during autoplay.', WDS()->prefix); ?></p>
|
478 |
-
</span>
|
479 |
-
<span class="wd-group">
|
480 |
-
<label class="wd-label"><?php _e('Two way slideshow', WDS()->prefix); ?></label>
|
481 |
-
<input type="radio" id="twoway_slideshow1" name="twoway_slideshow" <?php echo (($row->twoway_slideshow) ? 'checked="checked"' : ''); ?> value="1" />
|
482 |
-
<label <?php echo (($row->twoway_slideshow) ? 'class="selected_color"' : ''); ?> for="twoway_slideshow1"><?php _e('Yes', WDS()->prefix); ?></label>
|
483 |
-
<input type="radio" id="twoway_slideshow0" name="twoway_slideshow" <?php echo (($row->twoway_slideshow) ? '' : 'checked="checked"'); ?> value="0" />
|
484 |
-
<label <?php echo (($row->twoway_slideshow) ? '' : 'class="selected_color"'); ?> for="twoway_slideshow0"><?php _e('No', WDS()->prefix); ?></label>
|
485 |
-
<p class="description"><?php _e('If the user switches to previous slide, the slideshow starts to go backwards during autoplay.', WDS()->prefix); ?></p>
|
486 |
-
</span>
|
487 |
-
<span class="wd-group">
|
488 |
-
<label class="wd-label"><?php _e('Stop on hover', WDS()->prefix); ?></label>
|
489 |
-
<input type="radio" id="stop_animation1" name="stop_animation" <?php echo (($row->stop_animation) ? 'checked="checked"' : ''); ?> value="1" />
|
490 |
-
<label <?php echo (($row->stop_animation) ? 'class="selected_color"' : ''); ?> for="stop_animation1"><?php _e('Yes', WDS()->prefix); ?></label>
|
491 |
-
<input type="radio" id="stop_animation0" name="stop_animation" <?php echo (($row->stop_animation) ? '' : 'checked="checked"'); ?> value="0" />
|
492 |
-
<label <?php echo (($row->stop_animation) ? '' : 'class="selected_color"'); ?> for="stop_animation0"><?php _e('No', WDS()->prefix); ?></label>
|
493 |
-
<p class="description"><?php _e('The option works when autoplay is on.', WDS()->prefix); ?></p>
|
494 |
-
</span>
|
495 |
-
<span class="wd-group">
|
496 |
-
<label class="wd-label" for="start_slide_num"><?php _e('Start with slide', WDS()->prefix); ?></label>
|
497 |
-
<input type="text" name="start_slide_num" id="start_slide_num" value="<?php echo $row->start_slide_num; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" />
|
498 |
-
<p class="description"><?php _e('The slider will start from the specified slide. Set the value to 0 for random.', WDS()->prefix); ?></p>
|
499 |
-
</span>
|
500 |
-
<span class="wd-group">
|
501 |
-
<label class="wd-label"><?php _e('Music', WDS()->prefix); ?></label>
|
502 |
-
<input type="radio" id="music1" name="music" <?php echo (($row->music) ? 'checked="checked"' : ''); ?> value="1" onClick="wds_enable_disable('', 'tr_music_url', 'music1')" />
|
503 |
-
<label <?php echo (($row->music) ? 'class="selected_color"' : ''); ?> for="music1"><?php _e('Yes', WDS()->prefix); ?></label>
|
504 |
-
<input type="radio" id="music0" name="music" <?php echo (($row->music) ? '' : 'checked="checked"'); ?> value="0" onClick="wds_enable_disable('none', 'tr_music_url', 'music0')" />
|
505 |
-
<label <?php echo (($row->music) ? '' : 'class="selected_color"'); ?> for="music0"><?php _e('No', WDS()->prefix); ?></label>
|
506 |
-
<p class="description"><?php _e('You can have music/audio track playback with the slider.', WDS()->prefix); ?></p>
|
507 |
-
</span>
|
508 |
-
<span class="wd-group" id="tr_music_url">
|
509 |
-
<label class="wd-label" for="music_url"><?php _e('Music url', WDS()->prefix); ?></label>
|
510 |
-
<input type="text" id="music_url" name="music_url" size="39" value="<?php echo $row->music_url; ?>" style="display:inline-block;" />
|
511 |
-
<input id="add_music_url" class="button button-secondary" type="button" onclick="wds_media_uploader('music', event, false); return false;" value="<?php _e('Add music', WDS()->prefix); ?>" />
|
512 |
-
<p class="description"><?php _e('Only .aac,.m4a,.f4a,.mp3,.ogg,.oga formats are supported.', WDS()->prefix); ?></p>
|
513 |
-
</span>
|
514 |
-
<span class="wd-group">
|
515 |
-
<label class="wd-label" for="align"><?php _e('Slider alignment', WDS()->prefix); ?></label>
|
516 |
-
<select class="select_icon select_icon_320" name="align" id="align">
|
517 |
-
<?php
|
518 |
-
foreach ($aligns as $key => $align) {
|
519 |
-
?>
|
520 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->align == $key) ? 'selected="selected"' : ''); ?>><?php echo $align; ?></option>
|
521 |
-
<?php
|
522 |
-
}
|
523 |
-
?>
|
524 |
-
</select>
|
525 |
-
<p class="description"><?php _e('Set the alignment of the slider.', WDS()->prefix); ?></p>
|
526 |
-
</span>
|
527 |
-
<span class="wd-group">
|
528 |
-
<label class="wd-label" for="background_color"><?php _e('Background color', WDS()->prefix); ?></label>
|
529 |
-
<input type="text" name="background_color" id="background_color" value="<?php echo $row->background_color; ?>" class="color" onchange="jQuery('div[id^=\'wds_preview_image\']').css({backgroundColor: wds_hex_rgba(jQuery(this).val(), 100 - jQuery('#background_transparent').val())})" />
|
530 |
-
<input id="background_transparent" name="background_transparent" class="spider_int_input" type="text" onchange="jQuery('div[id^=\'wds_preview_image\']').css({backgroundColor: wds_hex_rgba(jQuery('#background_color').val(), 100 - jQuery(this).val())})" onkeypress="return spider_check_isnum(event)" value="<?php echo $row->background_transparent; ?>" /> %
|
531 |
-
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
532 |
-
</span>
|
533 |
-
<span class="wd-group">
|
534 |
-
<label class="wd-label" for="glb_border_width"><?php _e('Border', WDS()->prefix); ?></label>
|
535 |
-
<input type="text" name="glb_border_width" id="glb_border_width" value="<?php echo $row->glb_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
536 |
-
<select class="select_icon select_icon_320" name="glb_border_style" id="glb_border_style">
|
537 |
-
<?php
|
538 |
-
foreach ($border_styles as $key => $border_style) {
|
539 |
-
?>
|
540 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->glb_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
541 |
-
<?php
|
542 |
-
}
|
543 |
-
?>
|
544 |
-
</select>
|
545 |
-
<input type="text" name="glb_border_color" id="glb_border_color" value="<?php echo $row->glb_border_color; ?>" class="color" />
|
546 |
-
<p class="description"><?php _e('Set the border width, type and the color.', WDS()->prefix); ?></p>
|
547 |
-
</span>
|
548 |
-
<span class="wd-group">
|
549 |
-
<label class="wd-label" for="glb_border_radius"><?php _e('Border radius', WDS()->prefix); ?></label>
|
550 |
-
<input type="text" name="glb_border_radius" id="glb_border_radius" value="<?php echo $row->glb_border_radius; ?>" class="spider_char_input" />
|
551 |
-
<p class="description"><?php _e('Use CSS type values (e.g. 4px).', WDS()->prefix); ?></p>
|
552 |
-
</span>
|
553 |
-
<span class="wd-group">
|
554 |
-
<label class="wd-label" for="glb_margin"><?php _e('Margin', WDS()->prefix); ?></label>
|
555 |
-
<input type="text" name="glb_margin" id="glb_margin" value="<?php echo $row->glb_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
556 |
-
<p class="description"><?php _e('Set a margin for the slider.', WDS()->prefix); ?></p>
|
557 |
-
</span>
|
558 |
-
<span class="wd-group">
|
559 |
-
<label class="wd-label" for="glb_box_shadow"><?php _e('Shadow', WDS()->prefix); ?></label>
|
560 |
-
<input type="text" name="glb_box_shadow" id="glb_box_shadow" value="<?php echo $row->glb_box_shadow; ?>" class="spider_box_input" />
|
561 |
-
<p class="description"><?php _e('Use CSS type values (e.g. 10px 10px 5px #888888).', WDS()->prefix); ?></p>
|
562 |
-
</span>
|
563 |
-
</div>
|
564 |
-
</div>
|
565 |
-
</div>
|
566 |
-
</div>
|
567 |
-
</div>
|
568 |
-
<div class="wds_nav_box wds_nav_carousel_box<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
569 |
-
<div class="wd-table">
|
570 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
571 |
-
<div class="wd-box-section">
|
572 |
-
<div class="wd-box-content">
|
573 |
-
<?php
|
574 |
-
if ( WDS()->is_free ) {
|
575 |
-
echo WDW_S_Library::message_id(0, __('Carousel is disabled in free version.', WDS()->prefix), 'error');
|
576 |
-
}
|
577 |
-
?>
|
578 |
-
<span class="wd-group">
|
579 |
-
<label class="wd-label"><?php _e('Carousel:', WDS()->prefix); ?></label>
|
580 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel1" name="carousel" <?php echo (($row->carousel) ? 'checked="checked"' : ''); ?> value="1" onClick="showhide_for_carousel_fildes(1)"/>
|
581 |
-
<label <?php echo (($row->carousel) ? 'class="selected_color"' : ''); ?> for="carousel1"><?php _e('Yes', WDS()->prefix); ?></label>
|
582 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel0" name="carousel" <?php echo (($row->carousel) ? '' : 'checked="checked"'); ?> value="0" onClick="showhide_for_carousel_fildes(0)"/>
|
583 |
-
<label <?php echo (($row->carousel) ? '' : 'class="selected_color"'); ?> for="carousel0"><?php _e('No', WDS()->prefix); ?></label>
|
584 |
-
<p class="description"><?php _e('Use this option to activate Carousel feature. Note, that the effects you have selected in Global settings for your slider will not apply.', WDS()->prefix); ?></p>
|
585 |
-
</span>
|
586 |
-
<span class="wd-group">
|
587 |
-
<label class="wd-label" for="carousel_image_counts"><?php _e('Number of images for carousel:', WDS()->prefix); ?></label>
|
588 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_image_counts" name="carousel_image_counts" value="<?php echo $row->carousel_image_counts; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" />
|
589 |
-
<p class="description"></p>
|
590 |
-
</span>
|
591 |
-
<span class="wd-group">
|
592 |
-
<label class="wd-label" for="carousel_image_parameters"><?php _e('Carousel image ratio:', WDS()->prefix); ?></label>
|
593 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_image_parameters" name="carousel_image_parameters" value="<?php echo $row->carousel_image_parameters; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" />
|
594 |
-
<p class="description"><?php _e('The value must be between 0 and 1.', WDS()->prefix); ?></p>
|
595 |
-
</span>
|
596 |
-
<span class="wd-group">
|
597 |
-
<label class="wd-label"><?php _e('Container fit:', WDS()->prefix); ?></label>
|
598 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel_fit_containerWidth1" name="carousel_fit_containerWidth" <?php echo (($row->carousel_fit_containerWidth) ? 'checked="checked"' : ''); ?> value="1" />
|
599 |
-
<label <?php echo (($row->carousel_fit_containerWidth) ? 'class="selected_color"' : ''); ?> for="carousel_fit_containerWidth1"><?php _e('Yes', WDS()->prefix); ?></label>
|
600 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel_fit_containerWidth0" name="carousel_fit_containerWidth" <?php echo (($row->carousel_fit_containerWidth) ? '' : 'checked="checked"'); ?> value="0" />
|
601 |
-
<label <?php echo (($row->carousel_fit_containerWidth) ? '' : 'class="selected_color"'); ?> for="carousel_fit_containerWidth0"><?php _e('No', WDS()->prefix); ?></label>
|
602 |
-
<p class="description"></p>
|
603 |
-
</span>
|
604 |
-
</div>
|
605 |
-
</div>
|
606 |
-
</div>
|
607 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
608 |
-
<div class="wd-box-section">
|
609 |
-
<div class="wd-box-content">
|
610 |
-
<span class="wd-group">
|
611 |
-
<label class="wd-label" for="carousel_width"><?php _e('Fixed width:', WDS()->prefix); ?></label>
|
612 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_width" name="carousel_width" value="<?php echo $row->carousel_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
613 |
-
<p class="description"></p>
|
614 |
-
</span>
|
615 |
-
<span class="wd-group">
|
616 |
-
<label class="wd-label" for="carousel_degree"><?php _e('Background image angle:', WDS()->prefix); ?></label>
|
617 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_degree" name="carousel_degree" value="<?php echo $row->carousel_degree; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> deg
|
618 |
-
<p class="description"></p>
|
619 |
-
</span>
|
620 |
-
<span class="wd-group">
|
621 |
-
<label class="wd-label" for="carousel_grayscale"><?php _e('Background image grayscale:', WDS()->prefix); ?></label>
|
622 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="carousel_grayscale" id="carousel_grayscale" value="<?php echo $row->carousel_grayscale; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/>%
|
623 |
-
<p class="description"><?php _e('You can change the color scheme for background images to grayscale. Values must be between 0 to 100', WDS()->prefix); ?></p>
|
624 |
-
</span>
|
625 |
-
<span class="wd-group">
|
626 |
-
<label class="wd-label" for="carousel_transparency"><?php _e('Background image transparency:', WDS()->prefix); ?></label>
|
627 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="carousel_transparency" id="carousel_transparency" value="<?php echo $row->carousel_transparency; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/>%
|
628 |
-
<p class="description"><?php _e('You can set transparency level for background images. Values should be between 0 to 100', WDS()->prefix); ?></p>
|
629 |
-
</span>
|
630 |
-
</div>
|
631 |
-
</div>
|
632 |
-
</div>
|
633 |
-
</div>
|
634 |
-
</div>
|
635 |
-
<div class="wds_nav_box wds_nav_navigation_box">
|
636 |
-
<div class="wd-table">
|
637 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
638 |
-
<div class="wd-box-section">
|
639 |
-
<div class="wd-box-content">
|
640 |
-
<span class="wd-group">
|
641 |
-
<label class="wd-label"><?php _e('Next / Previous buttons:', WDS()->prefix); ?></label>
|
642 |
-
<input type="radio" name="prev_next_butt" id="prev_next_butt_1" value="1" <?php if ($row->prev_next_butt) echo 'checked="checked"'; ?> />
|
643 |
-
<label <?php echo $row->prev_next_butt ? 'class="selected_color"' : ''; ?> for="prev_next_butt_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
644 |
-
<input type="radio" name="prev_next_butt" id="prev_next_butt_0" value="0" <?php if (!$row->prev_next_butt) echo 'checked="checked"'; ?> />
|
645 |
-
<label <?php echo $row->prev_next_butt ? '' : 'class="selected_color"'; ?> for="prev_next_butt_0"><?php _e('No', WDS()->prefix); ?></label>
|
646 |
-
<p class="description"><?php _e('Enable this option to display Previous and Next buttons.', WDS()->prefix); ?></p>
|
647 |
-
</span>
|
648 |
-
<span class="wd-group">
|
649 |
-
<label class="wd-label"><?php _e('Mouse swipe navigation:', WDS()->prefix); ?></label>
|
650 |
-
<input type="radio" name="mouse_swipe_nav" id="mouse_swipe_nav_1" value="1" <?php if ($row->mouse_swipe_nav) echo 'checked="checked"'; ?> />
|
651 |
-
<label <?php echo $row->mouse_swipe_nav ? 'class="selected_color"' : ''; ?> for="mouse_swipe_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
652 |
-
<input type="radio" name="mouse_swipe_nav" id="mouse_swipe_nav_0" value="0" <?php if (!$row->mouse_swipe_nav) echo 'checked="checked"'; ?> />
|
653 |
-
<label <?php echo $row->mouse_swipe_nav ? '' : 'class="selected_color"'; ?> for="mouse_swipe_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
654 |
-
<p class="description"></p>
|
655 |
-
</span>
|
656 |
-
<span class="wd-group">
|
657 |
-
<label class="wd-label"><?php _e('Touch swipe navigation:', WDS()->prefix); ?></label>
|
658 |
-
<input type="radio" name="touch_swipe_nav" id="touch_swipe_nav_1" value="1" <?php if ($row->touch_swipe_nav) echo 'checked="checked"'; ?> />
|
659 |
-
<label <?php echo $row->touch_swipe_nav ? 'class="selected_color"' : ''; ?> for="touch_swipe_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
660 |
-
<input type="radio" name="touch_swipe_nav" id="touch_swipe_nav_0" value="0" <?php if (!$row->touch_swipe_nav) echo 'checked="checked"'; ?> />
|
661 |
-
<label <?php echo $row->touch_swipe_nav ? '' : 'class="selected_color"'; ?> for="touch_swipe_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
662 |
-
<p class="description"></p>
|
663 |
-
</span>
|
664 |
-
<span class="wd-group">
|
665 |
-
<label class="wd-label"><?php _e('Mouse wheel navigation:', WDS()->prefix); ?></label>
|
666 |
-
<input type="radio" name="mouse_wheel_nav" id="mouse_wheel_nav_1" value="1" <?php if ($row->mouse_wheel_nav) echo 'checked="checked"'; ?> />
|
667 |
-
<label <?php echo $row->mouse_wheel_nav ? 'class="selected_color"' : ''; ?> for="mouse_wheel_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
668 |
-
<input type="radio" name="mouse_wheel_nav" id="mouse_wheel_nav_0" value="0" <?php if (!$row->mouse_wheel_nav) echo 'checked="checked"'; ?> />
|
669 |
-
<label <?php echo $row->mouse_wheel_nav ? '' : 'class="selected_color"'; ?> for="mouse_wheel_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
670 |
-
<p class="description"></p>
|
671 |
-
</span>
|
672 |
-
<span class="wd-group">
|
673 |
-
<label class="wd-label"><?php _e('Keyboard navigation:', WDS()->prefix); ?></label>
|
674 |
-
<input type="radio" name="keyboard_nav" id="keyboard_nav_1" value="1" <?php if ($row->keyboard_nav) echo 'checked="checked"'; ?> />
|
675 |
-
<label <?php echo $row->keyboard_nav ? 'class="selected_color"' : ''; ?> for="keyboard_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
676 |
-
<input type="radio" name="keyboard_nav" id="keyboard_nav_0" value="0" <?php if (!$row->keyboard_nav) echo 'checked="checked"'; ?> />
|
677 |
-
<label <?php echo $row->keyboard_nav ? '' : 'class="selected_color"'; ?> for="keyboard_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
678 |
-
<p class="description"></p>
|
679 |
-
</span>
|
680 |
-
<span class="wd-group">
|
681 |
-
<label class="wd-label"><?php _e('Show Navigation buttons:', WDS()->prefix); ?></label>
|
682 |
-
<input type="radio" name="navigation" id="navigation_1" value="hover" <?php if ($row->navigation == 'hover') echo 'checked="checked"'; ?> />
|
683 |
-
<label <?php echo $row->navigation == 'hover' ? 'class="selected_color"' : ''; ?> for="navigation_1"><?php _e('On hover', WDS()->prefix); ?></label>
|
684 |
-
<input type="radio" name="navigation" id="navigation_0" value="always" <?php if ($row->navigation == 'always' ) echo 'checked="checked"'; ?> />
|
685 |
-
<label <?php echo $row->navigation == 'always' ? 'class="selected_color"' : ''; ?> for="navigation_0"><?php _e('Always', WDS()->prefix); ?></label>
|
686 |
-
<p class="description"></p>
|
687 |
-
</span>
|
688 |
-
<span class="wd-group">
|
689 |
-
<label class="wd-label"><?php _e('Image for Next / Previous buttons:', WDS()->prefix); ?></label>
|
690 |
-
<input type="radio" name="rl_butt_img_or_not" id="rl_butt_img_or_not_our" value="our" <?php if ($row->rl_butt_img_or_not == 'our') echo 'checked="checked"'; ?> onClick="image_for_next_prev_butt('our')" />
|
691 |
-
<label <?php if ($row->rl_butt_img_or_not == 'our') echo 'class="selected_color"'; ?> for="rl_butt_img_or_not_our"><?php _e('Default', WDS()->prefix); ?></label>
|
692 |
-
<input type="radio" name="rl_butt_img_or_not" id="rl_butt_img_or_not_cust" value="custom" <?php if ($row->rl_butt_img_or_not == 'custom') echo 'checked="checked"'; ?> onClick="image_for_next_prev_butt('custom')" />
|
693 |
-
<label <?php if ($row->rl_butt_img_or_not == 'custom') echo 'class="selected_color"'; ?> for="rl_butt_img_or_not_cust"><?php _e('Custom', WDS()->prefix); ?></label>
|
694 |
-
<input type="radio" name="rl_butt_img_or_not" id="rl_butt_img_or_not_style" value="style" <?php if ($row->rl_butt_img_or_not == 'style') echo 'checked="checked"'; ?> onClick="image_for_next_prev_butt('style')" />
|
695 |
-
<label <?php if ($row->rl_butt_img_or_not == 'style') echo 'class="selected_color"'; ?> for="rl_butt_img_or_not_style"><?php _e('Styled', WDS()->prefix); ?></label>
|
696 |
-
<input type="hidden" id="right_butt_url" name="right_butt_url" value="<?php echo $row->right_butt_url; ?>" />
|
697 |
-
<input type="hidden" id="right_butt_hov_url" name="right_butt_hov_url" value="<?php echo $row->right_butt_hov_url; ?>" />
|
698 |
-
<input type="hidden" id="left_butt_url" name="left_butt_url" value="<?php echo $row->left_butt_url; ?>" />
|
699 |
-
<input type="hidden" id="left_butt_hov_url" name="left_butt_hov_url" value="<?php echo $row->left_butt_hov_url; ?>" />
|
700 |
-
<p class="description"><?php _e('You can select to use default navigation buttons or to upload custom icons.', WDS()->prefix); ?></p>
|
701 |
-
</span>
|
702 |
-
<span class="wd-group" id="right_left_butt_style">
|
703 |
-
<label class="wd-label" for="rl_butt_style"><?php _e('Next / Previous buttons style:', WDS()->prefix); ?></label>
|
704 |
-
<div style="display: table;">
|
705 |
-
<div style="display: table-cell; vertical-align: middle;">
|
706 |
-
<select class="select_icon select_icon_320" name="rl_butt_style" id="rl_butt_style" onchange="change_rl_butt_style(jQuery(this).val())">
|
707 |
-
<?php
|
708 |
-
foreach ($button_styles as $key => $button_style) {
|
709 |
-
?>
|
710 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->rl_butt_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $button_style; ?></option>
|
711 |
-
<?php
|
712 |
-
}
|
713 |
-
?>
|
714 |
-
</select>
|
715 |
-
</div>
|
716 |
-
<div style="display: table-cell; vertical-align: middle; background-color: rgba(229, 229, 229, 0.62); text-align: center;">
|
717 |
-
<i id="wds_left_style" class="fa <?php echo $row->rl_butt_style; ?>-left" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
718 |
-
<i id="wds_right_style" class="fa <?php echo $row->rl_butt_style; ?>-right" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
719 |
-
</div>
|
720 |
-
</div>
|
721 |
-
<p class="description"><?php _e('Choose the style of the button you prefer to have as navigation buttons.', WDS()->prefix); ?></p>
|
722 |
-
</span>
|
723 |
-
<span class="wd-group" id="right_butt_upl">
|
724 |
-
<label class="wd-label"><?php _e('Upload buttons images:', WDS()->prefix); ?></label>
|
725 |
-
<div style="display: table;">
|
726 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
727 |
-
<?php
|
728 |
-
if (!$spider_uploader) {
|
729 |
-
?>
|
730 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_left_but', event, false); return false;" value="<?php _e('Previous Button', WDS()->prefix); ?>" />
|
731 |
-
<?php
|
732 |
-
}
|
733 |
-
else {
|
734 |
-
?>
|
735 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_left_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Previous Button', WDS()->prefix); ?>" onclick="return false;">
|
736 |
-
<?php _e('Previous Button', WDS()->prefix); ?>
|
737 |
-
</a>
|
738 |
-
<?php
|
739 |
-
}
|
740 |
-
?>
|
741 |
-
<?php
|
742 |
-
if (!$spider_uploader) {
|
743 |
-
?>
|
744 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_left_hov_but', event, false); return false;" value="<?php _e('Previous Button Hover', WDS()->prefix); ?>" />
|
745 |
-
<?php
|
746 |
-
}
|
747 |
-
else {
|
748 |
-
?>
|
749 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_left_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Previous Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
750 |
-
<?php _e('Previous Button Hover', WDS()->prefix); ?>
|
751 |
-
</a>
|
752 |
-
<?php
|
753 |
-
}
|
754 |
-
?>
|
755 |
-
</div>
|
756 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
757 |
-
<?php
|
758 |
-
if (!$spider_uploader) {
|
759 |
-
?>
|
760 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_right_but', event, false); return false;" value="<?php _e('Next Button', WDS()->prefix); ?>" />
|
761 |
-
<?php
|
762 |
-
}
|
763 |
-
else {
|
764 |
-
?>
|
765 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_right_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Next Button', WDS()->prefix); ?>" onclick="return false;">
|
766 |
-
<?php _e('Next Button', WDS()->prefix); ?>
|
767 |
-
</a>
|
768 |
-
<?php
|
769 |
-
}
|
770 |
-
?>
|
771 |
-
<?php
|
772 |
-
if (!$spider_uploader) {
|
773 |
-
?>
|
774 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_right_hov_but', event, false); return false;" value="<?php _e('Next Button Hover', WDS()->prefix); ?>" />
|
775 |
-
<?php
|
776 |
-
}
|
777 |
-
else {
|
778 |
-
?>
|
779 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_right_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Next Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
780 |
-
<?php _e('Next Button Hover', WDS()->prefix); ?>
|
781 |
-
</a>
|
782 |
-
<?php
|
783 |
-
}
|
784 |
-
?>
|
785 |
-
</div>
|
786 |
-
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="display_block">
|
787 |
-
<img id="left_butt_img" src="<?php echo $row->left_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
788 |
-
<img id="right_butt_img" src="<?php echo $row->right_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
789 |
-
<img id="left_butt_hov_img" src="<?php echo $row->left_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
790 |
-
<img id="right_butt_hov_img" src="<?php echo $row->right_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
791 |
-
</div>
|
792 |
-
<div style="display: table-cell; text-align: center; vertical-align: middle;" class="display_block wds_reverse_cont">
|
793 |
-
<input type="button" class="button button-small wds_reverse" onclick="wds_change_custom_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
794 |
-
</div>
|
795 |
-
</div>
|
796 |
-
<script>
|
797 |
-
var wds_rl_butt_type = [];
|
798 |
-
var rl_butt_dir = '<?php echo WDS()->plugin_url . '/images/arrow/'; ?>';
|
799 |
-
var type_cur_fold = '1';
|
800 |
-
<?php
|
801 |
-
$folder_names = scandir(WDS()->plugin_dir . '/images/arrow');
|
802 |
-
$cur_fold_name = '';
|
803 |
-
$cur_type_key = '';
|
804 |
-
$cur_color_key = '';
|
805 |
-
$cur_sub_fold_names = array();
|
806 |
-
array_splice($folder_names, 0, 2);
|
807 |
-
$flag = FALSE;
|
808 |
-
foreach ($folder_names as $type_key => $folder_name) {
|
809 |
-
if (is_dir(WDS()->plugin_dir . '/images/arrow/' . $folder_name)) {
|
810 |
-
?>
|
811 |
-
wds_rl_butt_type["<?php echo $type_key; ?>"] = [];
|
812 |
-
wds_rl_butt_type["<?php echo $type_key; ?>"]["type_name"] = "<?php echo $folder_name; ?>";
|
813 |
-
<?php
|
814 |
-
if ($row->left_butt_url != '') {
|
815 |
-
/* Getting current button's type folder and color folder.*/
|
816 |
-
$check_cur_fold = explode('/' , $row->left_butt_url);
|
817 |
-
if (in_array($folder_name, $check_cur_fold)) {
|
818 |
-
$flag = TRUE;
|
819 |
-
$cur_fold_name = $folder_name;
|
820 |
-
$cur_type_key = $type_key;
|
821 |
-
$cur_sub_fold_names = scandir(WDS()->plugin_dir . '/images/arrow/' . $cur_fold_name);
|
822 |
-
array_splice($cur_sub_fold_names, 0, 2);
|
823 |
-
?>
|
824 |
-
type_cur_fold = '<?php echo $cur_type_key;?>';
|
825 |
-
<?php
|
826 |
-
}
|
827 |
-
}
|
828 |
-
$sub_folder_names = scandir( WDS()->plugin_dir . '/images/arrow/' . $folder_name);
|
829 |
-
array_splice($sub_folder_names, 0, 2);
|
830 |
-
foreach ($sub_folder_names as $color_key => $sub_folder_name) {
|
831 |
-
if (is_dir(WDS()->plugin_dir . '/images/arrow/' . $folder_name . '/' . $sub_folder_name)) {
|
832 |
-
if ($cur_fold_name == $folder_name) {
|
833 |
-
/* Getting current button's color key.*/
|
834 |
-
if (in_array($sub_folder_name, $check_cur_fold)) {
|
835 |
-
$cur_color_key = $color_key;
|
836 |
-
}
|
837 |
-
}
|
838 |
-
?>
|
839 |
-
wds_rl_butt_type["<?php echo $type_key; ?>"]["<?php echo $color_key; ?>"] = "<?php echo $sub_folder_name; ?>";
|
840 |
-
<?php
|
841 |
-
}
|
842 |
-
}
|
843 |
-
}
|
844 |
-
else {
|
845 |
-
?>
|
846 |
-
console.log('<?php echo $folder_name . " is not a directory."; ?>');
|
847 |
-
<?php
|
848 |
-
}
|
849 |
-
}
|
850 |
-
?>
|
851 |
-
</script>
|
852 |
-
</span>
|
853 |
-
<span class="wd-group" id="right_left_butt_select">
|
854 |
-
<label class="wd-label" for="right_butt_url"><?php _e('Choose buttons:', WDS()->prefix); ?></label>
|
855 |
-
<div style="display: table; margin-bottom: 14px;">
|
856 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
857 |
-
<div style="display: block; width: 122px;" class="default_buttons">
|
858 |
-
<div class="spider_choose_option" onclick="wds_choose_option(this)">
|
859 |
-
<div class="spider_option_main_title"><?php _e('Choose group', WDS()->prefix); ?></div>
|
860 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE"></i></div>
|
861 |
-
</div>
|
862 |
-
<div class="spider_options_cont">
|
863 |
-
<?php
|
864 |
-
foreach ($folder_names as $type_key => $folder_name) {
|
865 |
-
?>
|
866 |
-
<div class="spider_option_cont wds_rl_butt_groups" value="<?php echo $type_key; ?>" <?php echo (($cur_type_key == $type_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_rl_butt_type(this)">
|
867 |
-
<div class="spider_option_cont_title">
|
868 |
-
<?php _e('Group', WDS()->prefix); echo '-' . ++$type_key; ?>
|
869 |
-
</div>
|
870 |
-
<div class="spider_option_cont_img">
|
871 |
-
<img class="src_top_left" style="display: inline-block; width: 14px; height: 14px;" />
|
872 |
-
<img class="src_top_right" style="display: inline-block; width: 14px; height: 14px;" />
|
873 |
-
<img class="src_bottom_left" style="display: inline-block; width: 14px; height: 14px;" />
|
874 |
-
<img class="src_bottom_right" style="display: inline-block; width: 14px; height: 14px;" />
|
875 |
-
</div>
|
876 |
-
</div>
|
877 |
-
<?php
|
878 |
-
}
|
879 |
-
if (!$flag) {
|
880 |
-
/* Folder doesn't exist.*/
|
881 |
-
?>
|
882 |
-
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
883 |
-
<?php
|
884 |
-
}
|
885 |
-
?>
|
886 |
-
</div>
|
887 |
-
</div>
|
888 |
-
</div>
|
889 |
-
<div style="display:table-cell;vertical-align: middle;" class="display_block">
|
890 |
-
<div style="display: block; width: 122px; margin-left: 12px;" class="default_buttons">
|
891 |
-
<div class="spider_choose_option" onclick="<?php echo (WDS()->is_free ? 'alert(\'' . addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) . '\')' : 'wds_choose_option_color(this)'); ?>">
|
892 |
-
<div class="spider_option_main_title"><?php _e('Choose color', WDS()->prefix); ?></div>
|
893 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color:#1E8CBE"></i></div>
|
894 |
-
</div>
|
895 |
-
<div class="spider_options_color_cont">
|
896 |
-
<?php
|
897 |
-
foreach ($cur_sub_fold_names as $color_key => $cur_sub_fold_name) {
|
898 |
-
?>
|
899 |
-
<div class="spider_option_cont wds_rl_butt_col_groups" value="<?php echo $color_key; ?>" <?php echo (($cur_color_key == $color_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_rl_butt_color(this,<?php echo $cur_type_key; ?>)">
|
900 |
-
<div class="spider_option_cont_title" >
|
901 |
-
<?php _e('Color', WDS()->prefix); echo '-' . ++$color_key; ?>
|
902 |
-
</div>
|
903 |
-
<div class="spider_option_cont_img">
|
904 |
-
<img class="src_col_top_left" style="display:inline-block; width: 14px; height: 14px;" />
|
905 |
-
<img class="src_col_top_right" style="display:inline-block; width: 14px; height: 14px;" />
|
906 |
-
<img class="src_col_bottom_left" style="display:inline-block; width: 14px; height: 14px;" />
|
907 |
-
<img class="src_col_bottom_right" style="display:inline-block; width: 14px; height: 14px;" />
|
908 |
-
</div>
|
909 |
-
</div>
|
910 |
-
<?php
|
911 |
-
}
|
912 |
-
if (!$flag) {
|
913 |
-
/* Folder doesn't exist.*/
|
914 |
-
?>
|
915 |
-
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
916 |
-
<?php
|
917 |
-
}
|
918 |
-
?>
|
919 |
-
</div>
|
920 |
-
</div>
|
921 |
-
</div>
|
922 |
-
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;" class="display_block">
|
923 |
-
<div style=" display: block; margin-left: 12px; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="play_buttons_cont">
|
924 |
-
<img id="rl_butt_img_l" src="<?php echo $row->left_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
925 |
-
<img id="rl_butt_img_r" src="<?php echo $row->right_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
926 |
-
<img id="rl_butt_hov_img_l" src="<?php echo $row->left_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
927 |
-
<img id="rl_butt_hov_img_r" src="<?php echo $row->right_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
928 |
-
</div>
|
929 |
-
</div>
|
930 |
-
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
931 |
-
<input type="button" class="button button-small wds_reverse" onclick="change_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
932 |
-
</div>
|
933 |
-
</div>
|
934 |
-
<p class="description"><?php _e('Choose the type and color of navigation buttons.', WDS()->prefix); ?></p>
|
935 |
-
</span>
|
936 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="right_left_butt_size">
|
937 |
-
<label class="wd-label" for="rl_butt_size"><?php _e('Next / Previous buttons size:', WDS()->prefix); ?></label>
|
938 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="rl_butt_size" id="rl_butt_size" value="<?php echo $row->rl_butt_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
939 |
-
<p class="description"><?php _e('Set the size of Next and Previous buttons.', WDS()->prefix); ?></p>
|
940 |
-
</span>
|
941 |
-
</div>
|
942 |
-
</div>
|
943 |
-
</div>
|
944 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
945 |
-
<div class="wd-box-section">
|
946 |
-
<div class="wd-box-content">
|
947 |
-
<span class="wd-group">
|
948 |
-
<label class="wd-label"><?php _e('Play / Pause button:', WDS()->prefix); ?></label>
|
949 |
-
<input type="radio" name="play_paus_butt" id="play_paus_butt_1" value="1" <?php if ($row->play_paus_butt) echo 'checked="checked"'; ?> />
|
950 |
-
<label <?php if ($row->play_paus_butt) echo 'class="selected_color"'; ?> for="play_paus_butt_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
951 |
-
<input type="radio" name="play_paus_butt" id="play_paus_butt_0" value="0" <?php if (!$row->play_paus_butt) echo 'checked="checked"'; ?> />
|
952 |
-
<label <?php if (!$row->play_paus_butt) echo 'class="selected_color"'; ?> for="play_paus_butt_0"><?php _e('No', WDS()->prefix); ?></label>
|
953 |
-
<p class="description"><?php _e('Select this option to display Play and Pause buttons.', WDS()->prefix); ?></p>
|
954 |
-
</span>
|
955 |
-
<span class="wd-group">
|
956 |
-
<label class="wd-label"><?php _e('Image for Play / Pause buttons:', WDS()->prefix); ?></label>
|
957 |
-
<input type="radio" name="play_paus_butt_img_or_not" id="play_pause_butt_img_or_not_our" value="our" <?php if ($row->play_paus_butt_img_or_not == 'our') echo 'checked="checked"'; ?> onClick="image_for_play_pause_butt('our')" />
|
958 |
-
<label <?php if ($row->play_paus_butt_img_or_not == 'our') echo 'class="selected_color"'; ?> for="play_pause_butt_img_or_not_our"><?php _e('Default', WDS()->prefix); ?></label>
|
959 |
-
<input type="radio" name="play_paus_butt_img_or_not" id="play_pause_butt_img_or_not_cust" value="custom" <?php if ($row->play_paus_butt_img_or_not == 'custom') echo 'checked="checked"'; ?> onClick="image_for_play_pause_butt('custom')" />
|
960 |
-
<label <?php if ($row->play_paus_butt_img_or_not == 'custom') echo 'class="selected_color"'; ?> for="play_pause_butt_img_or_not_cust"><?php _e('Custom', WDS()->prefix); ?></label>
|
961 |
-
<input type="radio" name="play_paus_butt_img_or_not" id="play_pause_butt_img_or_not_select" value="style" <?php if ($row->play_paus_butt_img_or_not == 'style') echo 'checked="checked"'; ?> onClick="image_for_play_pause_butt('style')" />
|
962 |
-
<label <?php if ($row->play_paus_butt_img_or_not == 'style') echo 'class="selected_color"'; ?> for="play_pause_butt_img_or_not_select"><?php _e('Styled', WDS()->prefix); ?></label>
|
963 |
-
<input type="hidden" id="play_butt_url" name="play_butt_url" value="<?php echo $row->play_butt_url; ?>" />
|
964 |
-
<input type="hidden" id="play_butt_hov_url" name="play_butt_hov_url" value="<?php echo $row->play_butt_hov_url; ?>" />
|
965 |
-
<input type="hidden" id="paus_butt_url" name="paus_butt_url" value="<?php echo $row->paus_butt_url; ?>" />
|
966 |
-
<input type="hidden" id="paus_butt_hov_url" name="paus_butt_hov_url" value="<?php echo $row->paus_butt_hov_url; ?>" />
|
967 |
-
<p class="description"><?php _e('You can use default Play and Pause buttons or to upload custom icons.', WDS()->prefix); ?></p>
|
968 |
-
</span>
|
969 |
-
<span class="wd-group" id="play_pause_butt_style">
|
970 |
-
<label class="wd-label" for="pp_butt_style"><?php _e('Play / Pause buttons style:', WDS()->prefix); ?></label>
|
971 |
-
<div style="display: table-cell; vertical-align: middle; background-color: rgba(229, 229, 229, 0.62); text-align: center;">
|
972 |
-
<i id="wds_play_style" class="fa fa-play" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
973 |
-
<i id="wds_paus_style" class="fa fa-pause" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
974 |
-
</div>
|
975 |
-
</span>
|
976 |
-
<span class="wd-group" id="play_pause_butt_cust">
|
977 |
-
<label class="wd-label"><?php _e('Upload buttons images:', WDS()->prefix); ?></label>
|
978 |
-
<div style="display: table;">
|
979 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
980 |
-
<?php
|
981 |
-
if (!$spider_uploader) {
|
982 |
-
?>
|
983 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('play_but', event, false); return false;" value="<?php _e('Play Button', WDS()->prefix); ?>" />
|
984 |
-
<?php
|
985 |
-
}
|
986 |
-
else {
|
987 |
-
?>
|
988 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'play_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Play Button', WDS()->prefix); ?>" onclick="return false;">
|
989 |
-
<?php _e('Play Button', WDS()->prefix); ?>
|
990 |
-
</a>
|
991 |
-
<?php
|
992 |
-
}
|
993 |
-
?>
|
994 |
-
<?php
|
995 |
-
if (!$spider_uploader) {
|
996 |
-
?>
|
997 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('play_hov_but', event, false); return false;" value="<?php _e('Play Button Hover', WDS()->prefix); ?>" />
|
998 |
-
<?php
|
999 |
-
}
|
1000 |
-
else {
|
1001 |
-
?>
|
1002 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'play_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Play Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
1003 |
-
<?php _e('Play Button Hover', WDS()->prefix); ?>
|
1004 |
-
</a>
|
1005 |
-
<?php
|
1006 |
-
}
|
1007 |
-
?>
|
1008 |
-
</div>
|
1009 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
1010 |
-
<?php
|
1011 |
-
if (!$spider_uploader) {
|
1012 |
-
?>
|
1013 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('paus_but', event, false); return false;" value="<?php _e('Pause Button', WDS()->prefix); ?>" />
|
1014 |
-
<?php
|
1015 |
-
}
|
1016 |
-
else {
|
1017 |
-
?>
|
1018 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'paus_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Pause Button', WDS()->prefix); ?>" onclick="return false;">
|
1019 |
-
<?php _e('Pause Button', WDS()->prefix); ?>
|
1020 |
-
</a>
|
1021 |
-
<?php
|
1022 |
-
}
|
1023 |
-
?>
|
1024 |
-
<?php
|
1025 |
-
if (!$spider_uploader) {
|
1026 |
-
?>
|
1027 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('paus_hov_but', event, false); return false;" value="<?php _e('Pause Button Hover', WDS()->prefix); ?>" />
|
1028 |
-
<?php
|
1029 |
-
}
|
1030 |
-
else {
|
1031 |
-
?>
|
1032 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'paus_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Pause Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
1033 |
-
<?php _e('Pause Button Hover', WDS()->prefix); ?>
|
1034 |
-
</a>
|
1035 |
-
<?php
|
1036 |
-
}
|
1037 |
-
?>
|
1038 |
-
</div>
|
1039 |
-
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="display_block">
|
1040 |
-
<img id="play_butt_img" src="<?php echo $row->play_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1041 |
-
<img id="paus_butt_img" src="<?php echo $row->paus_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1042 |
-
<img id="play_butt_hov_img" src="<?php echo $row->play_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1043 |
-
<img id="paus_butt_hov_img" src="<?php echo $row->paus_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1044 |
-
</div>
|
1045 |
-
<div style="display: table-cell; text-align: center; vertical-align: middle;" class="display_block wds_reverse_cont">
|
1046 |
-
<input type="button" class="button button-small wds_reverse" onclick="wds_change_play_paus_custom_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1047 |
-
</div>
|
1048 |
-
</div>
|
1049 |
-
<script>
|
1050 |
-
var wds_pp_butt_type = [];
|
1051 |
-
var pp_butt_dir = '<?php echo WDS()->plugin_url . '/images/button/'; ?>';
|
1052 |
-
var pp_type_cur_fold = '1';
|
1053 |
-
<?php
|
1054 |
-
$folder_names = scandir(WDS()->plugin_dir . '/images/button');
|
1055 |
-
$butt_cur_fold_name = '';
|
1056 |
-
$butt_cur_type_key = '';
|
1057 |
-
$butt_cur_color_key = '';
|
1058 |
-
$butt_cur_sub_fold_names = array();
|
1059 |
-
array_splice($folder_names, 0, 2);
|
1060 |
-
$flag = FALSE;
|
1061 |
-
foreach ($folder_names as $type_key => $folder_name) {
|
1062 |
-
if (is_dir(WDS()->plugin_dir . '/images/button/' . $folder_name)) {
|
1063 |
-
?>
|
1064 |
-
wds_pp_butt_type["<?php echo $type_key; ?>"] = [];
|
1065 |
-
wds_pp_butt_type["<?php echo $type_key; ?>"]["type_name"] = "<?php echo $folder_name; ?>";
|
1066 |
-
<?php
|
1067 |
-
if ($row->play_butt_url != '') {
|
1068 |
-
/* Getting current button's type folder and color folder.*/
|
1069 |
-
$check_butt_cur_fold = explode('/' , $row->play_butt_url);
|
1070 |
-
if (in_array($folder_name, $check_butt_cur_fold)) {
|
1071 |
-
$flag = TRUE;
|
1072 |
-
$butt_cur_fold_name = $folder_name;
|
1073 |
-
$butt_cur_type_key = $type_key;
|
1074 |
-
$butt_cur_sub_fold_names = scandir(WDS()->plugin_dir . '/images/button/' . $butt_cur_fold_name);
|
1075 |
-
array_splice($butt_cur_sub_fold_names, 0, 2);
|
1076 |
-
?>
|
1077 |
-
pp_type_cur_fold = '<?php echo $butt_cur_type_key;?>';
|
1078 |
-
<?php
|
1079 |
-
}
|
1080 |
-
}
|
1081 |
-
$sub_folder_names = scandir( WDS()->plugin_dir . '/images/button/' . $folder_name);
|
1082 |
-
array_splice($sub_folder_names, 0, 2);
|
1083 |
-
foreach ($sub_folder_names as $color_key => $sub_folder_name) {
|
1084 |
-
if (is_dir(WDS()->plugin_dir . '/images/button/' . $folder_name . '/' . $sub_folder_name)) {
|
1085 |
-
if ($butt_cur_fold_name == $folder_name) {
|
1086 |
-
/* Getting current button's color key.*/
|
1087 |
-
if (in_array($sub_folder_name, $check_butt_cur_fold)) {
|
1088 |
-
$butt_cur_color_key = $color_key;
|
1089 |
-
}
|
1090 |
-
}
|
1091 |
-
?>
|
1092 |
-
wds_pp_butt_type["<?php echo $type_key; ?>"]["<?php echo $color_key; ?>"] = "<?php echo $sub_folder_name; ?>";
|
1093 |
-
<?php
|
1094 |
-
}
|
1095 |
-
}
|
1096 |
-
}
|
1097 |
-
else {
|
1098 |
-
?>
|
1099 |
-
console.log('<?php echo $folder_name . " is not a directory."; ?>');
|
1100 |
-
<?php
|
1101 |
-
}
|
1102 |
-
}
|
1103 |
-
?>
|
1104 |
-
</script>
|
1105 |
-
</span>
|
1106 |
-
<span class="wd-group" id="play_pause_butt_select">
|
1107 |
-
<label class="wd-label" for="right_butt_url"><?php _e('Choose buttons:', WDS()->prefix); ?></label>
|
1108 |
-
<div style="display: table; margin-bottom: 14px;">
|
1109 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block" >
|
1110 |
-
<div style="display: block; width: 122px;" class="default_buttons">
|
1111 |
-
<div class="spider_choose_option" onclick="wds_choose_pp_option(this)">
|
1112 |
-
<div class="spider_option_main_title"><?php _e('Choose group', WDS()->prefix); ?></div>
|
1113 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE"></i></div>
|
1114 |
-
</div>
|
1115 |
-
<div class="spider_pp_options_cont">
|
1116 |
-
<?php
|
1117 |
-
foreach ($folder_names as $type_key => $folder_name) {
|
1118 |
-
?>
|
1119 |
-
<div class="spider_option_cont wds_pp_butt_groups" value="<?php echo $type_key; ?>" <?php echo (($butt_cur_type_key == $type_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_play_paus_butt_type(this)">
|
1120 |
-
<div class="spider_option_cont_title">
|
1121 |
-
<?php _e('Group', WDS()->prefix); echo '-' . ++$type_key; ?>
|
1122 |
-
</div>
|
1123 |
-
<div class="spider_option_cont_img">
|
1124 |
-
<img class="pp_src_top_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1125 |
-
<img class="pp_src_top_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1126 |
-
<img class="pp_src_bottom_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1127 |
-
<img class="pp_src_bottom_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1128 |
-
</div>
|
1129 |
-
</div>
|
1130 |
-
<?php
|
1131 |
-
}
|
1132 |
-
if (!$flag) {
|
1133 |
-
/* Folder doesn't exist.*/
|
1134 |
-
?>
|
1135 |
-
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1136 |
-
<?php
|
1137 |
-
}
|
1138 |
-
?>
|
1139 |
-
</div>
|
1140 |
-
</div>
|
1141 |
-
</div>
|
1142 |
-
<div style="display:table-cell;vertical-align: middle;" class="display_block">
|
1143 |
-
<div style="display: block; width: 122px; margin-left: 12px;" class="default_buttons">
|
1144 |
-
<div class="spider_choose_option" onclick="<?php echo (WDS()->is_free ? 'alert(\'' . addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) . '\')' : 'wds_choose_pp_option_color(this)'); ?>">
|
1145 |
-
<div class="spider_option_main_title"><?php _e('Choose color', WDS()->prefix); ?></div>
|
1146 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color:#1E8CBE"></i></div>
|
1147 |
-
</div>
|
1148 |
-
<div class="spider_pp_options_color_cont">
|
1149 |
-
<?php
|
1150 |
-
foreach ($butt_cur_sub_fold_names as $color_key => $cur_sub_fold_name) {
|
1151 |
-
?>
|
1152 |
-
<div class="spider_option_cont wds_pp_butt_col_groups" value="<?php echo $color_key; ?>" <?php echo (($butt_cur_color_key == $color_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_play_paus_butt_color(this, <?php echo $cur_type_key; ?>)">
|
1153 |
-
<div class="spider_option_cont_title" >
|
1154 |
-
<?php _e('Color', WDS()->prefix); echo '-' . ++$color_key; ?>
|
1155 |
-
</div>
|
1156 |
-
<div class="spider_option_cont_img">
|
1157 |
-
<img class="pp_src_col_top_left" style="display:inline-block; width: 14px; height: 14px;" />
|
1158 |
-
<img class="pp_src_col_top_right" style="display:inline-block; width: 14px; height: 14px;" />
|
1159 |
-
<img class="pp_src_col_bottom_left" style="display:inline-block; width: 14px; height: 14px;" />
|
1160 |
-
<img class="pp_src_col_bottom_right" style="display:inline-block; width: 14px; height: 14px;" />
|
1161 |
-
</div>
|
1162 |
-
</div>
|
1163 |
-
<?php
|
1164 |
-
}
|
1165 |
-
if (!$flag) {
|
1166 |
-
/* Folder doesn't exist.*/
|
1167 |
-
?>
|
1168 |
-
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1169 |
-
<?php
|
1170 |
-
}
|
1171 |
-
?>
|
1172 |
-
</div>
|
1173 |
-
</div>
|
1174 |
-
</div>
|
1175 |
-
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;" class="display_block">
|
1176 |
-
<div style=" display: block; margin-left: 12px; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="play_buttons_cont">
|
1177 |
-
<img id="pp_butt_img_play" src="<?php echo $row->play_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1178 |
-
<img id="pp_butt_img_paus" src="<?php echo $row->paus_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1179 |
-
<img id="pp_butt_hov_img_play" src="<?php echo $row->play_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1180 |
-
<img id="pp_butt_hov_img_paus" src="<?php echo $row->paus_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1181 |
-
</div>
|
1182 |
-
</div>
|
1183 |
-
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
1184 |
-
<input type="button" class="button button-small wds_reverse" onclick="change_play_paus_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1185 |
-
</div>
|
1186 |
-
</div>
|
1187 |
-
<p class="description"><?php _e('Choose the type and color of navigation buttons.', WDS()->prefix); ?></p>
|
1188 |
-
</span>
|
1189 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="play_pause_butt_size">
|
1190 |
-
<label class="wd-label" for="pp_butt_size"><?php _e('Play / Pause button size:', WDS()->prefix); ?></label>
|
1191 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="pp_butt_size" id="pp_butt_size" value="<?php echo $row->pp_butt_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1192 |
-
<p class="description"><?php _e('Set the size of Play and Pause buttons.', WDS()->prefix); ?></p>
|
1193 |
-
</span>
|
1194 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="tr_butts_color">
|
1195 |
-
<label class="wd-label" for="butts_color"><?php _e('Buttons color:', WDS()->prefix); ?></label>
|
1196 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="butts_color" id="butts_color" value="<?php echo $row->butts_color; ?>" class="color" onchange="jQuery('#wds_left_style,#wds_right_style,#wds_play_style,#wds_paus_style').css({color: '#' + jQuery(this).val()})" />
|
1197 |
-
<p class="description"><?php _e('Select a color for the navigation buttons.', WDS()->prefix); ?></p>
|
1198 |
-
</span>
|
1199 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="tr_hover_color">
|
1200 |
-
<label class="wd-label" for="hover_color"><?php _e('Hover color:', WDS()->prefix); ?></label>
|
1201 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="hover_color" id="hover_color" value="<?php echo $row->hover_color; ?>" class="color" />
|
1202 |
-
<p class="description"><?php _e('Select a hover color for the navigation buttons.', WDS()->prefix); ?></p>
|
1203 |
-
</span>
|
1204 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1205 |
-
<label class="wd-label" for="nav_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
1206 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_border_width" id="nav_border_width" value="<?php echo $row->nav_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1207 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="nav_border_style" id="nav_border_style">
|
1208 |
-
<?php
|
1209 |
-
foreach ($border_styles as $key => $border_style) {
|
1210 |
-
?>
|
1211 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->nav_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
1212 |
-
<?php
|
1213 |
-
}
|
1214 |
-
?>
|
1215 |
-
</select>
|
1216 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_border_color" id="nav_border_color" value="<?php echo $row->nav_border_color; ?>" class="color" />
|
1217 |
-
<p class="description"><?php _e('Select the type, size and the color of border for the navigation buttons.', WDS()->prefix); ?></p>
|
1218 |
-
</span>
|
1219 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1220 |
-
<label class="wd-label" for="nav_border_radius"><?php _e('Border radius:', WDS()->prefix); ?></label>
|
1221 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_border_radius" id="nav_border_radius" value="<?php echo $row->nav_border_radius; ?>" class="spider_char_input" />
|
1222 |
-
<p class="description"><?php _e('Use CSS type values (e.g. 4px).', WDS()->prefix); ?></p>
|
1223 |
-
</span>
|
1224 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1225 |
-
<label class="wd-label" for="nav_bg_color"><?php _e('Background color:', WDS()->prefix); ?></label>
|
1226 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_bg_color" id="nav_bg_color" value="<?php echo $row->nav_bg_color; ?>" class="color" />
|
1227 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="butts_transparent" id="butts_transparent" value="<?php echo $row->butts_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
1228 |
-
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
1229 |
-
</span>
|
1230 |
-
</div>
|
1231 |
-
</div>
|
1232 |
-
</div>
|
1233 |
-
</div>
|
1234 |
-
</div>
|
1235 |
-
<div class="wds_nav_box wds_nav_bullets_box">
|
1236 |
-
<div class="wd-table">
|
1237 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1238 |
-
<div class="wd-box-section">
|
1239 |
-
<div class="wd-box-content">
|
1240 |
-
<span class="wd-group">
|
1241 |
-
<label class="wd-label"><?php _e('Enable bullets:', WDS()->prefix); ?></label>
|
1242 |
-
<input type="radio" id="enable_bullets1" name="enable_bullets" <?php echo (($row->enable_bullets) ? 'checked="checked"' : ''); ?> value="1" />
|
1243 |
-
<label <?php echo (($row->enable_bullets) ? 'class="selected_color"' : ''); ?> for="enable_bullets1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1244 |
-
<input type="radio" id="enable_bullets0" name="enable_bullets" <?php echo (($row->enable_bullets) ? '' : 'checked="checked"'); ?> value="0" />
|
1245 |
-
<label <?php echo (($row->enable_bullets) ? '' : 'class="selected_color"'); ?> for="enable_bullets0"><?php _e('No', WDS()->prefix); ?></label>
|
1246 |
-
<p class="description"><?php _e('Enable navigation bullets with this option.', WDS()->prefix); ?></p>
|
1247 |
-
</span>
|
1248 |
-
<span class="wd-group">
|
1249 |
-
<label class="wd-label"><?php _e('Show bullets:', WDS()->prefix); ?></label>
|
1250 |
-
<input type="radio" name="bull_hover" id="bull_hover_0" value="0" <?php if ($row->bull_hover == 0) echo 'checked="checked"'; ?> />
|
1251 |
-
<label <?php if ($row->bull_hover == 0) echo 'class="selected_color"'; ?> for="bull_hover_0"><?php _e('On hover', WDS()->prefix); ?></label>
|
1252 |
-
<input type="radio" name="bull_hover" id="bull_hover_1" value="1" <?php if ($row->bull_hover == 1) echo 'checked="checked"'; ?> />
|
1253 |
-
<label <?php if ($row->bull_hover == 1) echo 'class="selected_color"'; ?> for="bull_hover_1"><?php _e('Always', WDS()->prefix); ?></label>
|
1254 |
-
<p class="description"><?php _e('You can display navigation bullets always or only when hovered.', WDS()->prefix); ?></p>
|
1255 |
-
</span>
|
1256 |
-
<span class="wd-group">
|
1257 |
-
<label class="wd-label"><?php _e('Show thumbnail on bullet hover:', WDS()->prefix); ?></label>
|
1258 |
-
<input onClick="wds_enable_disable('', 'tr_thumb_size', 'show_thumbnail1')" type="radio" id="show_thumbnail1" name="show_thumbnail" <?php echo (($row->show_thumbnail) ? 'checked="checked"' : ''); ?> value="1" />
|
1259 |
-
<label <?php echo (($row->show_thumbnail) ? 'class="selected_color"' : ''); ?> for="show_thumbnail1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1260 |
-
<input onClick="wds_enable_disable('none', 'tr_thumb_size', 'show_thumbnail0')" type="radio" id="show_thumbnail0" name="show_thumbnail" <?php echo (($row->show_thumbnail) ? '' : 'checked="checked"'); ?> value="0" />
|
1261 |
-
<label for="show_thumbnail0"><?php _e('No', WDS()->prefix); ?></label>
|
1262 |
-
<p class="description"></p>
|
1263 |
-
</span>
|
1264 |
-
<span class="wd-group" id="tr_thumb_size">
|
1265 |
-
<label class="wd-label" for="wds_thumb_size"><?php _e('Thumbnail Size:', WDS()->prefix); ?></label>
|
1266 |
-
<input onblur="wds_check_number()" type="text" id="wds_thumb_size" name="wds_thumb_size" size="15" value="<?php echo $row->thumb_size; ?>" style="display:inline-block;" />
|
1267 |
-
<p class="description"><?php _e('Value must be between 0 to 1.', WDS()->prefix); ?></p>
|
1268 |
-
</span>
|
1269 |
-
<span class="wd-group">
|
1270 |
-
<label class="wd-label"><?php _e('Position:', WDS()->prefix); ?></label>
|
1271 |
-
<select class="select_icon select_icon_320" name="bull_position" id="bull_position">
|
1272 |
-
<option value="top" <?php echo (($row->bull_position == "top") ? 'selected="selected"' : ''); ?>><?php _e('Top', WDS()->prefix); ?></option>
|
1273 |
-
<option value="bottom" <?php echo (($row->bull_position == "bottom") ? 'selected="selected"' : ''); ?>><?php _e('Bottom', WDS()->prefix); ?></option>
|
1274 |
-
</select>
|
1275 |
-
<p class="description"><?php _e('Select the position for navigation bullets.', WDS()->prefix); ?></p>
|
1276 |
-
</span>
|
1277 |
-
<span class="wd-group">
|
1278 |
-
<label class="wd-label"><?php _e('Bullets type:', WDS()->prefix); ?></label>
|
1279 |
-
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_our" value="our" <?php if ($row->bull_butt_img_or_not == 'our') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('our')" />
|
1280 |
-
<label <?php if ($row->bull_butt_img_or_not == 'our') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_our"><?php _e('Default', WDS()->prefix); ?></label>
|
1281 |
-
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_cust" value="custom" <?php if ($row->bull_butt_img_or_not == 'custom') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('custom')" />
|
1282 |
-
<label <?php if ($row->bull_butt_img_or_not == 'custom') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_cust"><?php _e('Custom', WDS()->prefix); ?></label>
|
1283 |
-
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_stl" value="style" <?php if ($row->bull_butt_img_or_not == 'style') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('style')" />
|
1284 |
-
<label <?php if ($row->bull_butt_img_or_not == 'style') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_stl"><?php _e('Styled', WDS()->prefix); ?></label>
|
1285 |
-
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_txt" value="text" <?php if ($row->bull_butt_img_or_not == 'text') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('text')" />
|
1286 |
-
<label <?php if ($row->bull_butt_img_or_not == 'text') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_txt"><?php _e('Text', WDS()->prefix); ?></label>
|
1287 |
-
<input type="hidden" id="bullets_img_main_url" name="bullets_img_main_url" value="<?php echo $row->bullets_img_main_url; ?>" />
|
1288 |
-
<input type="hidden" id="bullets_img_hov_url" name="bullets_img_hov_url" value="<?php echo $row->bullets_img_hov_url; ?>" />
|
1289 |
-
<p class="description"></p>
|
1290 |
-
</span>
|
1291 |
-
<span class="wd-group" id="bullets_style">
|
1292 |
-
<label class="wd-label" for="bull_style"><?php _e('Bullet style:', WDS()->prefix); ?></label>
|
1293 |
-
<div style="display: table;">
|
1294 |
-
<div style="display: table-cell; vertical-align: middle;">
|
1295 |
-
<select class="select_icon select_icon_320" name="bull_style" id="bull_style" onchange="change_bull_style(jQuery(this).val())">
|
1296 |
-
<?php
|
1297 |
-
foreach ($bull_styles as $key => $bull_style) {
|
1298 |
-
?>
|
1299 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->bull_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $bull_style; ?></option>
|
1300 |
-
<?php
|
1301 |
-
}
|
1302 |
-
?>
|
1303 |
-
</select>
|
1304 |
-
</div>
|
1305 |
-
<div style="display: table-cell; vertical-align: middle; background-color: rgba(229, 229, 229, 0.62); text-align: center;">
|
1306 |
-
<i id="wds_act_bull_style" class="fa <?php echo str_replace('-o', '', $row->bull_style); ?>" style="color: #<?php echo $row->bull_act_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
1307 |
-
<i id="wds_deact_bull_style" class="fa <?php echo $row->bull_style; ?>" style="color: #<?php echo $row->bull_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
1308 |
-
</div>
|
1309 |
-
</div>
|
1310 |
-
<p class="description"><?php _e('Choose the style for the bullets.', WDS()->prefix); ?></p>
|
1311 |
-
<script>
|
1312 |
-
var wds_blt_img_type = [];
|
1313 |
-
var blt_img_dir = '<?php echo WDS()->plugin_url . '/images/bullet/'; ?>';
|
1314 |
-
var bull_type_cur_fold = '1';
|
1315 |
-
<?php
|
1316 |
-
$folder_names = scandir(WDS()->plugin_dir . '/images/bullet');
|
1317 |
-
$bull_cur_fold_name = '';
|
1318 |
-
$bull_cur_type_key = '';
|
1319 |
-
$bull_cur_color_key = '';
|
1320 |
-
$bull_cur_sub_fold_names = array();
|
1321 |
-
array_splice($folder_names, 0, 2);
|
1322 |
-
$flag = FALSE;
|
1323 |
-
foreach ($folder_names as $type_key => $folder_name) {
|
1324 |
-
if (is_dir(WDS()->plugin_dir . '/images/bullet/' . $folder_name)) {
|
1325 |
-
?>
|
1326 |
-
wds_blt_img_type["<?php echo $type_key; ?>"] = [];
|
1327 |
-
wds_blt_img_type["<?php echo $type_key; ?>"]["type_name"] = "<?php echo $folder_name; ?>";
|
1328 |
-
<?php
|
1329 |
-
if ($row->bullets_img_main_url != '') {
|
1330 |
-
/* Getting current button's type folder and color folder.*/
|
1331 |
-
$check_bull_cur_fold = explode('/' , $row->bullets_img_main_url);
|
1332 |
-
if (in_array($folder_name, $check_bull_cur_fold)) {
|
1333 |
-
$flag = TRUE;
|
1334 |
-
$bull_cur_fold_name = $folder_name;
|
1335 |
-
$bull_cur_type_key = $type_key;
|
1336 |
-
$bull_cur_sub_fold_names = scandir(WDS()->plugin_dir . '/images/bullet/' . $bull_cur_fold_name);
|
1337 |
-
array_splice($bull_cur_sub_fold_names, 0, 2);
|
1338 |
-
?>
|
1339 |
-
bull_type_cur_fold = '<?php echo $bull_cur_type_key;?>';
|
1340 |
-
<?php
|
1341 |
-
}
|
1342 |
-
}
|
1343 |
-
$sub_folder_names = scandir(WDS()->plugin_dir . '/images/bullet/' . $folder_name);
|
1344 |
-
array_splice($sub_folder_names, 0, 2);
|
1345 |
-
foreach ($sub_folder_names as $color_key => $sub_folder_name) {
|
1346 |
-
if (is_dir(WDS()->plugin_dir . '/images/bullet/' . $folder_name . '/' . $sub_folder_name)) {
|
1347 |
-
if ($bull_cur_fold_name == $folder_name) {
|
1348 |
-
/* Getting current button's color key.*/
|
1349 |
-
if (in_array($sub_folder_name, $check_bull_cur_fold)) {
|
1350 |
-
$bull_cur_color_key = $color_key;
|
1351 |
-
}
|
1352 |
-
}
|
1353 |
-
?>
|
1354 |
-
wds_blt_img_type["<?php echo $type_key; ?>"]["<?php echo $color_key; ?>"] = "<?php echo $sub_folder_name; ?>";
|
1355 |
-
<?php
|
1356 |
-
}
|
1357 |
-
}
|
1358 |
-
}
|
1359 |
-
else {
|
1360 |
-
?>
|
1361 |
-
console.log('<?php echo $folder_name . " is not a directory."; ?>');
|
1362 |
-
<?php
|
1363 |
-
}
|
1364 |
-
}
|
1365 |
-
?>
|
1366 |
-
</script>
|
1367 |
-
</span>
|
1368 |
-
<span class="wd-group" id="bullets_images_cust">
|
1369 |
-
<label class="wd-label"><?php _e('Upload buttons images:', WDS()->prefix); ?></label>
|
1370 |
-
<div style="display: table;">
|
1371 |
-
<div style="display: table-cell; vertical-align: middle;">
|
1372 |
-
<?php
|
1373 |
-
if (!$spider_uploader) {
|
1374 |
-
?>
|
1375 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('bullets_main_but', event, false); return false;" value="<?php _e('Active Button', WDS()->prefix); ?>" />
|
1376 |
-
<?php
|
1377 |
-
}
|
1378 |
-
else {
|
1379 |
-
?>
|
1380 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'bullets_main_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="Add Image" onclick="return false;">
|
1381 |
-
<?php _e('Active Button', WDS()->prefix); ?>
|
1382 |
-
</a>
|
1383 |
-
<?php
|
1384 |
-
}
|
1385 |
-
?>
|
1386 |
-
</div>
|
1387 |
-
<div style="display: table-cell; vertical-align: middle;">
|
1388 |
-
<?php
|
1389 |
-
if (!$spider_uploader) {
|
1390 |
-
?>
|
1391 |
-
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('bullets_hov_but', event, false); return false;" value="<?php _e('Inactive Button', WDS()->prefix); ?>" />
|
1392 |
-
<?php
|
1393 |
-
}
|
1394 |
-
else {
|
1395 |
-
?>
|
1396 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'bullets_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Inactive Button', WDS()->prefix); ?>" onclick="return false;">
|
1397 |
-
<?php _e('Inactive Button', WDS()->prefix); ?>
|
1398 |
-
</a>
|
1399 |
-
<?php
|
1400 |
-
}
|
1401 |
-
?>
|
1402 |
-
</div>
|
1403 |
-
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;">
|
1404 |
-
<img id="bull_img_main" src="<?php echo $row->bullets_img_main_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1405 |
-
<img id="bull_img_hov" src="<?php echo $row->bullets_img_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1406 |
-
</div>
|
1407 |
-
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
1408 |
-
<input type="button" class="button button-small wds_reverse" onclick="wds_change_bullets_custom_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1409 |
-
</div>
|
1410 |
-
</div>
|
1411 |
-
</span>
|
1412 |
-
<span class="wd-group" id="bullets_images_select">
|
1413 |
-
<label class="wd-label" for="bullets_images_url"><?php _e('Choose buttons:', WDS()->prefix); ?></label>
|
1414 |
-
<div style="display: table; margin-bottom: 14px;">
|
1415 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
1416 |
-
<div style="display: block; width: 122px;" class="default_buttons">
|
1417 |
-
<div class="spider_choose_option" onclick="wds_choose_bull_option(this)">
|
1418 |
-
<div class="spider_option_main_title"><?php _e('Choose group', WDS()->prefix); ?></div>
|
1419 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE;"></i></div>
|
1420 |
-
</div>
|
1421 |
-
<div class="spider_bull_options_cont">
|
1422 |
-
<?php
|
1423 |
-
foreach ($folder_names as $type_key => $folder_name) {
|
1424 |
-
?>
|
1425 |
-
<div class="spider_option_cont wds_bull_butt_groups" value="<?php echo $type_key; ?>" <?php echo (($bull_cur_type_key == $type_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_bullets_images_type(this)">
|
1426 |
-
<div class="spider_option_cont_title" style="width: 64%;">
|
1427 |
-
<?php _e('Group', WDS()->prefix); echo '-' . ++$type_key; ?>
|
1428 |
-
</div>
|
1429 |
-
<div class="spider_option_cont_img">
|
1430 |
-
<img class="bull_src_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1431 |
-
<img class="bull_src_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1432 |
-
</div>
|
1433 |
-
</div>
|
1434 |
-
<?php
|
1435 |
-
}
|
1436 |
-
if (!$flag) {
|
1437 |
-
/* Folder doesn't exist.*/
|
1438 |
-
?>
|
1439 |
-
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1440 |
-
<?php
|
1441 |
-
}
|
1442 |
-
?>
|
1443 |
-
</div>
|
1444 |
-
</div>
|
1445 |
-
</div>
|
1446 |
-
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
1447 |
-
<div style="display: block; width: 122px; margin-left: 12px;">
|
1448 |
-
<div class="spider_choose_option" onclick="<?php echo (WDS()->is_free ? 'alert(\'' . addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) . '\')' : 'wds_choose_bull_option_color(this)'); ?>">
|
1449 |
-
<div class="spider_option_main_title"><?php _e('Choose color', WDS()->prefix); ?></div>
|
1450 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE;"></i></div>
|
1451 |
-
</div>
|
1452 |
-
<div class="spider_bull_options_color_cont">
|
1453 |
-
<?php
|
1454 |
-
foreach ($bull_cur_sub_fold_names as $color_key => $cur_sub_fold_name) {
|
1455 |
-
?>
|
1456 |
-
<div class="spider_option_cont wds_bull_butt_col_groups" value="<?php echo $color_key; ?>" <?php echo (($bull_cur_color_key == $color_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_bullets_images_color(this, <?php echo $bull_cur_type_key; ?>)">
|
1457 |
-
<div class="spider_option_cont_title" style="width: 64%;">
|
1458 |
-
<?php echo _e('Color', WDS()->prefix); '-' . ++$color_key; ?>
|
1459 |
-
</div>
|
1460 |
-
<div class="spider_option_cont_img" style="width: 22%;">
|
1461 |
-
<img class="bull_col_src_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1462 |
-
<img class="bull_col_src_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1463 |
-
</div>
|
1464 |
-
</div>
|
1465 |
-
<?php
|
1466 |
-
}
|
1467 |
-
if (!$flag) {
|
1468 |
-
/* Folder doesn't exist.*/
|
1469 |
-
?>
|
1470 |
-
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1471 |
-
<?php
|
1472 |
-
}
|
1473 |
-
?>
|
1474 |
-
</div>
|
1475 |
-
</div>
|
1476 |
-
</div>
|
1477 |
-
<div style="width: 100px; display: table-cell; vertical-align: middle; text-align: center;">
|
1478 |
-
<div style="display: block; vertical-align: middle; margin-left: 12px; text-align: center; background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;">
|
1479 |
-
<img id="bullets_img_main" src="<?php echo $row->bullets_img_main_url; ?>" style="display: inline-block; width: 40px; height: 40px;" />
|
1480 |
-
<img id="bullets_img_hov" src="<?php echo $row->bullets_img_hov_url; ?>" style="display: inline-block; width: 40px; height: 40px;" />
|
1481 |
-
</div>
|
1482 |
-
</div>
|
1483 |
-
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
1484 |
-
<input type="button" class="button button-small wds_reverse" onclick="change_bullets_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1485 |
-
</div>
|
1486 |
-
</div>
|
1487 |
-
<p class="description"><?php _e('Choose the type and color for the bullets.', WDS()->prefix); ?></p>
|
1488 |
-
</span>
|
1489 |
-
</div>
|
1490 |
-
</div>
|
1491 |
-
</div>
|
1492 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1493 |
-
<div class="wd-box-section">
|
1494 |
-
<div class="wd-box-content">
|
1495 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullet_size">
|
1496 |
-
<label class="wd-label" for="bull_size"><?php _e('Size:', WDS()->prefix); ?></label>
|
1497 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_size" id="bull_size" value="<?php echo $row->bull_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1498 |
-
<p class="description"><?php _e('Set the size of navigation bullets.', WDS()->prefix); ?></p>
|
1499 |
-
</span>
|
1500 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1501 |
-
<label class="wd-label" for="bull_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
1502 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_color" id="bull_color" value="<?php echo $row->bull_color; ?>" class="color" onchange="jQuery('#wds_deact_bull_style').css({color: '#' + jQuery(this).val()})" />
|
1503 |
-
<p class="description"><?php _e('Select the color for navigation bullets.', WDS()->prefix); ?></p>
|
1504 |
-
</span>
|
1505 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_act_color">
|
1506 |
-
<label class="wd-label" for="bull_act_color"><?php _e('Active color:', WDS()->prefix); ?></label>
|
1507 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_act_color" id="bull_act_color" value="<?php echo $row->bull_act_color; ?>" class="color" onchange="jQuery('#wds_act_bull_style').css({color: '#' + jQuery(this).val()})" />
|
1508 |
-
<p class="description"><?php _e('Select the color for the bullet, which is currently displaying a corresponding image.', WDS()->prefix); ?></p>
|
1509 |
-
</span>
|
1510 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_back_act_color">
|
1511 |
-
<label class="wd-label" for="bull_back_act_color"><?php _e('Active Background color:', WDS()->prefix); ?></label>
|
1512 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_back_act_color" id="bull_back_act_color" value="<?php echo $row->bull_back_act_color; ?>" class="color" onchange="jQuery('#wds_back_act_bull_text').css({color: '#' + jQuery(this).val()})" />
|
1513 |
-
<p class="description"><?php _e('Select the background color for the bullet, which is currently displaying a corresponding image.', WDS()->prefix); ?></p>
|
1514 |
-
</span>
|
1515 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_back_color">
|
1516 |
-
<label class="wd-label" for="bull_back_color"><?php _e('Background color:', WDS()->prefix); ?></label>
|
1517 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_back_color" id="bull_back_color" value="<?php echo $row->bull_back_color; ?>" class="color" onchange="jQuery('#wds_back_bull_text').css({color: '#' + jQuery(this).val()})" />
|
1518 |
-
<p class="description"><?php _e('Select the background color for the bullet...', WDS()->prefix); ?></p>
|
1519 |
-
</span>
|
1520 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_radius">
|
1521 |
-
<label class="wd-label" for="bull_radius"><?php _e('Border radius:', WDS()->prefix); ?></label>
|
1522 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_radius" id="bull_radius" value="<?php echo $row->bull_radius; ?>" class="spider_char_input" />
|
1523 |
-
<p class="description"><?php _e('Use CSS type values (e.g. 4px).', WDS()->prefix); ?></p>
|
1524 |
-
</span>
|
1525 |
-
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullet_margin">
|
1526 |
-
<label class="wd-label" for="bull_margin"><?php _e('Margin:', WDS()->prefix); ?></label>
|
1527 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_margin" id="bull_margin" value="<?php echo $row->bull_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1528 |
-
<p class="description"><?php _e('Set the margin for navigation bullets.', WDS()->prefix); ?></p>
|
1529 |
-
</span>
|
1530 |
-
</div>
|
1531 |
-
</div>
|
1532 |
-
</div>
|
1533 |
-
</div>
|
1534 |
-
</div>
|
1535 |
-
<div class="wds_nav_box wds_nav_filmstrip_box<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1536 |
-
<div class="wd-table">
|
1537 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1538 |
-
<div class="wd-box-section">
|
1539 |
-
<div class="wd-box-content">
|
1540 |
-
<?php
|
1541 |
-
if ( WDS()->is_free ) {
|
1542 |
-
echo WDW_S_Library::message_id(0, __('This functionality is disabled in free version.', WDS()->prefix), 'error');
|
1543 |
-
}
|
1544 |
-
?>
|
1545 |
-
<span class="wd-group">
|
1546 |
-
<label class="wd-label"><?php _e('Enable filmstrip:', WDS()->prefix); ?></label>
|
1547 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="enable_filmstrip1" name="enable_filmstrip" <?php echo (($row->enable_filmstrip) ? 'checked="checked"' : ''); ?> value="1" />
|
1548 |
-
<label <?php echo (($row->enable_filmstrip) ? 'class="selected_color"' : ''); ?> for="enable_filmstrip1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1549 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="enable_filmstrip0" name="enable_filmstrip" <?php echo (($row->enable_filmstrip) ? '' : 'checked="checked"'); ?> value="0" />
|
1550 |
-
<label <?php echo (($row->enable_filmstrip) ? '' : 'class="selected_color"'); ?> for="enable_filmstrip0"><?php _e('No', WDS()->prefix); ?></label>
|
1551 |
-
<p class="description"><?php _e('Enable this option to display thumbnails of the slides in a filmstrip.', WDS()->prefix); ?></p>
|
1552 |
-
</span>
|
1553 |
-
<span class="wd-group" id="filmstrip_position">
|
1554 |
-
<label class="wd-label"><?php _e('Position:', WDS()->prefix); ?></label>
|
1555 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="film_pos" id="film_pos">
|
1556 |
-
<option value="top" <?php echo (($row->film_pos == "top") ? 'selected="selected"' : ''); ?>><?php _e('Top', WDS()->prefix); ?></option>
|
1557 |
-
<option value="right" <?php echo (($row->film_pos == "right") ? 'selected="selected"' : ''); ?>><?php _e('Right', WDS()->prefix); ?></option>
|
1558 |
-
<option value="bottom" <?php echo (($row->film_pos == "bottom") ? 'selected="selected"' : ''); ?>><?php _e('Bottom', WDS()->prefix); ?></option>
|
1559 |
-
<option value="left" <?php echo (($row->film_pos == "left") ? 'selected="selected"' : ''); ?>><?php _e('Left', WDS()->prefix); ?></option>
|
1560 |
-
</select>
|
1561 |
-
<p class="description"><?php _e('Set the position of the filmstrip.', WDS()->prefix); ?></p>
|
1562 |
-
</span>
|
1563 |
-
<span class="wd-group" id="filmstrip_size">
|
1564 |
-
<label class="wd-label" for="film_thumb_width"><?php _e('Thumbnail dimensions:', WDS()->prefix); ?></label>
|
1565 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_thumb_width" id="film_thumb_width" value="<?php echo $row->film_thumb_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> x
|
1566 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_thumb_height" id="film_thumb_height" value="<?php echo $row->film_thumb_height; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
1567 |
-
<p class="description"><?php _e('Define the maximum width and heigth of the filmstrip thumbnails.', WDS()->prefix); ?></p>
|
1568 |
-
</span>
|
1569 |
-
<span class="wd-group">
|
1570 |
-
<label class="wd-label" for="film_bg_color"><?php _e('Background color:', WDS()->prefix); ?></label>
|
1571 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_bg_color" id="film_bg_color" value="<?php echo $row->film_bg_color; ?>" class="color" />
|
1572 |
-
<p class="description"><?php _e('Select the background color for the filmstrip.', WDS()->prefix); ?></p>
|
1573 |
-
</span>
|
1574 |
-
</div>
|
1575 |
-
</div>
|
1576 |
-
</div>
|
1577 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1578 |
-
<div class="wd-box-section">
|
1579 |
-
<div class="wd-box-content">
|
1580 |
-
<span class="wd-group" id="filmstrip_thumb_margin">
|
1581 |
-
<label class="wd-label" for="film_tmb_margin"><?php _e('Thumbnail separator:', WDS()->prefix); ?></label>
|
1582 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_tmb_margin" id="film_tmb_margin" value="<?php echo $row->film_tmb_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1583 |
-
<p class="description"><?php _e('Set the size of the separator for thumbnails.', WDS()->prefix); ?></p>
|
1584 |
-
</span>
|
1585 |
-
<span class="wd-group">
|
1586 |
-
<label class="wd-label" for="film_act_border_width"><?php _e('Active border:', WDS()->prefix); ?></label>
|
1587 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_act_border_width" id="film_act_border_width" value="<?php echo $row->film_act_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1588 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="film_act_border_style" id="film_act_border_style">
|
1589 |
-
<?php
|
1590 |
-
foreach ($border_styles as $key => $border_style) {
|
1591 |
-
?>
|
1592 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->film_act_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
1593 |
-
<?php
|
1594 |
-
}
|
1595 |
-
?>
|
1596 |
-
</select>
|
1597 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_act_border_color" id="film_act_border_color" value="<?php echo $row->film_act_border_color; ?>" class="color"/>
|
1598 |
-
<p class="description"><?php _e('The thumbnail for the currently displayed image will have a border. You can set its size, type and color.', WDS()->prefix); ?></p>
|
1599 |
-
</span>
|
1600 |
-
<span class="wd-group">
|
1601 |
-
<label class="wd-label" for="film_dac_transparent"><?php _e('Inactive transparency:', WDS()->prefix); ?></label>
|
1602 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_dac_transparent" id="film_dac_transparent" value="<?php echo $row->film_dac_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
1603 |
-
<p class="description"><?php _e('You can set a transparency level for the inactive filmstrip items which must be between 0 to 100..', WDS()->prefix); ?></p>
|
1604 |
-
</span>
|
1605 |
-
</div>
|
1606 |
-
</div>
|
1607 |
-
</div>
|
1608 |
-
</div>
|
1609 |
-
</div>
|
1610 |
-
<div class="wds_nav_box wds_nav_timer_bar_box">
|
1611 |
-
<div class="wd-table">
|
1612 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1613 |
-
<div class="wd-box-section">
|
1614 |
-
<div class="wd-box-content">
|
1615 |
-
<span class="wd-group">
|
1616 |
-
<label class="wd-label"><?php _e('Enable timer bar:', WDS()->prefix); ?></label>
|
1617 |
-
<input type="radio" id="enable_time_bar1" name="enable_time_bar" <?php echo (($row->enable_time_bar) ? 'checked="checked"' : ''); ?> value="1" />
|
1618 |
-
<label <?php echo (($row->enable_time_bar) ? 'class="selected_color"' : ''); ?> for="enable_time_bar1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1619 |
-
<input type="radio" id="enable_time_bar0" name="enable_time_bar" <?php echo (($row->enable_time_bar) ? '' : 'checked="checked"'); ?> value="0" />
|
1620 |
-
<label <?php echo (($row->enable_time_bar) ? '' : 'class="selected_color"'); ?> for="enable_time_bar0"><?php _e('No', WDS()->prefix); ?></label>
|
1621 |
-
<p class="description"><?php _e('You can add a bar, which displays the time left untill the slider switches to the next slide on autoplay.', WDS()->prefix); ?></p>
|
1622 |
-
</span>
|
1623 |
-
<span class="wd-group">
|
1624 |
-
<label class="wd-label" for="timer_bar_type"><?php _e('Type:', WDS()->prefix); ?></label>
|
1625 |
-
<select class="select_icon select_icon_320" name="timer_bar_type" id="timer_bar_type">
|
1626 |
-
<option value="top" <?php echo (($row->timer_bar_type == "top") ? 'selected="selected"' : ''); ?>><?php _e('Line top', WDS()->prefix); ?></option>
|
1627 |
-
<option value="bottom" <?php echo (($row->timer_bar_type == "bottom") ? 'selected="selected"' : ''); ?>><?php _e('Line Bottom', WDS()->prefix); ?></option>
|
1628 |
-
<option value="circle_top_left" <?php echo (($row->timer_bar_type == "circle_top_left") ? 'selected="selected"' : ''); ?>><?php _e('Circle top left', WDS()->prefix); ?></option>
|
1629 |
-
<option value="circle_top_right" <?php echo (($row->timer_bar_type == "circle_top_right") ? 'selected="selected"' : ''); ?>><?php _e('Circle top right', WDS()->prefix); ?></option>
|
1630 |
-
<option value="circle_bot_left" <?php echo (($row->timer_bar_type == "circle_bot_left") ? 'selected="selected"' : ''); ?>><?php _e('Circle bottom left', WDS()->prefix); ?></option>
|
1631 |
-
<option value="circle_bot_right" <?php echo (($row->timer_bar_type == "circle_bot_right") ? 'selected="selected"' : ''); ?>><?php _e('Circle bottom right', WDS()->prefix); ?></option>
|
1632 |
-
</select>
|
1633 |
-
<p class="description"><?php _e('Choose the type of the timer bar to be used within the slider.', WDS()->prefix); ?></p>
|
1634 |
-
</span>
|
1635 |
-
</div>
|
1636 |
-
</div>
|
1637 |
-
</div>
|
1638 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1639 |
-
<div class="wd-box-section">
|
1640 |
-
<div class="wd-box-content">
|
1641 |
-
<span class="wd-group">
|
1642 |
-
<label class="wd-label" for="timer_bar_size"><?php _e('Size:', WDS()->prefix); ?></label>
|
1643 |
-
<input type="text" name="timer_bar_size" id="timer_bar_size" value="<?php echo $row->timer_bar_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
1644 |
-
<p class="description"><?php _e('Define the height of the timer bar.', WDS()->prefix); ?></p>
|
1645 |
-
</span>
|
1646 |
-
<span class="wd-group">
|
1647 |
-
<label class="wd-label" for="timer_bar_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
1648 |
-
<input type="text" name="timer_bar_color" id="timer_bar_color" value="<?php echo $row->timer_bar_color; ?>" class="color" />
|
1649 |
-
<input type="text" name="timer_bar_transparent" id="timer_bar_transparent" value="<?php echo $row->timer_bar_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
1650 |
-
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
1651 |
-
</span>
|
1652 |
-
</div>
|
1653 |
-
</div>
|
1654 |
-
</div>
|
1655 |
-
</div>
|
1656 |
-
</div>
|
1657 |
-
<div class="wds_nav_box wds_nav_watermark_box">
|
1658 |
-
<div class="wd_updated">
|
1659 |
-
<p><?php _e('Please note that the <b>Fill</b> and <b>Contain</b> options will work fine with <b>Watermark</b> option regardless of the image dimensions, whereas for the <b>Cover</b> option you should have the image identical to the size set in the <b>Dimensions</b> settings.
|
1660 |
-
If you have uploaded the image with another dimension, you will need to resize the image and upload it again.', WDS()->prefix); ?>
|
1661 |
-
</p>
|
1662 |
-
</div>
|
1663 |
-
<div class="wd-table">
|
1664 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1665 |
-
<div class="wd-box-section">
|
1666 |
-
<div class="wd-box-content">
|
1667 |
-
<span class="wd-group" id="tr_built_in_watermark_type">
|
1668 |
-
<label class="wd-label"><?php _e('Watermark type:', WDS()->prefix); ?></label>
|
1669 |
-
<input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_none" value="none" <?php if ($row->built_in_watermark_type == 'none') echo 'checked="checked"'; ?> onClick="wds_built_in_watermark('watermark_type_none')" />
|
1670 |
-
<label <?php if ($row->built_in_watermark_type == 'none') echo 'class="selected_color"'; ?> for="built_in_watermark_type_none"><?php _e('None', WDS()->prefix); ?></label>
|
1671 |
-
<input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_text" value="text" <?php if ($row->built_in_watermark_type == 'text') echo 'checked="checked"'; ?> onClick="wds_built_in_watermark('watermark_type_text')" onchange="preview_built_in_watermark()" />
|
1672 |
-
<label <?php if ($row->built_in_watermark_type == 'text') echo 'class="selected_color"'; ?> for="built_in_watermark_type_text"><?php _e('Text', WDS()->prefix); ?></label>
|
1673 |
-
<input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_image" value="image" <?php if ($row->built_in_watermark_type == 'image') echo 'checked="checked"'; ?> onClick="wds_built_in_watermark('watermark_type_image')" onchange="preview_built_in_watermark()" />
|
1674 |
-
<label <?php if ($row->built_in_watermark_type == 'image') echo 'class="selected_color"'; ?> for="built_in_watermark_type_image"><?php _e('Image', WDS()->prefix); ?></label>
|
1675 |
-
<p class="description"><?php _e('Choose the kind of watermark you would like to use.', WDS()->prefix); ?></p>
|
1676 |
-
</span>
|
1677 |
-
<span class="wd-group" id="tr_built_in_watermark_url">
|
1678 |
-
<label class="wd-label" for="built_in_watermark_url"><?php _e('Watermark url:', WDS()->prefix); ?></label>
|
1679 |
-
<input type="text" id="built_in_watermark_url" name="built_in_watermark_url" style="width: 68%;" value="<?php echo $row->built_in_watermark_url; ?>" style="display:inline-block;" onchange="preview_built_in_watermark()" />
|
1680 |
-
<?php
|
1681 |
-
if (!$spider_uploader) {
|
1682 |
-
?>
|
1683 |
-
<input id="wat_img_add_butt" class="button button-secondary" type="button" onclick="wds_media_uploader('watermark', event, false); return false;" value="<?php _e('Add Image', WDS()->prefix); ?>" />
|
1684 |
-
<?php
|
1685 |
-
}
|
1686 |
-
else {
|
1687 |
-
?>
|
1688 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'watermark', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview" title="<?php _e('Add Image', WDS()->prefix); ?>" onclick="return false;">
|
1689 |
-
<?php _e('Add Image', WDS()->prefix); ?>
|
1690 |
-
</a>
|
1691 |
-
<?php
|
1692 |
-
}
|
1693 |
-
?>
|
1694 |
-
<p class="description"><?php _e('Only .png format is supported.', WDS()->prefix); ?></p>
|
1695 |
-
</span>
|
1696 |
-
<span class="wd-group" id="tr_built_in_watermark_text">
|
1697 |
-
<label class="wd-label" for="built_in_watermark_text"><?php _e('Watermark text:', WDS()->prefix); ?></label>
|
1698 |
-
<input type="text" name="built_in_watermark_text" id="built_in_watermark_text" style="width: 100%;" value="<?php echo $row->built_in_watermark_text; ?>" onchange="preview_built_in_watermark()" onkeypress="preview_built_in_watermark()" />
|
1699 |
-
<p class="description"><?php _e('Write the text of the watermark. It will be displayed on the slides.', WDS()->prefix); ?></p>
|
1700 |
-
</span>
|
1701 |
-
<span class="wd-group" id="tr_built_in_watermark_size">
|
1702 |
-
<label class="wd-label" for="built_in_watermark_size"><?php _e('Watermark size:', WDS()->prefix); ?></label>
|
1703 |
-
<input type="text" name="built_in_watermark_size" id="built_in_watermark_size" value="<?php echo $row->built_in_watermark_size; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" /> %
|
1704 |
-
<p class="description"><?php _e('Enter size of watermark in percents according to image.', WDS()->prefix); ?></p>
|
1705 |
-
</span>
|
1706 |
-
<span class="wd-group" id="tr_built_in_watermark_font_size">
|
1707 |
-
<label class="wd-label" for="built_in_watermark_font_size"><?php _e('Watermark font size:', WDS()->prefix); ?></label>
|
1708 |
-
<input type="text" name="built_in_watermark_font_size" id="built_in_watermark_font_size" value="<?php echo $row->built_in_watermark_font_size; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" onkeypress="return spider_check_isnum(event)" /> px
|
1709 |
-
<p class="description"><?php _e('Specify the font size of the watermark.', WDS()->prefix); ?></p>
|
1710 |
-
</span>
|
1711 |
-
<span class="wd-group" id="tr_built_in_watermark_font">
|
1712 |
-
<label class="wd-label" for="built_in_watermark_font"><?php _e('Watermark font style:', WDS()->prefix); ?></label>
|
1713 |
-
<select class="select_icon select_icon_320" name="built_in_watermark_font" id="built_in_watermark_font" style="width:150px;" onchange="preview_built_in_watermark()">
|
1714 |
-
<?php
|
1715 |
-
foreach ($built_in_watermark_fonts as $watermark_font) {
|
1716 |
-
?>
|
1717 |
-
<option value="<?php echo $watermark_font; ?>" <?php if ($row->built_in_watermark_font == $watermark_font) echo 'selected="selected"'; ?>><?php echo $watermark_font; ?></option>
|
1718 |
-
<?php
|
1719 |
-
}
|
1720 |
-
?>
|
1721 |
-
</select>
|
1722 |
-
<?php
|
1723 |
-
foreach ($built_in_watermark_fonts as $watermark_font) {
|
1724 |
-
?>
|
1725 |
-
<style>
|
1726 |
-
@font-face {
|
1727 |
-
font-family: <?php echo 'wds_' . str_replace('.ttf', '', $watermark_font); ?>;
|
1728 |
-
src: url("<?php echo WDS()->plugin_url . '/fonts/' . $watermark_font; ?>");
|
1729 |
-
}
|
1730 |
-
</style>
|
1731 |
-
<?php
|
1732 |
-
}
|
1733 |
-
?>
|
1734 |
-
<p class="description"><?php _e('Specify the font family for the watermark text.', WDS()->prefix); ?></p>
|
1735 |
-
</span>
|
1736 |
-
<span class="wd-group" id="tr_built_in_watermark_color">
|
1737 |
-
<label class="wd-label" for="built_in_watermark_color"><?php _e('Watermark color:', WDS()->prefix); ?></label>
|
1738 |
-
<input type="text" name="built_in_watermark_color" id="built_in_watermark_color" value="<?php echo $row->built_in_watermark_color; ?>" class="color" onchange="preview_built_in_watermark()" />
|
1739 |
-
<input type="text" name="built_in_watermark_opacity" id="built_in_watermark_opacity" value="<?php echo $row->built_in_watermark_opacity; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" /> %
|
1740 |
-
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
1741 |
-
</span>
|
1742 |
-
<span class="wd-group" id="tr_built_in_watermark_position">
|
1743 |
-
<label class="wd-label"><?php _e('Watermark position:', WDS()->prefix); ?></label>
|
1744 |
-
<table class="wds_position_table">
|
1745 |
-
<tbody>
|
1746 |
-
<tr>
|
1747 |
-
<td class="wds_position_td"><input type="radio" value="top-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1748 |
-
<td class="wds_position_td"><input type="radio" value="top-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1749 |
-
<td class="wds_position_td"><input type="radio" value="top-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1750 |
-
</tr>
|
1751 |
-
<tr>
|
1752 |
-
<td class="wds_position_td"><input type="radio" value="middle-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1753 |
-
<td class="wds_position_td"><input type="radio" value="middle-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1754 |
-
<td class="wds_position_td"><input type="radio" value="middle-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1755 |
-
</tr>
|
1756 |
-
<tr>
|
1757 |
-
<td class="wds_position_td"><input type="radio" value="bottom-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1758 |
-
<td class="wds_position_td"><input type="radio" value="bottom-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1759 |
-
<td class="wds_position_td"><input type="radio" value="bottom-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1760 |
-
</tr>
|
1761 |
-
</tbody>
|
1762 |
-
</table>
|
1763 |
-
<p class="description"><?php _e('Select the position of the watermark.', WDS()->prefix); ?></p>
|
1764 |
-
</span>
|
1765 |
-
</div>
|
1766 |
-
</div>
|
1767 |
-
</div>
|
1768 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1769 |
-
<div class="wd-box-section">
|
1770 |
-
<div class="wd-box-content">
|
1771 |
-
<span class="wd-group">
|
1772 |
-
<input class="button button-secondary" type="button" onclick="spider_set_input_value('task', 'set_watermark'); wds_spider_ajax_save('sliders_form', event);" value="<?php _e('Set Watermark', WDS()->prefix); ?>" />
|
1773 |
-
<input class="button button-secondary" type="button" onclick="spider_set_input_value('task', 'reset_watermark'); wds_spider_ajax_save('sliders_form', event);" value="<?php _e('Reset Watermark', WDS()->prefix); ?>" />
|
1774 |
-
</span>
|
1775 |
-
<span class="wd-group">
|
1776 |
-
<span id="preview_built_in_watermark" style='display:table-cell; background-image:url("<?php echo WDS()->plugin_url . '/images/watermark_preview.jpg'?>"); background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;'></span>
|
1777 |
-
</span>
|
1778 |
-
</span>
|
1779 |
-
</div>
|
1780 |
-
</div>
|
1781 |
-
</div>
|
1782 |
-
</div>
|
1783 |
-
</div>
|
1784 |
-
<div class="wds_nav_box wds_nav_css_box">
|
1785 |
-
<div class="wd-table">
|
1786 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1787 |
-
<div class="wd-box-section">
|
1788 |
-
<div class="wd-box-content">
|
1789 |
-
<span class="wd-group">
|
1790 |
-
<label class="wd-label" for="css"><?php _e('Css:', WDS()->prefix); ?></label>
|
1791 |
-
<p class="description"><?php _e('Write additional CSS code to apply custom styles to the slider.', WDS()->prefix); ?></p>
|
1792 |
-
<textarea id="css" name="css" rows="15" style="width: 50%;"><?php echo htmlspecialchars($row->css); ?></textarea>
|
1793 |
-
</span>
|
1794 |
-
</div>
|
1795 |
-
</div>
|
1796 |
-
</div>
|
1797 |
-
</div>
|
1798 |
-
</div>
|
1799 |
-
<div class="wds_nav_box wds_nav_callbacks_box">
|
1800 |
-
<div class="wd-table">
|
1801 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1802 |
-
<div class="wd-box-section">
|
1803 |
-
<div class="wd-box-content">
|
1804 |
-
<span class="wd-group callback_label_options">
|
1805 |
-
<label class="wd-label" for="css"><?php _e('Add new callback:', WDS()->prefix); ?></label>
|
1806 |
-
<div style="vertical-align: middle;">
|
1807 |
-
<select class="select_icon select_icon_320" name="callback_list" id="callback_list">
|
1808 |
-
<?php
|
1809 |
-
$callback_items = json_decode(htmlspecialchars_decode($row->javascript), TRUE);
|
1810 |
-
foreach ($slider_callbacks as $key => $slider_callback) {
|
1811 |
-
?>
|
1812 |
-
<option value="<?php echo $key; ?>" <?php echo (($row->javascript == $key) ? 'selected="selected"' : ''); ?> <?php echo (isset($callback_items[$key]))? "style='display:none'" : ""; ?>><?php echo $slider_callback; ?></option>
|
1813 |
-
<?php
|
1814 |
-
}
|
1815 |
-
?>
|
1816 |
-
</select>
|
1817 |
-
<button type="button" id="add_callback" class="action_buttons add_callback" onclick="add_new_callback(jQuery(this).closest('span'),jQuery(this).closest('span').find('select'));"></button>
|
1818 |
-
<p class="description"></p>
|
1819 |
-
</div>
|
1820 |
-
</span>
|
1821 |
-
<span class="wd-group">
|
1822 |
-
<?php
|
1823 |
-
if (is_array($callback_items) && count($callback_items)) {
|
1824 |
-
foreach ($callback_items as $key => $callback_item) {
|
1825 |
-
?>
|
1826 |
-
<div class="callbeck-item">
|
1827 |
-
<span class="wd-label"><?php echo $slider_callbacks[$key]; ?></span>
|
1828 |
-
<textarea class="callbeck-textarea" name="<?php echo $key; ?>"><?php echo $callback_item; ?></textarea>
|
1829 |
-
<button type="button" id="remove_callback" class="action_buttons remove_callback" onclick="remove_callback_item(this);"><?php _e('Remove', WDS()->prefix); ?></button>
|
1830 |
-
</div>
|
1831 |
-
<?php
|
1832 |
-
}
|
1833 |
-
}
|
1834 |
-
?>
|
1835 |
-
</span>
|
1836 |
-
</div>
|
1837 |
-
</div>
|
1838 |
-
</div>
|
1839 |
-
</div>
|
1840 |
-
</div>
|
1841 |
-
</div>
|
1842 |
-
</div>
|
1843 |
-
<!--------------Slides tab----------->
|
1844 |
-
<div class="wds_box wds_slides_box meta-box-sortables">
|
1845 |
-
<div class="clear"></div>
|
1846 |
-
<div class="bgcolor wds_tabs wbs_subtab aui-sortable">
|
1847 |
-
<h2 class="titles wd-slides-title"><?php _e('Slides', WDS()->prefix); ?></h2>
|
1848 |
-
<?php
|
1849 |
-
$slides_name = array();
|
1850 |
-
foreach ( $slides_row as $key => $slide_row ) {
|
1851 |
-
$slides_name[$slide_row->id] = $slide_row->title;
|
1852 |
-
?>
|
1853 |
-
<div id="wds_subtab_wrap<?php echo $slide_row->id; ?>" class="wds_subtab_wrap connectedSortable">
|
1854 |
-
<div id="wbs_subtab<?php echo $slide_row->id; ?>" class="tab_link <?php echo (((($id == 0 || !$sub_tab_type) || (strpos($sub_tab_type, 'pr') !== FALSE)) && $key == 0) || ('slide' . $slide_row->id == $sub_tab_type)) ? 'wds_sub_active' : ''; ?>">
|
1855 |
-
<div style='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->thumb_url ?>");background-position: center' class="tab_image" id="wds_tab_image<?php echo $slide_row->id; ?>" data-id="<?php echo $slide_row->id; ?>">
|
1856 |
-
<div class="tab_buttons">
|
1857 |
-
<div class="handle_wrap">
|
1858 |
-
<div class="handle" title="<?php _e('Drag to re-order', WDS()->prefix); ?>"></div>
|
1859 |
-
</div>
|
1860 |
-
<div class="wds_tab_title_wrap">
|
1861 |
-
<input type="text" id="title<?php echo $slide_row->id; ?>" name="title<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->title; ?>" class="wds_tab_title" tab_type="slide<?php echo $slide_row->id; ?>" data-id="<?php echo $slide_row->id; ?>" onchange="wds_set_slide_title('<?php echo $slide_row->id; ?>');" />
|
1862 |
-
</div>
|
1863 |
-
<input type="hidden" name="order<?php echo $slide_row->id; ?>" id="order<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->order; ?>" />
|
1864 |
-
</div>
|
1865 |
-
<div class="overlay" >
|
1866 |
-
<div id="hover_buttons">
|
1867 |
-
<span class="wds_change_thumbnail" onclick="wds_media_uploader_add_slide(event, '<?php echo $slide_row->id; ?>', false); return false;" title="<?php _e('Edit Image', WDS()->prefix); ?>" value="<?php _e('Edit Image', WDS()->prefix); ?>"></span>
|
1868 |
-
<span class="wds_slide_dublicate" title="<?php _e('Duplicate Slide', WDS()->prefix); ?>" onclick="wds_duplicate_slide('<?php echo $slide_row->id; ?>');"></span>
|
1869 |
-
<span class="wds_tab_remove" title="<?php _e('Remove Slide', WDS()->prefix); ?>" onclick="wds_remove_slide('<?php echo $slide_row->id; ?>')"></span>
|
1870 |
-
<input type="hidden" name="order<?php echo $slide_row->id; ?>" id="order<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->order; ?>" />
|
1871 |
-
<span class="wds_clear"></span>
|
1872 |
-
</div>
|
1873 |
-
</div>
|
1874 |
-
</div>
|
1875 |
-
</div>
|
1876 |
-
</div>
|
1877 |
-
<?php
|
1878 |
-
}
|
1879 |
-
?>
|
1880 |
-
<div class="wds_subtab_wrap new_tab_image">
|
1881 |
-
<div class="new_tab_link" onclick="wds_media_uploader_add_slide(event)" title="<?php _e('Add Slide(s)', WDS()->prefix); ?>"><p id="add_slide_text"><?php _e('Add Slide(s)', WDS()->prefix); ?></p></div>
|
1882 |
-
</div>
|
1883 |
-
<div class="wds_clear"></div>
|
1884 |
-
</div>
|
1885 |
-
<table>
|
1886 |
-
<?php
|
1887 |
-
echo $this->wds_textLayerTemplates( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families );
|
1888 |
-
echo $this->wds_imageLayerTemplates( $query_url, $spider_uploader, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles );
|
1889 |
-
echo $this->wds_videoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles );
|
1890 |
-
echo $this->wds_upvideoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles );
|
1891 |
-
echo $this->wds_hotspotLayerTemplate( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $hotp_text_positions );
|
1892 |
-
echo $this->wds_socialLayerTemplate( $social_buttons, $layer_effects_in, $layer_effects_out );
|
1893 |
-
?>
|
1894 |
-
</table>
|
1895 |
-
<?php
|
1896 |
-
foreach ($slides_row as $key => $slide_row) {
|
1897 |
-
$type_video = false;
|
1898 |
-
if( $slide_row->type == 'video' || $slide_row->type == 'EMBED_OEMBED_YOUTUBE_VIDEO'|| $slide_row->type == 'EMBED_OEMBED_VIMEO_VIDEO' ) {
|
1899 |
-
$type_video = true;
|
1900 |
-
}
|
1901 |
-
$fillmode = 'fill';
|
1902 |
-
if ( !empty($row->bg_fit) ) {
|
1903 |
-
if ( $row->bg_fit == 'cover') {
|
1904 |
-
$fillmode = 'fill';
|
1905 |
-
}
|
1906 |
-
if ( $row->bg_fit == '100% 100%') {
|
1907 |
-
$fillmode = 'stretch';
|
1908 |
-
}
|
1909 |
-
if ( $row->bg_fit == 'contain') {
|
1910 |
-
$fillmode = 'fit';
|
1911 |
-
}
|
1912 |
-
}
|
1913 |
-
$slide_row->fillmode = empty($slide_row->fillmode) ? $fillmode : $slide_row->fillmode;
|
1914 |
-
?>
|
1915 |
-
<div class="wds_box <?php echo (((($id == 0 || !$sub_tab_type) || (strpos($sub_tab_type, 'pr') !== FALSE)) && $key == 0) || ('slide' . $slide_row->id == $sub_tab_type)) ? 'wds_sub_active' : ''; ?> wds_slide<?php echo $slide_row->id; ?>">
|
1916 |
-
<input type="hidden" name="type<?php echo $slide_row->id; ?>" id="type<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->type; ?>" />
|
1917 |
-
<input type="hidden" name="wds_video_type<?php echo $slide_row->id; ?>" id="wds_video_type<?php echo $slide_row->id; ?>" />
|
1918 |
-
<table class="ui-sortable<?php echo $slide_row->id; ?>">
|
1919 |
-
<tbody>
|
1920 |
-
<tr>
|
1921 |
-
<td>
|
1922 |
-
<div class="postbox closed">
|
1923 |
-
<button class="button-link handlediv" type="button" aria-expanded="true">
|
1924 |
-
<span class="screen-reader-text"><?php _e('Toggle panel:', WDS()->prefix); ?></span>
|
1925 |
-
<span class="toggle-indicator" aria-hidden="true"></span>
|
1926 |
-
</button>
|
1927 |
-
<h2 class="hndle">
|
1928 |
-
<span><?php _e('Slide options', WDS()->prefix); ?></span>
|
1929 |
-
</h2>
|
1930 |
-
<div class="inside">
|
1931 |
-
<div class="wd-table">
|
1932 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1933 |
-
<div class="wd-box-section">
|
1934 |
-
<div class="wd-box-content">
|
1935 |
-
<div class="wd-group">
|
1936 |
-
<label class="wd-label" for="fillmode<?php echo $slide_row->id; ?>"><?php _e('Fillmode', WDS()->prefix); ?></label>
|
1937 |
-
<div id="wds_fillmode_option-<?php echo $slide_row->id; ?>" class="wds_fillmode_option">
|
1938 |
-
<div style="width: 210px; position: relative;">
|
1939 |
-
<div class="spider_choose_option" onclick="wds_choose_option(this)">
|
1940 |
-
<div class="spider_option_main_title"><?php echo !empty($slide_row->fillmode) ? $slide_row->fillmode : __('Fill', WDS()->prefix); ?></div>
|
1941 |
-
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg"></i></div>
|
1942 |
-
</div>
|
1943 |
-
<div class="spider_options_cont <?php echo ($type_video) ? 'type_video' :'';?>">
|
1944 |
-
<?php foreach ($slider_fillmode_option as $key_option => $option) { ?>
|
1945 |
-
<div class="spider_option_cont <?php echo ((!empty($slide_row->fillmode) && $slide_row->fillmode == $key_option) ? 'selected' : ''); ?>" value="<?php echo $key_option;?>" onclick="wds_change_fillmode_type(this,<?php echo $slide_row->id; ?>)">
|
1946 |
-
<div id="wds_fillmode_option_title-<?php echo $slide_row->id; ?>"class="spider_option_cont_title" data-title="<?php echo $key_option; ?>"><?php echo $option; ?></div>
|
1947 |
-
<div id="wds_fillmode_option_img-<?php echo $slide_row->id; ?>" class="spider_option_cont_img">
|
1948 |
-
<img src="<?php echo WDS()->plugin_url . '/images/fillmode/' . $key_option . '.png'; ?>" />
|
1949 |
-
</div>
|
1950 |
-
</div>
|
1951 |
-
<?php } ?>
|
1952 |
-
</div>
|
1953 |
-
</div>
|
1954 |
-
</div>
|
1955 |
-
<div id="wds_fillmode_preview-<?php echo $slide_row->id; ?>" class="wds_fillmode_preview <?php echo ( empty($slide_row->fillmode) ? 'hide' :'' );?>">
|
1956 |
-
<img src="<?php echo WDS()->plugin_url . '/images/fillmode/' . $slide_row->fillmode. '.png'; ?>">
|
1957 |
-
<input type="hidden" name="fillmode<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->fillmode; ?>">
|
1958 |
-
</div>
|
1959 |
-
<div class="clear"></div>
|
1960 |
-
<p class="description"><?php _e('Change the appearance of the slide background.', WDS()->prefix); ?></p>
|
1961 |
-
</div>
|
1962 |
-
<div class="wd-group">
|
1963 |
-
<label class="wd-label"><?php _e('Published', WDS()->prefix); ?></label>
|
1964 |
-
<input type="radio" id="published<?php echo $slide_row->id; ?>1" name="published<?php echo $slide_row->id; ?>" <?php echo (($slide_row->published) ? 'checked="checked"' : ''); ?> value="1" />
|
1965 |
-
<label <?php echo (($slide_row->published) ? 'class="selected_color"' : ''); ?> for="published<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1966 |
-
<input type="radio" id="published<?php echo $slide_row->id; ?>0" name="published<?php echo $slide_row->id; ?>" <?php echo (($slide_row->published) ? '' : 'checked="checked"'); ?> value="0" />
|
1967 |
-
<label <?php echo (($slide_row->published) ? '' : 'class="selected_color"'); ?> for="published<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1968 |
-
<p class="description"></p>
|
1969 |
-
</div>
|
1970 |
-
</div>
|
1971 |
-
</div>
|
1972 |
-
</div>
|
1973 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1974 |
-
<div class="wd-box-section">
|
1975 |
-
<div class="wd-box-content">
|
1976 |
-
<div class="wd-group" id="controls<?php echo $slide_row->id; ?>" <?php echo $slide_row->type == 'video' ? '' : 'style="display: none;"'; ?>>
|
1977 |
-
<label class="wd-label"><?php _e('Controls', WDS()->prefix); ?></label>
|
1978 |
-
<input type="radio" onClick="wds_enable_disable('', 'autoplay<?php echo $slide_row->id; ?>', 'controls<?php echo $slide_row->id; ?>1')" id="controls<?php echo $slide_row->id; ?>1" name="controls<?php echo $slide_row->id; ?>" <?php echo (($slide_row->link == '1' || empty($slide_row->link) ) ? 'checked="checked"' : ''); ?> value="1" />
|
1979 |
-
<label <?php echo ($slide_row->link == '1' || empty($slide_row->link) ) ? 'class="selected_color"' : ''; ?> for="controls<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1980 |
-
<input type="radio" onClick="wds_enable_disable('none', 'autoplay<?php echo $slide_row->id; ?>', 'controls<?php echo $slide_row->id; ?>0')" id="controls<?php echo $slide_row->id; ?>0" name="controls<?php echo $slide_row->id; ?>" <?php echo (($slide_row->link == "0") ? 'checked="checked"' : '' ); ?> value="0" />
|
1981 |
-
<label <?php echo (($slide_row->link == "0") ? 'class="selected_color"' : '' ); ?> for="controls<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1982 |
-
<p class="description"></p>
|
1983 |
-
</div>
|
1984 |
-
<div class="wd-group" id="autoplay<?php echo $slide_row->id; ?>" <?php echo (($slide_row->type == 'video' && $slide_row->link == '1') || $slide_row->type == 'EMBED_OEMBED_YOUTUBE_VIDEO'|| $slide_row->type == 'EMBED_OEMBED_VIMEO_VIDEO') ? '' : 'style="display: none;"'; ?>>
|
1985 |
-
<label class="wd-label"><?php _e('Autoplay', WDS()->prefix); ?></label>
|
1986 |
-
<input type="radio" id="autoplay<?php echo $slide_row->id; ?>1" name="wds_slide_autoplay<?php echo $slide_row->id; ?>" <?php echo (($slide_row->target_attr_slide) ? 'checked="checked"' : ''); ?> value="1" />
|
1987 |
-
<label <?php echo (($slide_row->target_attr_slide) ? 'class="selected_color"' : ''); ?> for="autoplay<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1988 |
-
<input type="radio" id="autoplay<?php echo $slide_row->id; ?>0" name="wds_slide_autoplay<?php echo $slide_row->id; ?>" <?php echo (($slide_row->target_attr_slide) ? '' : 'checked="checked"'); ?> value="0" />
|
1989 |
-
<label <?php echo (($slide_row->target_attr_slide) ? '' : 'class="selected_color"'); ?> for="autoplay<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1990 |
-
<p class="description"> <b><?php _e('Important! ', WDS()->prefix); ?></b><?php _e('Some browsers only support autoplay in case videos are muted. Therefore, Slider WD will automatically mute them on these browsers to trigger video autoplay.', WDS()->prefix); ?></p>
|
1991 |
-
</div>
|
1992 |
-
<div class="wd-group" id="youtube_rel_video<?php echo $slide_row->id; ?>" <?php echo $slide_row->type == 'EMBED_OEMBED_YOUTUBE_VIDEO' ? '' : 'style="display: none;"'; ?>>
|
1993 |
-
<label class="wd-label"><?php _e('Youtube related video', WDS()->prefix); ?></label>
|
1994 |
-
<input type="radio" id="youtube_rel_video<?php echo $slide_row->id; ?>1" name="youtube_rel_video<?php echo $slide_row->id; ?>" <?php echo (($slide_row->youtube_rel_video) ? 'checked="checked"' : ''); ?> value="1" />
|
1995 |
-
<label <?php echo (($slide_row->youtube_rel_video) ? 'class="selected_color"' : ''); ?> for="youtube_rel_video<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1996 |
-
<input type="radio" id="youtube_rel_video<?php echo $slide_row->id; ?>0" name="youtube_rel_video<?php echo $slide_row->id; ?>" <?php echo (($slide_row->youtube_rel_video) ? '' : 'checked="checked"'); ?> value="0" />
|
1997 |
-
<label <?php echo (($slide_row->youtube_rel_video) ? '' : 'class="selected_color"'); ?> for="youtube_rel_video<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1998 |
-
<p class="description"></p>
|
1999 |
-
</div>
|
2000 |
-
<div class="wd-group" id="video_loop<?php echo $slide_row->id; ?>" <?php echo ($slide_row->type == 'video' || $slide_row->type == 'EMBED_OEMBED_VIMEO_VIDEO') ? '' : 'style="display: none;"'; ?>>
|
2001 |
-
<label class="wd-label"><?php _e('Video Loop', WDS()->prefix); ?></label>
|
2002 |
-
<input type="radio" id="video_loop<?php echo $slide_row->id; ?>1" name="video_loop<?php echo $slide_row->id; ?>" <?php echo (($slide_row->video_loop) ? 'checked="checked"' : ''); ?> value="1" />
|
2003 |
-
<label <?php echo (($slide_row->video_loop) ? 'class="selected_color"' : ''); ?> for="video_loop<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
2004 |
-
<input type="radio" id="video_loop<?php echo $slide_row->id; ?>0" name="video_loop<?php echo $slide_row->id; ?>" <?php echo (($slide_row->video_loop) ? '' : 'checked="checked"'); ?> value="0" />
|
2005 |
-
<label <?php echo (($slide_row->video_loop) ? '' : 'class="selected_color"'); ?> for="video_loop<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
2006 |
-
<p class="description"></p>
|
2007 |
-
</div>
|
2008 |
-
<div class="wd-group" id="trlink<?php echo $slide_row->id; ?>" <?php echo $slide_row->type == 'image' ? '' : 'style="display: none;"'; ?>>
|
2009 |
-
<label class="wd-label" for="link<?php echo $slide_row->id; ?>"><?php _e('Link the slide to', WDS()->prefix); ?></label>
|
2010 |
-
<input class="wds_external_link" id="link<?php echo $slide_row->id; ?>" type="text" value="<?php echo $slide_row->link; ?>" name="link<?php echo $slide_row->id; ?>" />
|
2011 |
-
<input id="target_attr_slide<?php echo $slide_row->id; ?>" type="checkbox" name="target_attr_slide<?php echo $slide_row->id; ?>" <?php echo (($slide_row->target_attr_slide) ? 'checked="checked"' : ''); ?> value="1" /><label for="target_attr_slide<?php echo $slide_row->id; ?>"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
2012 |
-
<p class="description"><?php _e('You can add a URL, to which the users will be redirected upon clicking on the slide. Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
2013 |
-
</div>
|
2014 |
-
<div class="wd-group">
|
2015 |
-
<?php
|
2016 |
-
if ( !$spider_uploader ) {
|
2017 |
-
?>
|
2018 |
-
<input type="button" class="button button-secondary" id="button_image_url<?php echo $slide_row->id; ?>" onclick="wds_media_uploader('<?php echo 'add_update_thumbnail__' . $slide_row->id; ?>', event, false); return false;" value="<?php _e('Edit thumbnail', WDS()->prefix); ?>" />
|
2019 |
-
<?php
|
2020 |
-
}
|
2021 |
-
else {
|
2022 |
-
?>
|
2023 |
-
<a class="button button-secondary thickbox thickbox-preview" href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_update_thumbnail', 'slide_id' => $slide_row->id, 'TB_iframe' => '1'), $query_url); ?>" title="<?php _e('Edit thumbnail', WDS()->prefix); ?>" onclick="return false;">
|
2024 |
-
<?php _e('Edit thumbnail', WDS()->prefix); ?>
|
2025 |
-
</a>
|
2026 |
-
<?php
|
2027 |
-
}
|
2028 |
-
?>
|
2029 |
-
<p class="description"><?php _e('Note, that thumbnail will be used in the filmstrip only.', WDS()->prefix); ?></p>
|
2030 |
-
</div>
|
2031 |
-
</div>
|
2032 |
-
</div>
|
2033 |
-
</div>
|
2034 |
-
</div>
|
2035 |
-
</div>
|
2036 |
-
</div>
|
2037 |
-
</td>
|
2038 |
-
</tr>
|
2039 |
-
<tr class="bgcolor">
|
2040 |
-
<td colspan="4">
|
2041 |
-
<h2 class="titles wds_slide-title-<?php echo $slide_row->id; ?>"><?php echo $slide_row->title; ?></h2>
|
2042 |
-
<div class="wds-preview-overflow">
|
2043 |
-
<div id="wds_preview_wrapper_<?php echo $slide_row->id; ?>" class="wds_preview_wrapper" style="width: <?php echo $row->width; ?>px; height: <?php echo $row->height; ?>px;">
|
2044 |
-
<div class="wds_preview">
|
2045 |
-
<div id="wds_preview_image<?php echo $slide_row->id; ?>" class="wds_preview_image<?php echo $slide_row->id; ?> wds_preview_image"
|
2046 |
-
style='
|
2047 |
-
width: inherit;
|
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') { ?>
|
2063 |
-
background-size: contain;
|
2064 |
-
background-position: center center;
|
2065 |
-
background-repeat: no-repeat;
|
2066 |
-
<?php } ?>
|
2067 |
-
<?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'stretch') { ?>
|
2068 |
-
background-size: 100% 100%;
|
2069 |
-
background-position: 100% 100%;
|
2070 |
-
background-repeat: no-repeat;
|
2071 |
-
<?php } ?>
|
2072 |
-
<?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'center') { ?>
|
2073 |
-
background-size: unset;
|
2074 |
-
background-position: center center;
|
2075 |
-
background-repeat: no-repeat;
|
2076 |
-
<?php } ?>
|
2077 |
-
<?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'tile') { ?>
|
2078 |
-
background-size: unset;
|
2079 |
-
background-position: unset;
|
2080 |
-
background-repeat: repeat;
|
2081 |
-
<?php } ?>'>
|
2082 |
-
<?php
|
2083 |
-
if ( !empty($layers_row[$slide_row->id]) ) {
|
2084 |
-
foreach ($layers_row[$slide_row->id] as $key => $layer) {
|
2085 |
-
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2086 |
-
$fonts = (isset($layer->google_fonts) && $layer->google_fonts) ? $google_fonts : $font_families;
|
2087 |
-
$hotspot_text_display = (isset($layer->hotspot_text_display) && $layer->hotspot_text_display == 'click') ? 'click' : 'hover';
|
2088 |
-
switch ($layer->type) {
|
2089 |
-
case 'text': {
|
2090 |
-
?>
|
2091 |
-
<span id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" data-type="wds_text_parent" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
|
2092 |
-
style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?><?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>word-break: <?php echo ($layer->image_scale ? 'break-all' : 'normal'); ?>; display: inline-block; position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; color: #<?php echo $layer->color; ?>; font-size: <?php echo $layer->size; ?>px; line-height: 1.25em; font-family: <?php echo $fonts[$layer->ffamily]; ?>; font-weight: <?php echo $layer->fweight; ?>; padding: <?php echo $layer->padding; ?>; background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; text-align: <?php echo $layer->text_alignment; ?>"><?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $layer->text); ?></span>
|
2093 |
-
<?php
|
2094 |
-
break;
|
2095 |
-
}
|
2096 |
-
case 'image': {
|
2097 |
-
?>
|
2098 |
-
<img id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)" src="<?php echo $layer->image_url; ?>"
|
2099 |
-
style="opacity: <?php echo (100 - $layer->imgtransparent) / 100; ?>; filter: Alpha(opacity=<?php echo 100 - $layer->imgtransparent; ?>); position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; " />
|
2100 |
-
<?php
|
2101 |
-
break;
|
2102 |
-
}
|
2103 |
-
case 'video':
|
2104 |
-
case 'upvideo': {
|
2105 |
-
?>
|
2106 |
-
<img id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)" src="<?php echo $layer->type == 'upvideo' ? (wp_get_attachment_url(get_post_thumbnail_id($layer->image_url)) ? wp_get_attachment_url(get_post_thumbnail_id($layer->image_url)) : WDS()->plugin_url . '/images/no-video.png') : $layer->image_url ?>"
|
2107 |
-
style="max-width: <?php echo $layer->image_width; ?>px; width: <?php echo $layer->image_width; ?>px; max-height: <?php echo $layer->image_height; ?>px; height: <?php echo $layer->image_height; ?>px; position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>;" />
|
2108 |
-
<?php
|
2109 |
-
break;
|
2110 |
-
}
|
2111 |
-
case 'social': {
|
2112 |
-
?>
|
2113 |
-
<i id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable fa fa-<?php echo $layer->social_button; ?> ui-draggable" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
|
2114 |
-
style="opacity: <?php echo (100 - $layer->transparent) / 100; ?>; filter: Alpha(opacity=<?php echo 100 - $layer->transparent; ?>); position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; color: #<?php echo $layer->color; ?>; font-size: <?php echo $layer->size; ?>px; line-height: <?php echo $layer->size; ?>px; padding: <?php echo $layer->padding; ?>; "></i>
|
2115 |
-
<?php
|
2116 |
-
break;
|
2117 |
-
}
|
2118 |
-
case 'hotspots': {
|
2119 |
-
?>
|
2120 |
-
<span id="<?php echo $prefix; ?>_div"
|
2121 |
-
data-text-position="<?php echo $layer->hotp_text_position; ?>"
|
2122 |
-
class="hotspot_container wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable"
|
2123 |
-
onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
|
2124 |
-
style="width: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2125 |
-
height: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2126 |
-
z-index: <?php echo $layer->depth; ?>;
|
2127 |
-
position: absolute;
|
2128 |
-
left: <?php echo $layer->left ? $layer->left : 20; ?>px;
|
2129 |
-
top: <?php echo $layer->top ? $layer->top : 20; ?>px;
|
2130 |
-
display: inline-block;">
|
2131 |
-
<span class="wds_layer_<?php echo $layer->id; ?> wds_layer"
|
2132 |
-
data-displaytype="<?php echo $hotspot_text_display; ?>"
|
2133 |
-
id="<?php echo $prefix; ?>_round"
|
2134 |
-
style="top: 0;
|
2135 |
-
left: 0;
|
2136 |
-
width: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2137 |
-
height: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2138 |
-
border-radius: <?php echo $layer->hotp_border_radius ? $layer->hotp_border_radius : '20px'; ?>;
|
2139 |
-
border: <?php echo $layer->hotp_border_width; ?>px <?php echo $layer->hotp_border_style; ?> #<?php echo $layer->hotp_border_color; ?>;
|
2140 |
-
background-color: #<?php echo $layer->hotp_fbgcolor ? $layer->hotp_fbgcolor : "ffffff"; ?>;
|
2141 |
-
z-index: <?php echo $layer->depth; ?>;
|
2142 |
-
position: absolute;
|
2143 |
-
display: block;
|
2144 |
-
opacity: 1 !important;">
|
2145 |
-
</span>
|
2146 |
-
<span class="wds_layer_<?php echo $layer->id; ?>"
|
2147 |
-
id="<?php echo $prefix; ?>_round_effect"
|
2148 |
-
wds_fsize="<?php echo $layer->size; ?>"
|
2149 |
-
style="top: 0;
|
2150 |
-
left: 0;
|
2151 |
-
width: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2152 |
-
height: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2153 |
-
border-radius: <?php echo $layer->hotp_border_radius ? $layer->hotp_border_radius : '20px'; ?>;
|
2154 |
-
border: <?php echo $layer->hotp_border_width; ?>px <?php echo $layer->hotp_border_style; ?> transparent;
|
2155 |
-
background: rgba(0, 0, 0, 0.360784);
|
2156 |
-
position: absolute;
|
2157 |
-
padding: 0;
|
2158 |
-
<?php if (isset($layer->hotspot_animation) && $layer->hotspot_animation) { ?>
|
2159 |
-
animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite ;
|
2160 |
-
-moz-animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite;
|
2161 |
-
-webkit-animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite;
|
2162 |
-
-o-animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite;
|
2163 |
-
<?php } ?>">
|
2164 |
-
</span>
|
2165 |
-
<span id="<?php echo $prefix; ?>"
|
2166 |
-
data-type="hotspot_text"
|
2167 |
-
class="wds_hotspot_text"
|
2168 |
-
style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . 'px; ' : 'white-space: nowrap;'; ?>
|
2169 |
-
<?php echo $layer->image_height ? 'height: ' . $layer->image_height . 'px; ' : ''; ?>
|
2170 |
-
position: absolute;
|
2171 |
-
word-break: <?php echo ($layer->image_scale ?'break-all':'normal'); ?>;
|
2172 |
-
display: none;
|
2173 |
-
z-index: <?php echo $layer->depth; ?>;
|
2174 |
-
color: #<?php echo $layer->color; ?>;
|
2175 |
-
font-size: <?php echo $layer->size; ?>px;
|
2176 |
-
line-height: 1.25em;
|
2177 |
-
font-family: <?php echo $fonts[$layer->ffamily]; ?>;
|
2178 |
-
font-weight: <?php echo $layer->fweight; ?>;
|
2179 |
-
padding: <?php echo $layer->padding; ?>;
|
2180 |
-
background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>;
|
2181 |
-
border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>;
|
2182 |
-
border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; text-align: <?php echo $layer->text_alignment; ?>">
|
2183 |
-
<?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $layer->text); ?>
|
2184 |
-
<span id="<?php echo $prefix; ?>_before" class="hotspot_text_before"></span>
|
2185 |
-
</span>
|
2186 |
-
</span>
|
2187 |
-
<?php
|
2188 |
-
break;
|
2189 |
-
}
|
2190 |
-
default:
|
2191 |
-
break;
|
2192 |
-
}
|
2193 |
-
}
|
2194 |
-
}
|
2195 |
-
?>
|
2196 |
-
</div>
|
2197 |
-
</div>
|
2198 |
-
</div>
|
2199 |
-
</div>
|
2200 |
-
<input type="hidden" id="image_url<?php echo $slide_row->id; ?>" name="image_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->image_url; ?>" />
|
2201 |
-
<input type="hidden" id="thumb_url<?php echo $slide_row->id; ?>" name="thumb_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->thumb_url; ?>" />
|
2202 |
-
<input type="hidden" id="post_id<?php echo $slide_row->id; ?>" name="post_id<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->thumb_url; ?>" />
|
2203 |
-
<input type="hidden" id="video_duration<?php echo $slide_row->id; ?>" name="video_duration<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->video_duration; ?>" />
|
2204 |
-
<input type="hidden" id="att_width<?php echo $slide_row->id; ?>" name="att_width<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->att_width; ?>" />
|
2205 |
-
<input type="hidden" id="att_height<?php echo $slide_row->id; ?>" name="att_height<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->att_height; ?>" />
|
2206 |
-
</td>
|
2207 |
-
</tr>
|
2208 |
-
<tr class="bgcolor">
|
2209 |
-
<td colspan="4">
|
2210 |
-
<h2 class="titles"><?php _e('Layers', WDS()->prefix); ?></h2>
|
2211 |
-
<div id="layer_add_buttons">
|
2212 |
-
<div class="layer_add_buttons_wrap">
|
2213 |
-
<button class="action_buttons add_text_layer button-small<?php echo !$fv ? "" : " wds_free_button"; ?>" onclick="<?php echo $fv ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('text', '" . $slide_row->id . "')"; ?>; return false;"><?php _e('Add Text Layer', WDS()->prefix); ?></button>
|
2214 |
-
</div>
|
2215 |
-
<?php
|
2216 |
-
if (!$spider_uploader) {
|
2217 |
-
?>
|
2218 |
-
<div class="layer_add_buttons_wrap">
|
2219 |
-
<button class="action_buttons add_image_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('image', '" . $slide_row->id . "', '')"; ?>; return false;"><?php _e('Add Image Layer', WDS()->prefix); ?></button>
|
2220 |
-
</div>
|
2221 |
-
<?php
|
2222 |
-
}
|
2223 |
-
else {
|
2224 |
-
?>
|
2225 |
-
<div class="layer_add_buttons_wrap">
|
2226 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_layer', 'slide_id' => $slide_row->id, 'TB_iframe' => '1'), $query_url); ?>" class="action_buttons add_image_layer button-small thickbox thickbox-preview<?php echo !$fv ? "" : " wds_free_button"; ?>" title="<?php _e('Add Image layer', WDS()->prefix); ?>" onclick="return false;">
|
2227 |
-
<?php _e('Add Image layer', WDS()->prefix); ?>
|
2228 |
-
</a>
|
2229 |
-
</div>
|
2230 |
-
<?php
|
2231 |
-
}
|
2232 |
-
?>
|
2233 |
-
<div class="layer_add_buttons_wrap">
|
2234 |
-
<input type="button" class="action_buttons add_video_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" id="button_video_url<?php echo $slide_row->id; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('upvideo', '" . $slide_row->id . "')"; ?>; return false;" value="<?php _e('Add Video Layer', WDS()->prefix); ?>" />
|
2235 |
-
</div>
|
2236 |
-
<div class="layer_add_buttons_wrap">
|
2237 |
-
<input type="button" class="action_buttons add_embed_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_video('" . $slide_row->id . "', 'video_layer')"; ?>" value="<?php _e('Embed Media Layer', WDS()->prefix); ?>" />
|
2238 |
-
</div>
|
2239 |
-
<div class="layer_add_buttons_wrap">
|
2240 |
-
<button class="action_buttons add_social_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('social', '" . $slide_row->id . "')"; ?>; return false;"><?php _e('Social Button Layer', WDS()->prefix); ?></button>
|
2241 |
-
</div>
|
2242 |
-
<div class="layer_add_buttons_wrap">
|
2243 |
-
<button class="action_buttons add_hotspot_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('hotspots', '" . $slide_row->id . "')"; ?>; return false;" ><?php _e('Add Hotspot Layer', WDS()->prefix); ?></button>
|
2244 |
-
</div>
|
2245 |
-
<div class="clear"></div>
|
2246 |
-
</div>
|
2247 |
-
</td>
|
2248 |
-
</tr>
|
2249 |
-
</tbody>
|
2250 |
-
<?php
|
2251 |
-
$layer_ids_string = '';
|
2252 |
-
if ( !empty($layers_row[$slide_row->id]) ) {
|
2253 |
-
foreach ($layers_row[$slide_row->id] as $key => $layer) {
|
2254 |
-
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2255 |
-
?>
|
2256 |
-
<tbody class="layer_table_count" id="<?php echo $prefix; ?>_tbody">
|
2257 |
-
<tr class="wds_layer_head_tr">
|
2258 |
-
<td class="wds_layer_head" colspan="4">
|
2259 |
-
<div class="wds_layer_left">
|
2260 |
-
<div class="layer_handle handle connectedSortable" title="Drag to re-order"></div>
|
2261 |
-
<span class="wds_layer_label" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 0)"><input id="<?php echo $prefix; ?>_title" name="<?php echo $prefix; ?>_title" type="text" class="wds_layer_title" value="<?php echo $layer->title; ?>" title="<?php _e('Layer title', WDS()->prefix); ?>" /></span>
|
2262 |
-
</div>
|
2263 |
-
<div class="wds_layer_right">
|
2264 |
-
<span class="wds_layer_remove" onclick="wds_delete_layer('<?php echo $slide_row->id; ?>', '<?php echo $layer->id; ?>'); " title="Delete layer"></span>
|
2265 |
-
<span class="wds_layer_dublicate" onclick="wds_add_layer('<?php echo $layer->type; ?>', '<?php echo $slide_row->id; ?>', '', 1, 0); wds_duplicate_layer('<?php echo $layer->type; ?>', '<?php echo $slide_row->id; ?>', '<?php echo $layer->id; ?>'); " title="<?php _e('Duplicate layer', WDS()->prefix); ?>"></span>
|
2266 |
-
<input id="<?php echo $prefix; ?>_depth" class="wds_layer_depth spider_int_input" type="text" onchange="change_zindex(this,'<?php echo $prefix; ?>'); " onkeypress="return spider_check_isnum(event); " value="<?php echo $layer->depth; ?>" prefix="<?php echo $prefix; ?>" name="<?php echo $prefix; ?>_depth" title="z-index" />
|
2267 |
-
</div>
|
2268 |
-
<div class="wds_clear"></div>
|
2269 |
-
</td>
|
2270 |
-
</tr>
|
2271 |
-
<?php
|
2272 |
-
switch ($layer->type) {
|
2273 |
-
/*--------text layer----------*/
|
2274 |
-
case 'text': {
|
2275 |
-
echo $this->wds_textLayerTemplates( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $slide_row->id, $prefix, $layer );
|
2276 |
-
break;
|
2277 |
-
}
|
2278 |
-
/*--------image layer----------*/
|
2279 |
-
case 'image': {
|
2280 |
-
echo $this->wds_imageLayerTemplates( $query_url, $spider_uploader, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $slide_row->id, $prefix, $layer );
|
2281 |
-
break;
|
2282 |
-
}
|
2283 |
-
/*--------video layer----------*/
|
2284 |
-
case 'video': {
|
2285 |
-
echo $this->wds_videoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $slide_row->id, $prefix, $layer );
|
2286 |
-
break;
|
2287 |
-
}
|
2288 |
-
case 'upvideo': {
|
2289 |
-
echo $this->wds_upvideoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $slide_row->id, $prefix, $layer );
|
2290 |
-
break;
|
2291 |
-
}
|
2292 |
-
/*--------social button layer----------*/
|
2293 |
-
case 'social': {
|
2294 |
-
echo $this->wds_socialLayerTemplate( $social_buttons, $layer_effects_in, $layer_effects_out, $slide_row->id, $prefix, $layer );
|
2295 |
-
break;
|
2296 |
-
}
|
2297 |
-
/*--------Hotspot layer----------*/
|
2298 |
-
case 'hotspots': {
|
2299 |
-
echo $this->wds_hotspotLayerTemplate( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $hotp_text_positions, $slide_row->id, $prefix, $layer );
|
2300 |
-
break;
|
2301 |
-
}
|
2302 |
-
default:
|
2303 |
-
break;
|
2304 |
-
}
|
2305 |
-
?>
|
2306 |
-
</tbody>
|
2307 |
-
<?php
|
2308 |
-
$layer_ids_string .= $layer->id . ',';
|
2309 |
-
}
|
2310 |
-
}
|
2311 |
-
?>
|
2312 |
-
</table>
|
2313 |
-
<input id="slide<?php echo $slide_row->id; ?>_layer_ids_string" name="slide<?php echo $slide_row->id; ?>_layer_ids_string" type="hidden" value="<?php echo $layer_ids_string; ?>" />
|
2314 |
-
<input id="slide<?php echo $slide_row->id; ?>_del_layer_ids_string" name="slide<?php echo $slide_row->id; ?>_del_layer_ids_string" type="hidden" value="" />
|
2315 |
-
</div>
|
2316 |
-
<script>
|
2317 |
-
jQuery(document).ready(function() {
|
2318 |
-
image_for_next_prev_butt('<?php echo $row->rl_butt_img_or_not; ?>');
|
2319 |
-
image_for_bull_butt('<?php echo $row->bull_butt_img_or_not; ?>');
|
2320 |
-
image_for_play_pause_butt('<?php echo $row->play_paus_butt_img_or_not; ?>');
|
2321 |
-
showhide_for_carousel_fildes('<?php echo $row->carousel; ?>');
|
2322 |
-
wds_whr('width');
|
2323 |
-
wds_drag_layer('<?php echo $slide_row->id; ?>');
|
2324 |
-
wds_layer_weights('<?php echo $slide_row->id; ?>');
|
2325 |
-
<?php
|
2326 |
-
if ( !empty($layers_row[$slide_row->id]) ) {
|
2327 |
-
foreach ($layers_row[$slide_row->id] as $key => $layer) {
|
2328 |
-
if ($layer->type == 'image') {
|
2329 |
-
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2330 |
-
?>
|
2331 |
-
wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>');
|
2332 |
-
<?php
|
2333 |
-
}
|
2334 |
-
if ($layer->type == 'text') {
|
2335 |
-
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2336 |
-
?>
|
2337 |
-
jQuery('#<?php echo $prefix; ?>').hover(
|
2338 |
-
function() {
|
2339 |
-
jQuery(this).css({
|
2340 |
-
color: '#' + jQuery('#<?php echo $prefix; ?>_hover_color_text').val()
|
2341 |
-
});
|
2342 |
-
},
|
2343 |
-
function() {
|
2344 |
-
jQuery(this).css({
|
2345 |
-
color: '#' + jQuery('#<?php echo $prefix; ?>_color').val()
|
2346 |
-
});
|
2347 |
-
}
|
2348 |
-
);
|
2349 |
-
<?php
|
2350 |
-
}
|
2351 |
-
if ($layer->type == 'social') {
|
2352 |
-
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2353 |
-
?>
|
2354 |
-
jQuery('#<?php echo $prefix; ?>').hover(
|
2355 |
-
function() {
|
2356 |
-
jQuery(this).css({
|
2357 |
-
color: '#' + jQuery('#<?php echo $prefix; ?>_hover_color').val()
|
2358 |
-
});
|
2359 |
-
},
|
2360 |
-
function() {
|
2361 |
-
jQuery(this).css({
|
2362 |
-
color: '#' + jQuery('#<?php echo $prefix; ?>_color').val()
|
2363 |
-
});
|
2364 |
-
}
|
2365 |
-
);
|
2366 |
-
<?php
|
2367 |
-
}
|
2368 |
-
}
|
2369 |
-
}
|
2370 |
-
?>
|
2371 |
-
});
|
2372 |
-
</script>
|
2373 |
-
<?php
|
2374 |
-
$slide_ids_string .= $slide_row->id . ',';
|
2375 |
-
}
|
2376 |
-
?>
|
2377 |
-
<script>
|
2378 |
-
jQuery(document).ready(function() {
|
2379 |
-
wds_slider_fillmode_option = <?php echo json_encode($slider_fillmode_option); ?>
|
2380 |
-
});
|
2381 |
-
</script>
|
2382 |
-
</div>
|
2383 |
-
<div class="wds_box wds_howto_box meta-box-sortables">
|
2384 |
-
<div class="clear"></div>
|
2385 |
-
<div class="bgcolor wds_tabs aui-sortable">
|
2386 |
-
<h2 class="titles wd-slides-title"><?php _e('How to use', WDS()->prefix); ?></h2>
|
2387 |
-
<div class="wds_howto_container">
|
2388 |
-
<div class="wds_howto_content">
|
2389 |
-
<h2><?php _e('Shortcode', WDS()->prefix); ?></h2>
|
2390 |
-
<h4><?php _e('Copy and paste this shortcode into your posts or pages:', WDS()->prefix); ?></h4>
|
2391 |
-
<input type="text" class="wds_howto_shortcode" value='[wds id="<?php echo $row->id; ?>"]' onclick="spider_select_value(this)" size="11" readonly="readonly" />
|
2392 |
-
</div>
|
2393 |
-
<div class="wds_howto_content">
|
2394 |
-
<h2><?php _e('Page or Post editor', WDS()->prefix); ?></h2>
|
2395 |
-
<h4><?php _e('Insert it into an existing post with the button:', WDS()->prefix); ?></h4>
|
2396 |
-
<img src="<?php echo WDS()->plugin_url . '/images/sliderwdpng/wp-publish.png'; ?>" alt="<?php _e('Post editor', WDS()->prefix); ?>" />
|
2397 |
-
</div>
|
2398 |
-
<div class="wds_howto_content">
|
2399 |
-
<h2><?php _e('PHP code', WDS()->prefix); ?></h2>
|
2400 |
-
<h4><?php _e('Copy and paste the PHP code into your template file:', WDS()->prefix); ?></h4>
|
2401 |
-
<input type="text" class="wds_howto_phpcode" value="<?php wd_slider(<?php echo $row->id; ?>); ?>" onclick="spider_select_value(this)" size="17" readonly="readonly" />
|
2402 |
-
</div>
|
2403 |
-
</div>
|
2404 |
-
</div>
|
2405 |
-
</div>
|
2406 |
-
</div>
|
2407 |
-
<div class="wds_task_cont">
|
2408 |
-
<input id="task" name="task" type="hidden" value="" />
|
2409 |
-
<input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
|
2410 |
-
<input id="save_as_copy" name="save_as_copy" type="hidden" value="" />
|
2411 |
-
<input id="slide_ids_string" name="slide_ids_string" type="hidden" value="<?php echo $slide_ids_string; ?>" />
|
2412 |
-
<input id="del_slide_ids_string" name="del_slide_ids_string" type="hidden" value="" />
|
2413 |
-
<input id="nav_tab" name="nav_tab" type="hidden" value="<?php echo WDW_S_Library::get('nav_tab', 'global'); ?>" />
|
2414 |
-
<input id="tab" name="tab" type="hidden" value="<?php echo WDW_S_Library::get('tab', 'slides'); ?>" />
|
2415 |
-
<input id="sub_tab" name="sub_tab" type="hidden" value="<?php echo $sub_tab_type; ?>" />
|
2416 |
-
<script>
|
2417 |
-
var spider_uploader_ = <?php echo $spider_uploader; ?>;
|
2418 |
-
</script>
|
2419 |
-
</div>
|
2420 |
-
<script>
|
2421 |
-
var fv = '<?php echo $fv; ?>';
|
2422 |
-
var ajax_url = "<?php echo wp_nonce_url(admin_url('admin-ajax.php'), '', 'nonce_wd'); ?>";
|
2423 |
-
var uploader_href = '<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_update_slide', 'slide_id' => 'slideID', 'layer_id' => 'layerID', 'TB_iframe' => '1'), $query_url); ?>';
|
2424 |
-
var WD_S_URL = '<?php echo WDS()->plugin_url; ?>';
|
2425 |
-
jQuery(document).ready(function() {
|
2426 |
-
wds_onload();
|
2427 |
-
});
|
2428 |
-
jQuery("#sliders_form").on("click", "a", function(e) {
|
2429 |
-
e.preventDefault();
|
2430 |
-
});
|
2431 |
-
jQuery(".wds_tab_title").keyup(function (e) {
|
2432 |
-
var code = e.which;
|
2433 |
-
if (code == 13) {
|
2434 |
-
jQuery(".wds_sub_active .wds_tab_title").blur();
|
2435 |
-
jQuery(".wds_tab_title_wrap").removeClass("wds_sub_active");
|
2436 |
-
}
|
2437 |
-
});
|
2438 |
-
var plugin_dir = '<?php echo WDS()->plugin_url . "/images/sliderwdpng/"; ?>';
|
2439 |
-
</script>
|
2440 |
-
<div class="opacity_add_video wds_opacity_video wds_opacity_export opacity_wp_editor"
|
2441 |
-
onclick="jQuery('.opacity_add_video').hide();
|
2442 |
-
jQuery('.opacity_add_image_url').hide();
|
2443 |
-
jQuery('.wds_exports').hide();
|
2444 |
-
jQuery('.wds_editor').hide();">
|
2445 |
-
</div>
|
2446 |
-
<div class="wds_exports">
|
2447 |
-
<input type="checkbox" name="imagesexport" id="imagesexport" value="<?php _e('Images export', WDS()->prefix); ?>" checked="checked" />
|
2448 |
-
<label for="imagesexport"><?php _e('Check the box to export the images included within sliders', WDS()->prefix); ?></label>
|
2449 |
-
<input class="button-secondary" type="button" id="wds_export_btn" data-href="<?php echo add_query_arg(array('action' => 'WDSExport'), admin_url('admin-ajax.php')); ?>" onclick="spider_set_input_value('task', 'export_on'); wds_spider_ajax_save('sliders_form', event); jQuery('.wds_exports').hide(); jQuery('.wds_opacity_export').hide();" value="<?php _e('Export', WDS()->prefix); ?>" />
|
2450 |
-
<input type="button" class="button-secondary" onclick="jQuery('.wds_exports').hide(); jQuery('.wds_opacity_export').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
2451 |
-
</div>
|
2452 |
-
<div id="add_embed" class="opacity_add_video wds_add_video">
|
2453 |
-
<input type="text" id="embed_url" name="embed_url" value="" />
|
2454 |
-
<input class="button button-primary" type="button" onclick="if (wds_get_embed_info(jQuery('#embed_url').val())) {jQuery('.opacity_add_video').hide();} jQuery('#embed_url').val(''); return false;" value="<?php _e('Add', WDS()->prefix); ?>" />
|
2455 |
-
<input class="button" type="button" onclick="jQuery('.opacity_add_video').hide(); jQuery('#embed_url').val(''); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
2456 |
-
<div class="spider_description">
|
2457 |
-
<?php _e('Enter YouTube, Vimeo, Instagram, Flickr or Dailymotion URL here.', WDS()->prefix); ?>
|
2458 |
-
</div>
|
2459 |
-
<div class="spider_description">
|
2460 |
-
<p><?php _e('<b>Youtube</b> URL example:', WDS()->prefix); ?> <i>https://www.youtube.com/watch?v=xebpM_-GwG0</i></p>
|
2461 |
-
<p><?php _e('<b>Vimeo</b> URL example:', WDS()->prefix); ?> <i>https://vimeo.com/69726973</i></p>
|
2462 |
-
<p><?php _e('<b>Instagram</b> URL example:', WDS()->prefix); ?> <i>https://instagram.com/p/4o65J9QNDm</i>.<br /><?php _e('Add', WDS()->prefix); ?> "<i style="text-decoration:underline;"><?php _e('post', WDS()->prefix); ?></i>" <?php _e('to the end of URL if you want to embed the whole Instagram post, not only its content.', WDS()->prefix); ?></p>
|
2463 |
-
<p><?php _e('<b>Flickr</b> URL example:', WDS()->prefix); ?> <i>https://www.flickr.com/photos/powerpig/18780957662/in/photostream/</i></p>
|
2464 |
-
<p><?php _e('<b>Dailymotion</b> URL example:', WDS()->prefix); ?> <i>http://www.dailymotion.com/video/x2w0jzl_cortoons-tv-tropty-episodio-2_fun</i></p>
|
2465 |
-
</div>
|
2466 |
-
</div>
|
2467 |
-
<div class="wds_editor">
|
2468 |
-
<div class="wds_editor_insert_btn">
|
2469 |
-
<input type="button" class="button button-primary" onclick="wds_insert_html()" value="<?php _e('Insert', WDS()->prefix); ?>" />
|
2470 |
-
<input type="button" class="button button-secondary" onclick="jQuery('.opacity_wp_editor').hide();jQuery('.wds_editor').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
2471 |
-
</div>
|
2472 |
-
<?php
|
2473 |
-
wp_editor('', 'template_text', array('teeny' => TRUE, 'textarea_name' => 'template_text', 'media_buttons' => FALSE, 'textarea_rows' => 5,'quicktags' => FALSE));
|
2474 |
-
?>
|
2475 |
-
<input type="hidden" id="current_prefix" value="" />
|
2476 |
-
</div>
|
2477 |
-
</form>
|
2478 |
-
<?php
|
2479 |
-
}
|
2480 |
-
|
2481 |
-
/**
|
2482 |
-
* Image layer template
|
2483 |
-
*/
|
2484 |
-
function wds_imageLayerTemplates( $query_url, $spider_uploader, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $id=false, $prefix=false, $layer=false ) {
|
2485 |
-
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
2486 |
-
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
2487 |
-
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
2488 |
-
if( $layer == "" ) {
|
2489 |
-
$new_layer = array(
|
2490 |
-
'static_layer' => '0',
|
2491 |
-
'id' => 'pr_%%LayerId%%',
|
2492 |
-
'image_url' => '',
|
2493 |
-
'image_width' => '',
|
2494 |
-
'image_height' => '',
|
2495 |
-
'image_scale' => 'slide' . $id . '_layerpr_%%LayerId%%_image_scale',
|
2496 |
-
'alt' => '',
|
2497 |
-
'link' => '',
|
2498 |
-
'target_attr_layer' => 0,
|
2499 |
-
'left' => '0',
|
2500 |
-
'top' => '0',
|
2501 |
-
'layer_callback_list' => $layer_callbacks,
|
2502 |
-
'link_to_slide' => '',
|
2503 |
-
'imgtransparent' => 0,
|
2504 |
-
'published' => 1,
|
2505 |
-
'start' => 1000,
|
2506 |
-
'layer_effect_in' => 'none',
|
2507 |
-
'duration_eff_in' => 1000,
|
2508 |
-
'infinite_in' => 1,
|
2509 |
-
'end' => 3000,
|
2510 |
-
'layer_effect_out' => 'none',
|
2511 |
-
'duration_eff_out' => 1000,
|
2512 |
-
'infinite_out' => 1,
|
2513 |
-
'border_width' => 2,
|
2514 |
-
'border_style' => $border_styles,
|
2515 |
-
'border_color' => 'FFFFFF',
|
2516 |
-
'border_radius' => '2px',
|
2517 |
-
'shadow' => '',
|
2518 |
-
'add_class' => '',
|
2519 |
-
);
|
2520 |
-
} else {
|
2521 |
-
$new_layer = array(
|
2522 |
-
'static_layer' => $layer->static_layer,
|
2523 |
-
'id' => $layer->id,
|
2524 |
-
'image_url' => $layer->image_url,
|
2525 |
-
'image_width' => $layer->image_width,
|
2526 |
-
'image_height' => $layer->image_height,
|
2527 |
-
'image_scale' => $layer->image_scale,
|
2528 |
-
'alt' => $layer->alt,
|
2529 |
-
'link' => $layer->link,
|
2530 |
-
'target_attr_layer' => $layer->target_attr_layer,
|
2531 |
-
'left' => $layer->left,
|
2532 |
-
'top' => $layer->top,
|
2533 |
-
'layer_callback_list' => $layer->layer_callback_list,
|
2534 |
-
'link_to_slide' => $layer->link_to_slide,
|
2535 |
-
'imgtransparent' => $layer->imgtransparent,
|
2536 |
-
'published' => $layer->published,
|
2537 |
-
'start' => $layer->start,
|
2538 |
-
'layer_effect_in' => $layer->layer_effect_in,
|
2539 |
-
'duration_eff_in' => $layer->duration_eff_in,
|
2540 |
-
'infinite_in' => $layer->infinite_in,
|
2541 |
-
'end' => $layer->end,
|
2542 |
-
'layer_effect_out' => $layer->layer_effect_out,
|
2543 |
-
'duration_eff_out' => $layer->duration_eff_out,
|
2544 |
-
'infinite_out' => $layer->infinite_out,
|
2545 |
-
'border_width' => $layer->border_width,
|
2546 |
-
'border_style' => $layer->border_style,
|
2547 |
-
'border_color' => $layer->border_color,
|
2548 |
-
'border_radius' => $layer->border_radius,
|
2549 |
-
'shadow' => $layer->shadow,
|
2550 |
-
'add_class' => $layer->add_class,
|
2551 |
-
);
|
2552 |
-
}
|
2553 |
-
ob_start();
|
2554 |
-
?>
|
2555 |
-
<tr style="display:none" class="wds_layer_tr wds_imageLayer wds_layer_content">
|
2556 |
-
<td colspan="3">
|
2557 |
-
<div class="wd-table">
|
2558 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
2559 |
-
<div class="wd-box-section">
|
2560 |
-
<div class="wd-box-content">
|
2561 |
-
<span class="wd-group">
|
2562 |
-
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
2563 |
-
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
2564 |
-
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
2565 |
-
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?>/>
|
2566 |
-
<label <?php echo ((!$new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
2567 |
-
<p class="description"></p>
|
2568 |
-
</span>
|
2569 |
-
<span class="wd-group">
|
2570 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
2571 |
-
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
2572 |
-
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
2573 |
-
</span>
|
2574 |
-
<span class="wd-group">
|
2575 |
-
<label class="wd-label" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
2576 |
-
<input type="hidden" name="<?php echo $prefix; ?>_image_url" id="<?php echo $prefix; ?>_image_url" value="<?php echo $new_layer['image_url']; ?>" />
|
2577 |
-
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
2578 |
-
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
2579 |
-
<input id="<?php echo $prefix; ?>_image_scale" type="checkbox" onchange="wds_scale(this, '<?php echo $prefix; ?>')" name="<?php echo $prefix; ?>_image_scale" <?php echo (($new_layer['image_scale']) ? 'checked="checked"' : ''); ?> /><label for="<?php echo $prefix; ?>_image_scale"><?php _e('Scale', WDS()->prefix); ?></label>
|
2580 |
-
<?php
|
2581 |
-
if ( !$spider_uploader ) {
|
2582 |
-
?>
|
2583 |
-
<input type="button" class="button button-secondary" id="button_image_url<?php echo $id; ?>" onclick="wds_add_layer('image', '<?php echo $id; ?>', '<?php echo $new_layer['id']; ?>', '', '', 1); return false;" value="<?php _e('Edit Image', WDS()->prefix); ?>" />
|
2584 |
-
<?php
|
2585 |
-
} else {
|
2586 |
-
?>
|
2587 |
-
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_update_layer', 'slide_id' => $id, 'layer_id' => $new_layer['id'], 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview" title="<?php _e('Edit Image', WDS()->prefix); ?>" onclick="return false;">
|
2588 |
-
<?php _e('Edit Image', WDS()->prefix); ?>
|
2589 |
-
</a>
|
2590 |
-
<?php
|
2591 |
-
}
|
2592 |
-
?>
|
2593 |
-
<p class="description"><?php _e('Set width and height of the image.', WDS()->prefix); ?></p>
|
2594 |
-
</span>
|
2595 |
-
<span class="wd-group">
|
2596 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_alt" title=""><?php _e('Alt:', WDS()->prefix); ?></label>
|
2597 |
-
<input id="<?php echo $prefix; ?>_alt" type="text" class="wds_link" value="<?php echo $new_layer['alt']; ?>" name="<?php echo $prefix; ?>_alt" />
|
2598 |
-
<p class="description"><?php _e('Set the value of alt HTML attribute for this image layer.', WDS()->prefix); ?></p>
|
2599 |
-
</span>
|
2600 |
-
<span class="wd-group">
|
2601 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_link" title=""><?php _e('Link:', WDS()->prefix); ?></label>
|
2602 |
-
<input id="<?php echo $prefix; ?>_link" class="wds_link" type="text" value="<?php echo $new_layer['link']; ?>" name="<?php echo $prefix; ?>_link" />
|
2603 |
-
<input id="<?php echo $prefix; ?>_target_attr_layer" type="checkbox" name="<?php echo $prefix; ?>_target_attr_layer" <?php echo (($new_layer['target_attr_layer']) ? 'checked="checked"' : ''); ?> value="1" /><label for="<?php echo $prefix; ?>_target_attr_layer"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
2604 |
-
<p class="description"><?php _e('Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
2605 |
-
</span>
|
2606 |
-
<span class="wd-group">
|
2607 |
-
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
2608 |
-
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
2609 |
-
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
2610 |
-
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
2611 |
-
</span>
|
2612 |
-
<span class="wd-group">
|
2613 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_imgtransparent" title=""><?php _e('Transparency:', WDS()->prefix); ?></label>
|
2614 |
-
<input id="<?php echo $prefix; ?>_imgtransparent" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({opacity: (100 - jQuery(this).val()) / 100, filter: 'Alpha(opacity=' + 100 - jQuery(this).val() + ')'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['imgtransparent']; ?>" name="<?php echo $prefix; ?>_imgtransparent"> %
|
2615 |
-
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
2616 |
-
</span>
|
2617 |
-
<span class="wd-group">
|
2618 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_callback_list"><?php _e('Add click action:', WDS()->prefix); ?></label>
|
2619 |
-
<select class="select_icon select_icon_320" style="width: 120px;" id="<?php echo $prefix; ?>_layer_callback_list" name="<?php echo $prefix; ?>_layer_callback_list" onchange="wds_show_slides_name('<?php echo $prefix; ?>', jQuery(this).val());">
|
2620 |
-
<?php
|
2621 |
-
foreach ($layer_callbacks as $key => $layer_callback_list) {
|
2622 |
-
?>
|
2623 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['layer_callback_list'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $layer_callback_list; ?></option>
|
2624 |
-
<?php
|
2625 |
-
}
|
2626 |
-
?>
|
2627 |
-
</select>
|
2628 |
-
<p class="description"></p>
|
2629 |
-
</span>
|
2630 |
-
<span class="wd-group">
|
2631 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_link_to_slide" class="link_to_slide" style="<?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>"><?php _e('Slides Name:', WDS()->prefix); ?></label>
|
2632 |
-
<select class="select_icon select_icon_320" style="width: 120px; <?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>" id="<?php echo $prefix; ?>_link_to_slide" name="<?php echo $prefix; ?>_link_to_slide">
|
2633 |
-
<?php
|
2634 |
-
foreach ($slides_name as $key => $slide_name) {
|
2635 |
-
?>
|
2636 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['link_to_slide'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $slide_name; ?></option>
|
2637 |
-
<?php
|
2638 |
-
}
|
2639 |
-
?>
|
2640 |
-
</select>
|
2641 |
-
<p class="description"></p>
|
2642 |
-
</span>
|
2643 |
-
</div>
|
2644 |
-
</div>
|
2645 |
-
</div>
|
2646 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
2647 |
-
<div class="wd-box-section">
|
2648 |
-
<div class="wd-box-content">
|
2649 |
-
<span class="wd-group">
|
2650 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
2651 |
-
<span style="display: inline-block;">
|
2652 |
-
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
2653 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
2654 |
-
</span>
|
2655 |
-
<span style="display: inline-block;">
|
2656 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
2657 |
-
<?php
|
2658 |
-
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
2659 |
-
?>
|
2660 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
2661 |
-
<?php
|
2662 |
-
}
|
2663 |
-
?>
|
2664 |
-
</select>
|
2665 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
2666 |
-
</span>
|
2667 |
-
<span style="display: inline-block;">
|
2668 |
-
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
2669 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
2670 |
-
</span>
|
2671 |
-
<span style="display: inline-block;">
|
2672 |
-
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="<?php _e('0 for play infinte times', WDS()->prefix); ?>" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
2673 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
2674 |
-
</span>
|
2675 |
-
</span>
|
2676 |
-
<span class="wd-group">
|
2677 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
2678 |
-
<span style="display: inline-block;">
|
2679 |
-
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
2680 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
2681 |
-
</span>
|
2682 |
-
<span style="display: inline-block;">
|
2683 |
-
<select class="select_icon select_icon_320 wds_link" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
2684 |
-
<?php
|
2685 |
-
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
2686 |
-
?>
|
2687 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
2688 |
-
<?php
|
2689 |
-
}
|
2690 |
-
?>
|
2691 |
-
</select>
|
2692 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
2693 |
-
</span>
|
2694 |
-
<span style="display: inline-block;">
|
2695 |
-
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
2696 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
2697 |
-
</span>
|
2698 |
-
<span style="display: inline-block;">
|
2699 |
-
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
2700 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
2701 |
-
</span>
|
2702 |
-
</span>
|
2703 |
-
<span class="wd-group">
|
2704 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
2705 |
-
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
2706 |
-
<select class="select_icon" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
2707 |
-
<?php
|
2708 |
-
foreach ($border_styles as $key => $border_style) {
|
2709 |
-
?>
|
2710 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
2711 |
-
<?php
|
2712 |
-
}
|
2713 |
-
?>
|
2714 |
-
</select>
|
2715 |
-
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
2716 |
-
<p class="description"></p>
|
2717 |
-
</span>
|
2718 |
-
<span class="wd-group">
|
2719 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
2720 |
-
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
2721 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
2722 |
-
</span>
|
2723 |
-
<span class="wd-group">
|
2724 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_shadow"><?php _e('Shadow:', WDS()->prefix); ?></label>
|
2725 |
-
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
2726 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
2727 |
-
</span>
|
2728 |
-
<span class="wd-group">
|
2729 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_add_class"><?php _e('Add class:', WDS()->prefix); ?></label>
|
2730 |
-
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
2731 |
-
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
2732 |
-
</span>
|
2733 |
-
</div>
|
2734 |
-
</div>
|
2735 |
-
</div>
|
2736 |
-
</div>
|
2737 |
-
</td>
|
2738 |
-
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="image">
|
2739 |
-
</tr>
|
2740 |
-
<?php
|
2741 |
-
return ob_get_clean();
|
2742 |
-
}
|
2743 |
-
|
2744 |
-
/**
|
2745 |
-
* Text layer template
|
2746 |
-
*/
|
2747 |
-
function wds_textLayerTemplates( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $id=false, $prefix=false, $layer=false ) {
|
2748 |
-
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
2749 |
-
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
2750 |
-
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
2751 |
-
if( $layer == "" ) {
|
2752 |
-
$new_layer = array(
|
2753 |
-
'text' => 'Sample Text',
|
2754 |
-
'static_layer' => '0',
|
2755 |
-
'id' => $id,
|
2756 |
-
'image_width' => '',
|
2757 |
-
'image_height' => '',
|
2758 |
-
'image_scale' => '1',
|
2759 |
-
'size' => '18',
|
2760 |
-
'min_size' => '11',
|
2761 |
-
'color' => 'FFFFFF',
|
2762 |
-
'hover_color_text' => 'FFFFFF',
|
2763 |
-
'align' => '0',
|
2764 |
-
'left' => '0',
|
2765 |
-
'top' => '0',
|
2766 |
-
//'text_position' => '0',
|
2767 |
-
'google_fonts' => $google_fonts,
|
2768 |
-
'ffamily' => $font_families,
|
2769 |
-
'fweight' => '1',
|
2770 |
-
'link' => '',
|
2771 |
-
'target_attr_layer' => 0,
|
2772 |
-
'layer_callback_list' => $layer_callbacks,
|
2773 |
-
'published' => 1,
|
2774 |
-
'start' => 1000,
|
2775 |
-
'layer_effect_in' => 'none',
|
2776 |
-
'duration_eff_in' => 1000,
|
2777 |
-
'infinite_in' => 1,
|
2778 |
-
'end' => 3000,
|
2779 |
-
'layer_effect_out' => 'none',
|
2780 |
-
'duration_eff_out' => 1000,
|
2781 |
-
'infinite_out' => 1,
|
2782 |
-
'padding' => '5px',
|
2783 |
-
'fbgcolor' => '000000',
|
2784 |
-
'transparent' => 50,
|
2785 |
-
'border_width' => 2,
|
2786 |
-
'border_style' => $border_styles,
|
2787 |
-
'border_radius' => '2px',
|
2788 |
-
'border_color' => 'BBBBBB',
|
2789 |
-
'shadow' => '',
|
2790 |
-
'add_class' => '',
|
2791 |
-
'text_alignment' => 'left',
|
2792 |
-
'link_to_slide' => '',
|
2793 |
-
);
|
2794 |
-
} else {
|
2795 |
-
$new_layer = array(
|
2796 |
-
'text' => $layer->text,
|
2797 |
-
'static_layer' => $layer->static_layer,
|
2798 |
-
'id' => $layer->id,
|
2799 |
-
'image_width' => $layer->image_width,
|
2800 |
-
'image_height' => $layer->image_height,
|
2801 |
-
'image_scale' => $layer->image_scale,
|
2802 |
-
'size' => $layer->size,
|
2803 |
-
'min_size' => $layer->min_size,
|
2804 |
-
'color' => $layer->color,
|
2805 |
-
'hover_color_text' => $layer->hover_color_text,
|
2806 |
-
'align' => $layer->align_layer,
|
2807 |
-
'left' => $layer->left,
|
2808 |
-
'top' => $layer->top,
|
2809 |
-
//'text_position' => $layer->text_position,
|
2810 |
-
'google_fonts' => $layer->google_fonts,
|
2811 |
-
'ffamily' => $layer->ffamily,
|
2812 |
-
'fweight' => $layer->fweight,
|
2813 |
-
'link' => $layer->link,
|
2814 |
-
'target_attr_layer' => $layer->target_attr_layer,
|
2815 |
-
'layer_callback_list' => $layer->layer_callback_list,
|
2816 |
-
'published' => $layer->published,
|
2817 |
-
'start' => $layer->start,
|
2818 |
-
'layer_effect_in' => $layer->layer_effect_in,
|
2819 |
-
'duration_eff_in' => $layer->duration_eff_in,
|
2820 |
-
'infinite_in' => $layer->infinite_in,
|
2821 |
-
'end' => $layer->end,
|
2822 |
-
'layer_effect_out' => $layer->layer_effect_out,
|
2823 |
-
'duration_eff_out' => $layer->duration_eff_out,
|
2824 |
-
'infinite_out' => $layer->infinite_out,
|
2825 |
-
'padding' => $layer->padding,
|
2826 |
-
'fbgcolor' => $layer->fbgcolor,
|
2827 |
-
'transparent' => $layer->transparent,
|
2828 |
-
'border_width' => $layer->border_width,
|
2829 |
-
'border_style' => $layer->border_style,
|
2830 |
-
'border_radius' => $layer->border_radius,
|
2831 |
-
'border_color' => $layer->border_color,
|
2832 |
-
'shadow' => $layer->shadow,
|
2833 |
-
'add_class' => $layer->add_class,
|
2834 |
-
'text_alignment' => $layer->text_alignment,
|
2835 |
-
'link_to_slide' => $layer->link_to_slide,
|
2836 |
-
|
2837 |
-
);
|
2838 |
-
}
|
2839 |
-
ob_start();
|
2840 |
-
?>
|
2841 |
-
<tr style="display:none" class="wds_layer_content wds_textLayer">
|
2842 |
-
<td colspan="2">
|
2843 |
-
<div class="wd-table">
|
2844 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
2845 |
-
<div class="wd-box-section">
|
2846 |
-
<div class="wd-box-content">
|
2847 |
-
<span class="wd-group">
|
2848 |
-
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
2849 |
-
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
2850 |
-
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
2851 |
-
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
2852 |
-
<label <?php echo (($new_layer['published']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
2853 |
-
<p class="description"></p>
|
2854 |
-
</span>
|
2855 |
-
|
2856 |
-
<span class="wd-group">
|
2857 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_text"><?php _e('Text:', WDS()->prefix); ?></label>
|
2858 |
-
<textarea id="<?php echo $prefix; ?>_text" class='wds_textarea' name="<?php echo $prefix; ?>_text" onkeyup="wds_new_line('<?php echo $prefix; ?>');"><?php echo $new_layer['text']; ?></textarea>
|
2859 |
-
<input type="button" class="wds_editor_btn button button-secondary" onclick="wds_show_wp_editor('<?php echo $prefix; ?>')" value="<?php _e('Editor', WDS()->prefix); ?>" />
|
2860 |
-
<p class="description"></p>
|
2861 |
-
</span>
|
2862 |
-
<?php
|
2863 |
-
/*
|
2864 |
-
Todo will use this code in other version
|
2865 |
-
<span class="wd-group">
|
2866 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_text_position"><?php _e('Text position:', WDS()->prefix); ?></label>
|
2867 |
-
<input id="<?php echo $prefix; ?>_text_position0" class="wds_text_positio" type="radio" name="<?php echo $prefix;?>_text_position" value="0" onchange="wds_change_text_position('<?php echo $new_layer['id'] ?>','<?php echo $prefix; ?>_text_position0')" <?php echo ( isset($new_layer['text_position']) && $new_layer['text_position'] == 0) ? 'checked="checked"' :''?> />
|
2868 |
-
<label for="<?php echo $prefix; ?>_text_position0"><?php _e('Inside', WDS()->prefix);?></label>
|
2869 |
-
<input id="<?php echo $prefix; ?>_text_position1" class="wds_text_positio" type="radio" name="<?php echo $prefix;?>_text_position" value="1" onchange="wds_change_text_position('<?php echo $new_layer['id'] ?>','<?php echo $prefix; ?>_text_position1')" <?php echo ( isset($new_layer['text_position']) && $new_layer['text_position'] == 1) ? 'checked="checked"' :''?> />
|
2870 |
-
<label for="<?php echo $prefix; ?>_text_position1"><?php _e('Top', WDS()->prefix);?></label>
|
2871 |
-
<input id="<?php echo $prefix; ?>_text_position2" class="wds_text_positio" type="radio" name="<?php echo $prefix;?>_text_position" value="2" onchange="wds_change_text_position('<?php echo $new_layer['id'] ?>','<?php echo $prefix; ?>_text_position2')" <?php echo ( isset($new_layer['text_position']) && $new_layer['text_position'] == 2) ? 'checked="checked"' :''?> />
|
2872 |
-
<label for="<?php echo $prefix; ?>_text_position2"><?php _e('Bottom', WDS()->prefix);?></label>
|
2873 |
-
</span>
|
2874 |
-
*/
|
2875 |
-
?>
|
2876 |
-
<span class="wd-group">
|
2877 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
2878 |
-
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
2879 |
-
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); _e('Leave blank to keep the initial width and height.', WDS()->prefix); ?></p>
|
2880 |
-
</span>
|
2881 |
-
<span class="wd-group">
|
2882 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_image_width"><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
2883 |
-
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onchange="wds_text_width(this, '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
2884 |
-
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onchange="wds_text_height(this, '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> %
|
2885 |
-
<input id="<?php echo $prefix; ?>_image_scale" type="checkbox" onchange="wds_break_word(this, '<?php echo $prefix; ?>')" name="<?php echo $prefix; ?>_image_scale" <?php echo (($new_layer['image_scale']) ? 'checked="checked"' : ''); ?> /><label for="<?php echo $prefix; ?>_image_scale"><?php _e('Break-word', WDS()->prefix); ?></label>
|
2886 |
-
<p class="description"><?php _e('Leave blank to keep the initial width and height. ', WDS()->prefix); ?><?php _e('Break-word may break lines from between any two letters, if their width is larger than dimensions.', WDS()->prefix); ?></p>
|
2887 |
-
</span>
|
2888 |
-
<span class="wd-group">
|
2889 |
-
<label class="wd-label"><?php _e('Position:', WDS()->prefix); ?></label>
|
2890 |
-
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" <?php echo ($new_layer['align']) ? 'disabled="disabled"' : ''; ?> onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
2891 |
-
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
2892 |
-
<input id="<?php echo $prefix; ?>_align_layer" type="checkbox" name="<?php echo $prefix; ?>_align_layer" <?php echo checked(1, $new_layer['align'] ); ?> value="1" onchange="wds_position_left_disabled('<?php echo $prefix; ?>')" /><label for="<?php echo $prefix; ?>_align_layer"><?php _e('Fixed step (left, center, right)', WDS()->prefix); ?></label>
|
2893 |
-
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position. ', WDS()->prefix); ?><?php _e('Fixed step places the layer on one of three positions (left, center, or right), based on its Y position.', WDS()->prefix); ?></p>
|
2894 |
-
</span>
|
2895 |
-
<span class="wd-group">
|
2896 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Size:', WDS()->prefix); ?></label>
|
2897 |
-
<span style="display: inline-block">
|
2898 |
-
<input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['size']; ?>" name="<?php echo $prefix; ?>_size" /> px
|
2899 |
-
</span>
|
2900 |
-
<p class="description"><?php _e('Sets the font size of the text.', WDS()->prefix); ?></p>
|
2901 |
-
</span>
|
2902 |
-
<span class="wd-group">
|
2903 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Minimum font size:', WDS()->prefix); ?></label>
|
2904 |
-
<span style="display: inline-block;">
|
2905 |
-
<input id="<?php echo $prefix; ?>_min_size" class="spider_int_input" type="text" onchange="wds_min_size_validation('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['min_size']; ?>" name="<?php echo $prefix; ?>_min_size" /> px
|
2906 |
-
</span>
|
2907 |
-
<p class="description"><?php _e('Text layer font size shrinks on small screens. Choose the minimum font size, which the text should have.', WDS()->prefix); ?></p>
|
2908 |
-
</span>
|
2909 |
-
<span class="wd-group">
|
2910 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
2911 |
-
<input id="<?php echo $prefix; ?>_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({color: '#' + jQuery(this).val()})" value="<?php echo $new_layer['color']; ?>" name="<?php echo $prefix; ?>_color" />
|
2912 |
-
<p class="description"></p>
|
2913 |
-
</span>
|
2914 |
-
<span class="wd-group">
|
2915 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_hover_color_text"><?php _e('Hover Color:', WDS()->prefix); ?></label>
|
2916 |
-
<input id="<?php echo $prefix; ?>_hover_color_text" class="color" type="text" value="<?php echo $new_layer['hover_color_text']; ?>" name="<?php echo $prefix; ?>_hover_color_text" />
|
2917 |
-
<p class="description"></p>
|
2918 |
-
</span>
|
2919 |
-
<span class="wd-group">
|
2920 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_ffamily"><?php _e('Font family:', WDS()->prefix); ?></label>
|
2921 |
-
<select class="select_icon select_icon_320" style="width: 200px;" id="<?php echo $prefix; ?>_ffamily" onchange="wds_change_fonts('<?php echo $prefix; ?>', 1)" name="<?php echo $prefix; ?>_ffamily">
|
2922 |
-
<?php
|
2923 |
-
$fonts = (isset($new_layer['google_fonts']) && $new_layer['google_fonts']) ? $google_fonts : $font_families;
|
2924 |
-
foreach ($fonts as $key => $font_family) {
|
2925 |
-
?>
|
2926 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['ffamily'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
|
2927 |
-
<?php
|
2928 |
-
}
|
2929 |
-
?>
|
2930 |
-
</select>
|
2931 |
-
<input id="<?php echo $prefix; ?>_google_fonts1" type="radio" name="<?php echo $prefix; ?>_google_fonts" value="1" <?php echo (($new_layer['google_fonts']) ? 'checked="checked"' : ''); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
2932 |
-
<label for="<?php echo $prefix; ?>_google_fonts1"><?php _e('Google fonts', WDS()->prefix); ?></label>
|
2933 |
-
<input id="<?php echo $prefix; ?>_google_fonts0" type="radio" name="<?php echo $prefix;?>_google_fonts" value="0" <?php echo (($new_layer['google_fonts']) ? '' : 'checked="checked"'); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
2934 |
-
<label for="<?php echo $prefix; ?>_google_fonts0"><?php _e('Default', WDS()->prefix); ?></label>
|
2935 |
-
<p class="description"></p>
|
2936 |
-
</span>
|
2937 |
-
<span class="wd-group">
|
2938 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_fweight"><?php _e('Font weight:', WDS()->prefix); ?></label>
|
2939 |
-
<select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_fweight" onchange="jQuery('#<?php echo $prefix; ?>').css({fontWeight: jQuery(this).val()})" name="<?php echo $prefix; ?>_fweight">
|
2940 |
-
<?php
|
2941 |
-
foreach ($font_weights as $key => $fweight) {
|
2942 |
-
?>
|
2943 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['fweight'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $fweight; ?></option>
|
2944 |
-
<?php
|
2945 |
-
}
|
2946 |
-
?>
|
2947 |
-
</select>
|
2948 |
-
<p class="description"></p>
|
2949 |
-
</span>
|
2950 |
-
<span class="wd-group">
|
2951 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_link" title=""><?php _e('Link:', WDS()->prefix); ?></label>
|
2952 |
-
<input class="wds_link" id="<?php echo $prefix; ?>_link" type="text" style="width: 200px;" value="<?php echo $new_layer['link']; ?>" name="<?php echo $prefix; ?>_link" />
|
2953 |
-
<input id="<?php echo $prefix; ?>_target_attr_layer" type="checkbox" name="<?php echo $prefix; ?>_target_attr_layer" <?php echo (($new_layer["target_attr_layer"]) ? 'checked="checked"' : ''); ?> value="1" /><label for="<?php echo $prefix; ?>_target_attr_layer"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
2954 |
-
<p class="description"><?php _e('Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
2955 |
-
</span>
|
2956 |
-
<span class="wd-group">
|
2957 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_callback_list"><?php _e('Add click action:', WDS()->prefix); ?></label>
|
2958 |
-
<select class="select_icon select_icon_320" style="width: 120px;" id="<?php echo $prefix; ?>_layer_callback_list" name="<?php echo $prefix; ?>_layer_callback_list" onchange="wds_show_slides_name('<?php echo $prefix; ?>', jQuery(this).val())">
|
2959 |
-
<?php
|
2960 |
-
foreach ($layer_callbacks as $key => $layer_callback_list) {
|
2961 |
-
?>
|
2962 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['layer_callback_list'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $layer_callback_list; ?></option>
|
2963 |
-
<?php
|
2964 |
-
}
|
2965 |
-
?>
|
2966 |
-
</select>
|
2967 |
-
<p class="description"></p>
|
2968 |
-
</span>
|
2969 |
-
<span class="wd-group">
|
2970 |
-
<label class="wd-label link_to_slide" for="<?php echo $prefix; ?>_link_to_slide" style="<?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>"><?php _e('Slides Name:', WDS()->prefix); ?></label>
|
2971 |
-
<select class="select_icon select_icon_320" style="width: 120px; <?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>" id="<?php echo $prefix; ?>_link_to_slide" name="<?php echo $prefix; ?>_link_to_slide">
|
2972 |
-
<?php
|
2973 |
-
foreach ($slides_name as $key => $slide_name) {
|
2974 |
-
?>
|
2975 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['link_to_slide'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $slide_name; ?></option>
|
2976 |
-
<?php
|
2977 |
-
}
|
2978 |
-
?>
|
2979 |
-
</select>
|
2980 |
-
<p class="description"></p>
|
2981 |
-
</span>
|
2982 |
-
</div>
|
2983 |
-
</div>
|
2984 |
-
</div>
|
2985 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
2986 |
-
<div class="wd-box-section">
|
2987 |
-
<div class="wd-box-content">
|
2988 |
-
<span class="wd-group">
|
2989 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
2990 |
-
<span style="display: inline-block;">
|
2991 |
-
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
2992 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
2993 |
-
</span>
|
2994 |
-
<span style="display: inline-block;">
|
2995 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
2996 |
-
<?php
|
2997 |
-
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
2998 |
-
?>
|
2999 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3000 |
-
<?php
|
3001 |
-
}
|
3002 |
-
?>
|
3003 |
-
</select>
|
3004 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3005 |
-
</span>
|
3006 |
-
<span style="display: inline-block;">
|
3007 |
-
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
3008 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3009 |
-
</span>
|
3010 |
-
<span style="display: inline-block;">
|
3011 |
-
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3012 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3013 |
-
</span>
|
3014 |
-
</span>
|
3015 |
-
<span class="wd-group">
|
3016 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3017 |
-
<span style="display: inline-block;">
|
3018 |
-
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3019 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3020 |
-
</span>
|
3021 |
-
<span style="display: inline-block;">
|
3022 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3023 |
-
<?php
|
3024 |
-
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3025 |
-
?>
|
3026 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3027 |
-
<?php
|
3028 |
-
}
|
3029 |
-
?>
|
3030 |
-
</select>
|
3031 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3032 |
-
</span>
|
3033 |
-
<span style="display: inline-block;">
|
3034 |
-
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out">ms
|
3035 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3036 |
-
</span>
|
3037 |
-
<span style="display: inline-block;">
|
3038 |
-
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3039 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3040 |
-
</span>
|
3041 |
-
</span>
|
3042 |
-
<span class="wd-group">
|
3043 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_padding" title=""><?php _e('Padding:', WDS()->prefix); ?></label>
|
3044 |
-
<input placeholder="5px 10px 10px" id="<?php echo $prefix; ?>_padding" class="spider_char_input" type="text" onchange="document.getElementById('<?php echo $prefix; ?>').style.padding=jQuery(this).val();" value="<?php echo $new_layer['padding']; ?>" name="<?php echo $prefix; ?>_padding">
|
3045 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3046 |
-
</span>
|
3047 |
-
<span class="wd-group">
|
3048 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_fbgcolor"><?php _e('Background Color:', WDS()->prefix); ?></label>
|
3049 |
-
<input id="<?php echo $prefix; ?>_fbgcolor" class="color" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" value="<?php echo $new_layer['fbgcolor']; ?>" name="<?php echo $prefix; ?>_fbgcolor" />
|
3050 |
-
<p class="description"></p>
|
3051 |
-
</span>
|
3052 |
-
<span class="wd-group">
|
3053 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_transparent" title=""><?php _e('Transparency:', WDS()->prefix); ?></label>
|
3054 |
-
<input id="<?php echo $prefix; ?>_transparent" class="spider_int_input" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['transparent']; ?>" name="<?php echo $prefix; ?>_transparent"> %
|
3055 |
-
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
3056 |
-
</span>
|
3057 |
-
<span class="wd-group">
|
3058 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3059 |
-
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3060 |
-
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
3061 |
-
<?php
|
3062 |
-
foreach ($border_styles as $key => $border_style) {
|
3063 |
-
?>
|
3064 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3065 |
-
<?php
|
3066 |
-
}
|
3067 |
-
?>
|
3068 |
-
</select>
|
3069 |
-
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color">
|
3070 |
-
</span>
|
3071 |
-
<span class="wd-group">
|
3072 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
3073 |
-
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3074 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3075 |
-
</span>
|
3076 |
-
<span class="wd-group">
|
3077 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3078 |
-
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3079 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3080 |
-
</span>
|
3081 |
-
<span class="wd-group">
|
3082 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_add_class" title=""><?php _e('Add class:', WDS()->prefix); ?></label>
|
3083 |
-
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3084 |
-
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3085 |
-
</span>
|
3086 |
-
<span class="wd-group">
|
3087 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_text_alignment"><?php _e('Text alignment:', WDS()->prefix); ?></label>
|
3088 |
-
<select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_text_alignment" onchange="jQuery('#<?php echo $prefix; ?>').css({textAlign: jQuery(this).val()})" name="<?php echo $prefix; ?>_text_alignment">
|
3089 |
-
<?php
|
3090 |
-
foreach ($text_alignments as $key => $text_alignment) {
|
3091 |
-
?>
|
3092 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['text_alignment'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $text_alignment; ?></option>
|
3093 |
-
<?php
|
3094 |
-
}
|
3095 |
-
?>
|
3096 |
-
</select>
|
3097 |
-
<p class="description"></p>
|
3098 |
-
</span>
|
3099 |
-
</div>
|
3100 |
-
</div>
|
3101 |
-
</div>
|
3102 |
-
</div>
|
3103 |
-
</td>
|
3104 |
-
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="text">
|
3105 |
-
</tr>
|
3106 |
-
<?php
|
3107 |
-
return ob_get_clean();
|
3108 |
-
}
|
3109 |
-
|
3110 |
-
/**
|
3111 |
-
* Video embed layer template
|
3112 |
-
*/
|
3113 |
-
function wds_videoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $id=false, $prefix=false, $layer=false ) {
|
3114 |
-
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
3115 |
-
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
3116 |
-
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
3117 |
-
if( $layer == "" ) {
|
3118 |
-
$new_layer = array(
|
3119 |
-
'tt' => true,
|
3120 |
-
'videoType' => 'video',
|
3121 |
-
'youtube_rel_layer_video' => '0',
|
3122 |
-
'text' => 'Sample Text',
|
3123 |
-
'static_layer' => '0',
|
3124 |
-
'id' => 'pr_1',
|
3125 |
-
'attr_width' => '300',
|
3126 |
-
'attr_height' => '300',
|
3127 |
-
'image_width' => '300',
|
3128 |
-
'image_height' => '300',
|
3129 |
-
'image_scale' => 'slide' . $id . '_layerpr_1_image_scale',
|
3130 |
-
'color' => 'FFFFFF',
|
3131 |
-
'left' => '0',
|
3132 |
-
'top' => '0',
|
3133 |
-
'link' => '',
|
3134 |
-
'target_attr_layer' => 0,
|
3135 |
-
'published' => 1,
|
3136 |
-
'start' => 1000,
|
3137 |
-
'layer_effect_in' => 'none',
|
3138 |
-
'duration_eff_in' => 1000,
|
3139 |
-
'infinite_in' => 1,
|
3140 |
-
'end' => 3000,
|
3141 |
-
'layer_effect_out' => 'none',
|
3142 |
-
'duration_eff_out' => 1000,
|
3143 |
-
'infinite_out' => 1,
|
3144 |
-
'border_width' => 2,
|
3145 |
-
'border_style' => $border_styles,
|
3146 |
-
'border_radius' => '2px',
|
3147 |
-
'border_color' => 'BBBBBB',
|
3148 |
-
'shadow' => '',
|
3149 |
-
'add_class' => '',
|
3150 |
-
'layer_video_loop' => '',
|
3151 |
-
'image_url' => '',
|
3152 |
-
'alt' => '',
|
3153 |
-
);
|
3154 |
-
}
|
3155 |
-
else {
|
3156 |
-
$new_layer = array(
|
3157 |
-
'videoType' => $layer->type,
|
3158 |
-
'youtube_rel_layer_video' => $layer->youtube_rel_layer_video,
|
3159 |
-
'text' => $layer->text,
|
3160 |
-
'static_layer' => $layer->static_layer,
|
3161 |
-
'id' => $id,
|
3162 |
-
'attr_width' => $layer->attr_width,
|
3163 |
-
'attr_height' => $layer->attr_height,
|
3164 |
-
'image_width' => $layer->image_width,
|
3165 |
-
'image_height' => $layer->image_height,
|
3166 |
-
'image_scale' => $layer->image_scale,
|
3167 |
-
'color' => $layer->color,
|
3168 |
-
'left' => $layer->left,
|
3169 |
-
'top' => $layer->top,
|
3170 |
-
'link' => $layer->link,
|
3171 |
-
'target_attr_layer' => $layer->target_attr_layer,
|
3172 |
-
'published' => $layer->published,
|
3173 |
-
'start' => $layer->start,
|
3174 |
-
'layer_effect_in' => $layer->layer_effect_in,
|
3175 |
-
'duration_eff_in' => $layer->duration_eff_in,
|
3176 |
-
'infinite_in' => $layer->infinite_in,
|
3177 |
-
'end' => $layer->end,
|
3178 |
-
'layer_effect_out' => $layer->layer_effect_out,
|
3179 |
-
'duration_eff_out' => $layer->duration_eff_out,
|
3180 |
-
'infinite_out' => $layer->infinite_out,
|
3181 |
-
'border_width' => $layer->border_width,
|
3182 |
-
'border_style' => $layer->border_style,
|
3183 |
-
'border_radius' => $layer->border_radius,
|
3184 |
-
'border_color' => $layer->border_color,
|
3185 |
-
'shadow' => $layer->shadow,
|
3186 |
-
'add_class' => $layer->add_class,
|
3187 |
-
'layer_video_loop' => $layer->layer_video_loop,
|
3188 |
-
'image_url' => $layer->image_url,
|
3189 |
-
'alt' => $layer->alt,
|
3190 |
-
);
|
3191 |
-
}
|
3192 |
-
ob_start();
|
3193 |
-
?>
|
3194 |
-
<tr style="display:none" class="wds_layer_tr wds_videoLayer wds_layer_content">
|
3195 |
-
<td colspan="3">
|
3196 |
-
<div class="wd-table">
|
3197 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
3198 |
-
<div class="wd-box-section">
|
3199 |
-
<div class="wd-box-content">
|
3200 |
-
<span class="wd-group">
|
3201 |
-
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
3202 |
-
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
3203 |
-
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3204 |
-
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
3205 |
-
<label <?php echo ((!$new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
3206 |
-
<p class="description"></p>
|
3207 |
-
</span>
|
3208 |
-
<span class="wd-group">
|
3209 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
3210 |
-
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
3211 |
-
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
3212 |
-
</span>
|
3213 |
-
<span class="wd-group">
|
3214 |
-
<label class="wd-label" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
3215 |
-
<input type="hidden" id="<?php echo $prefix; ?>_attr_width" name="<?php echo $prefix; ?>_attr_width" value="<?php echo $new_layer['attr_width']; ?>"/>
|
3216 |
-
<input type="hidden" id="<?php echo $prefix; ?>_attr_height" name="<?php echo $prefix; ?>_attr_height" value="<?php echo $new_layer['attr_height']; ?>"/>
|
3217 |
-
<input type="hidden" id="<?php echo $prefix; ?>_layer_post_id" name="<?php echo $prefix; ?>_layer_post_id" value="<?php echo $new_layer['image_url']; ?>" />
|
3218 |
-
<input type="hidden" name="<?php echo $prefix; ?>_alt" id="<?php echo $prefix; ?>_alt" value="<?php echo $new_layer['alt']; ?>"/>
|
3219 |
-
<input type="hidden" name="<?php echo $prefix; ?>_link" id="<?php echo $prefix; ?>_link" value="<?php echo $new_layer['link']; ?>"/>
|
3220 |
-
<input type="hidden" name="<?php echo $prefix; ?>_image_url" id="<?php echo $prefix; ?>_image_url" value="<?php echo $new_layer['image_url']; ?>" />
|
3221 |
-
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
3222 |
-
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
3223 |
-
<p class="description"><?php _e('Set width and height of the video.', WDS()->prefix); ?></p>
|
3224 |
-
</span>
|
3225 |
-
<span class="wd-group">
|
3226 |
-
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
3227 |
-
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
3228 |
-
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
3229 |
-
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
3230 |
-
</span>
|
3231 |
-
<span class="wd-group">
|
3232 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3233 |
-
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3234 |
-
<select class="select_icon" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
3235 |
-
<?php
|
3236 |
-
foreach ($border_styles as $key => $border_style) {
|
3237 |
-
?>
|
3238 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3239 |
-
<?php
|
3240 |
-
}
|
3241 |
-
?>
|
3242 |
-
</select>
|
3243 |
-
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
3244 |
-
<p class="description"></p>
|
3245 |
-
</span>
|
3246 |
-
<span class="wd-group <?php echo $prefix; ?>_autoplay_td" <?php echo ($new_layer['target_attr_layer'] == "0" && $new_layer['videoType'] == 'upvideo') ? 'style="visibility:hidden"' : ''; ?>>
|
3247 |
-
<label class="wd-label"><?php _e('Autoplay:', WDS()->prefix); ?></label>
|
3248 |
-
<input id="<?php echo $prefix; ?>_image_scale1" type="radio" name="<?php echo $prefix; ?>_image_scale" value="on" <?php echo (($new_layer['image_scale'] == "on") ? 'checked="checked"' : ''); ?> />
|
3249 |
-
<label <?php echo (($new_layer['image_scale'] == "on") ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_image_scale1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3250 |
-
<input id="<?php echo $prefix; ?>_image_scale0" type="radio" name="<?php echo $prefix; ?>_image_scale" value="off" <?php echo (($new_layer['image_scale'] == "on") ? '' : 'checked="checked"'); ?> />
|
3251 |
-
<label <?php echo (($new_layer['image_scale'] == "on") ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_image_scale0"><?php _e('No', WDS()->prefix); ?></label>
|
3252 |
-
<p class="description"></p>
|
3253 |
-
</span>
|
3254 |
-
<span class="wd-group" <?php echo ($new_layer['alt'] != 'EMBED_OEMBED_YOUTUBE_VIDEO') ? 'style="visibility:hidden"' : ''; ?>>
|
3255 |
-
<label class="wd-label"><?php _e('Disable youtube related video:', WDS()->prefix); ?></label>
|
3256 |
-
<input id="<?php echo $prefix; ?>_youtube_rel_layer_video1" type="radio" name="<?php echo $prefix; ?>_youtube_rel_layer_video" value="0" <?php echo ((!$new_layer['youtube_rel_layer_video']) ? 'checked="checked"' : ''); ?> />
|
3257 |
-
<label <?php echo ((!$new_layer['youtube_rel_layer_video']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_youtube_rel_layer_video1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3258 |
-
<input id="<?php echo $prefix; ?>_youtube_rel_layer_video0" type="radio" name="<?php echo $prefix; ?>_youtube_rel_layer_video" value="1" <?php echo ((!$new_layer['youtube_rel_layer_video']) ? '' : 'checked="checked"'); ?> />
|
3259 |
-
<label <?php echo (($new_layer['youtube_rel_layer_video']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_youtube_rel_layer_video0"><?php _e('No', WDS()->prefix); ?></label>
|
3260 |
-
<p class="description"></p>
|
3261 |
-
</span>
|
3262 |
-
</div>
|
3263 |
-
</div>
|
3264 |
-
</div>
|
3265 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
3266 |
-
<div class="wd-box-section">
|
3267 |
-
<div class="wd-box-content">
|
3268 |
-
<span class="wd-group">
|
3269 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
3270 |
-
<span style="display: inline-block;">
|
3271 |
-
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
3272 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3273 |
-
</span>
|
3274 |
-
<span style="display: inline-block;">
|
3275 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3276 |
-
<?php
|
3277 |
-
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
3278 |
-
?>
|
3279 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3280 |
-
<?php
|
3281 |
-
}
|
3282 |
-
?>
|
3283 |
-
</select>
|
3284 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3285 |
-
</span>
|
3286 |
-
<span style="display: inline-block;">
|
3287 |
-
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
3288 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3289 |
-
</span>
|
3290 |
-
<span style="display: inline-block;">
|
3291 |
-
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3292 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3293 |
-
</span>
|
3294 |
-
</span>
|
3295 |
-
<span class="wd-group">
|
3296 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3297 |
-
<span style="display: inline-block;">
|
3298 |
-
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3299 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3300 |
-
</span>
|
3301 |
-
<span style="display: inline-block;">
|
3302 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3303 |
-
<?php
|
3304 |
-
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3305 |
-
?>
|
3306 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3307 |
-
<?php
|
3308 |
-
}
|
3309 |
-
?>
|
3310 |
-
</select>
|
3311 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3312 |
-
</span>
|
3313 |
-
<span style="display: inline-block;">
|
3314 |
-
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
3315 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3316 |
-
</span>
|
3317 |
-
<span style="display: inline-block;">
|
3318 |
-
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3319 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3320 |
-
</span>
|
3321 |
-
</span>
|
3322 |
-
<span class="wd-group">
|
3323 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
3324 |
-
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3325 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3326 |
-
</span>
|
3327 |
-
<span class="wd-group">
|
3328 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3329 |
-
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3330 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3331 |
-
</span>
|
3332 |
-
<span class="wd-group">
|
3333 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_add_class"><?php _e('Add class:', WDS()->prefix); ?></label>
|
3334 |
-
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3335 |
-
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3336 |
-
</span>
|
3337 |
-
</div>
|
3338 |
-
</div>
|
3339 |
-
</div>
|
3340 |
-
</div>
|
3341 |
-
</td>
|
3342 |
-
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="<?php echo $new_layer['videoType']?>">
|
3343 |
-
</tr>
|
3344 |
-
<?php
|
3345 |
-
return ob_get_clean();
|
3346 |
-
}
|
3347 |
-
|
3348 |
-
/**
|
3349 |
-
* Video upload layer template
|
3350 |
-
*/
|
3351 |
-
function wds_upvideoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $id=false, $prefix=false, $layer=false ) {
|
3352 |
-
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
3353 |
-
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
3354 |
-
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
3355 |
-
if( $layer == "" ) {
|
3356 |
-
$new_layer = array(
|
3357 |
-
'videoType' => 'upvideo',
|
3358 |
-
'youtube_rel_layer_video' => '1',
|
3359 |
-
'text' => 'Sample Text',
|
3360 |
-
'static_layer' => '0',
|
3361 |
-
'id' => 'pr_1',
|
3362 |
-
'attr_width' => '300',
|
3363 |
-
'attr_height' => '300',
|
3364 |
-
'image_width' => '300',
|
3365 |
-
'image_height' => '300',
|
3366 |
-
'image_scale' => 'on',
|
3367 |
-
'color' => 'FFFFFF',
|
3368 |
-
'left' => '0',
|
3369 |
-
'top' => '0',
|
3370 |
-
'link' => '',
|
3371 |
-
'target_attr_layer' => 0,
|
3372 |
-
'published' => 1,
|
3373 |
-
'start' => 1000,
|
3374 |
-
'layer_effect_in' => 'none',
|
3375 |
-
'duration_eff_in' => 1000,
|
3376 |
-
'infinite_in' => 1,
|
3377 |
-
'end' => 3000,
|
3378 |
-
'layer_effect_out' => 'none',
|
3379 |
-
'duration_eff_out' => 1000,
|
3380 |
-
'infinite_out' => 1,
|
3381 |
-
'border_color' => 'FFFFFF',
|
3382 |
-
'border_width' => 2,
|
3383 |
-
'border_style' => $border_styles,
|
3384 |
-
'border_radius' => '2px',
|
3385 |
-
'shadow' => '',
|
3386 |
-
'add_class' => '',
|
3387 |
-
'layer_video_loop' => '',
|
3388 |
-
'image_url' => '',
|
3389 |
-
'alt' => '',
|
3390 |
-
);
|
3391 |
-
}
|
3392 |
-
else {
|
3393 |
-
$new_layer = array(
|
3394 |
-
'videoType' => $layer->type,
|
3395 |
-
'youtube_rel_layer_video' => $layer->youtube_rel_layer_video,
|
3396 |
-
'text' => $layer->text,
|
3397 |
-
'static_layer' => $layer->static_layer,
|
3398 |
-
'id' => $id,
|
3399 |
-
'attr_width' => $layer->attr_width,
|
3400 |
-
'attr_height' => $layer->attr_height,
|
3401 |
-
'image_width' => $layer->image_width,
|
3402 |
-
'image_height' => $layer->image_height,
|
3403 |
-
'image_scale' => $layer->image_scale,
|
3404 |
-
'color' => $layer->color,
|
3405 |
-
'left' => $layer->left,
|
3406 |
-
'top' => $layer->top,
|
3407 |
-
'link' => $layer->link,
|
3408 |
-
'target_attr_layer' => $layer->target_attr_layer,
|
3409 |
-
'published' => $layer->published,
|
3410 |
-
'start' => $layer->start,
|
3411 |
-
'layer_effect_in' => $layer->layer_effect_in,
|
3412 |
-
'duration_eff_in' => $layer->duration_eff_in,
|
3413 |
-
'infinite_in' => $layer->infinite_in,
|
3414 |
-
'end' => $layer->end,
|
3415 |
-
'layer_effect_out' => $layer->layer_effect_out,
|
3416 |
-
'duration_eff_out' => $layer->duration_eff_out,
|
3417 |
-
'infinite_out' => $layer->infinite_out,
|
3418 |
-
'border_color' => $layer->border_color,
|
3419 |
-
'border_width' => $layer->border_width,
|
3420 |
-
'border_style' => $layer->border_style,
|
3421 |
-
'border_radius' => $layer->border_radius,
|
3422 |
-
'shadow' => $layer->shadow,
|
3423 |
-
'add_class' => $layer->add_class,
|
3424 |
-
'layer_video_loop' => $layer->layer_video_loop,
|
3425 |
-
'image_url' => $layer->image_url,
|
3426 |
-
'alt' => $layer->alt,
|
3427 |
-
|
3428 |
-
);
|
3429 |
-
}
|
3430 |
-
ob_start();
|
3431 |
-
?>
|
3432 |
-
<tr style="display:none" class="wds_layer_tr wds_upvideoLayer wds_layer_content">
|
3433 |
-
<td colspan="3">
|
3434 |
-
<div class="wd-table">
|
3435 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
3436 |
-
<div class="wd-box-section">
|
3437 |
-
<div class="wd-box-content">
|
3438 |
-
<span class="wd-group">
|
3439 |
-
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
3440 |
-
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
3441 |
-
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3442 |
-
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
3443 |
-
<label <?php echo ((!$new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
3444 |
-
<p class="description"></p>
|
3445 |
-
</span>
|
3446 |
-
<span class="wd-group">
|
3447 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
3448 |
-
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
3449 |
-
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
3450 |
-
</span>
|
3451 |
-
<span class="wd-group">
|
3452 |
-
<label class="wd-label" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
3453 |
-
<input type="hidden" id="<?php echo $prefix; ?>_attr_width" name="<?php echo $prefix; ?>_attr_width" value="<?php echo $new_layer['attr_width']; ?>"/>
|
3454 |
-
<input type="hidden" id="<?php echo $prefix; ?>_attr_height" name="<?php echo $prefix; ?>_attr_height" value="<?php echo $new_layer['attr_height']; ?>"/>
|
3455 |
-
<input type="hidden" id="<?php echo $prefix; ?>_layer_post_id" name="<?php echo $prefix; ?>_layer_post_id" value="<?php echo $new_layer['image_url']; ?>" />
|
3456 |
-
<input type="hidden" name="<?php echo $prefix; ?>_alt" id="<?php echo $prefix; ?>_alt" value="<?php echo $new_layer['alt']; ?>"/>
|
3457 |
-
<input type="hidden" name="<?php echo $prefix; ?>_link" id="<?php echo $prefix; ?>_link" value="<?php echo $new_layer['link']; ?>"/>
|
3458 |
-
<input type="hidden" name="<?php echo $prefix; ?>_image_url" id="<?php echo $prefix; ?>_image_url" value="<?php echo $new_layer['image_url']; ?>" />
|
3459 |
-
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
3460 |
-
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
3461 |
-
<p class="description"><?php _e('Set width and height of the video.', WDS()->prefix); ?></p>
|
3462 |
-
</span>
|
3463 |
-
<span class="wd-group">
|
3464 |
-
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
3465 |
-
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
3466 |
-
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
3467 |
-
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
3468 |
-
</span>
|
3469 |
-
<span class="wd-group">
|
3470 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3471 |
-
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3472 |
-
<select class="select_icon" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
3473 |
-
<?php
|
3474 |
-
foreach ($border_styles as $key => $border_style) {
|
3475 |
-
?>
|
3476 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3477 |
-
<?php
|
3478 |
-
}
|
3479 |
-
?>
|
3480 |
-
</select>
|
3481 |
-
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
3482 |
-
<p class="description"></p>
|
3483 |
-
</span>
|
3484 |
-
<span class="wd-group">
|
3485 |
-
<label class="wd-label"><?php _e('Video Loop:', WDS()->prefix); ?></label>
|
3486 |
-
<input id="<?php echo $prefix; ?>_layer_video_loop1" type="radio" name="<?php echo $prefix; ?>_layer_video_loop" value="1" <?php echo (($new_layer['layer_video_loop']) ? 'checked="checked"' : ''); ?> />
|
3487 |
-
<label <?php echo (($new_layer['layer_video_loop']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_layer_video_loop1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3488 |
-
<input id="<?php echo $prefix; ?>_layer_video_loop0" type="radio" name="<?php echo $prefix; ?>_layer_video_loop" value="0" <?php echo (($new_layer['layer_video_loop']) ? '' : 'checked="checked"'); ?> />
|
3489 |
-
<label <?php echo ((!$new_layer['layer_video_loop']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_layer_video_loop0"><?php _e('No', WDS()->prefix); ?></label>
|
3490 |
-
<p class="description"></p>
|
3491 |
-
</span>
|
3492 |
-
<span class="wd-group">
|
3493 |
-
<label class="wd-label"><?php _e('Controls:', WDS()->prefix); ?></label>
|
3494 |
-
<input id="<?php echo $prefix; ?>_target_attr_layer1" type="radio" onClick="wds_enable_disable_autoplay('visible', '<?php echo $prefix; ?>_autoplay_td', '<?php echo $prefix; ?>_target_attr_layer1')" name="<?php echo $prefix; ?>_controls" value="1" <?php echo (($new_layer['target_attr_layer'] == "1") ? 'checked="checked"' : ''); ?> />
|
3495 |
-
<label <?php echo (($new_layer['target_attr_layer'] == "1") ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_target_attr_layer1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3496 |
-
<input id="<?php echo $prefix; ?>_target_attr_layer0" type="radio" onClick="wds_enable_disable_autoplay('hidden', '<?php echo $prefix; ?>_autoplay_td', '<?php echo $prefix; ?>_target_attr_layer0')" name="<?php echo $prefix; ?>_controls" value="0" <?php echo (($new_layer['target_attr_layer'] == "1") ? '' : 'checked="checked"'); ?> />
|
3497 |
-
<label <?php echo (($new_layer['target_attr_layer'] == "1") ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_target_attr_layer0"><?php _e('No', WDS()->prefix); ?></label>
|
3498 |
-
<p class="description"></p>
|
3499 |
-
</span>
|
3500 |
-
<span class="wd-group <?php echo $prefix; ?>_autoplay_td" <?php echo ($new_layer['target_attr_layer'] == "0" && $new_layer['videoType'] == 'upvideo') ? 'style="visibility:hidden"' : ''; ?>>
|
3501 |
-
<label class="wd-label"><?php _e('Autoplay:', WDS()->prefix); ?></label>
|
3502 |
-
<input id="<?php echo $prefix; ?>_image_scale1" type="radio" name="<?php echo $prefix; ?>_image_scale" value="on" <?php echo (($new_layer['image_scale'] == "on") ? 'checked="checked"' : ''); ?> />
|
3503 |
-
<label <?php echo (($new_layer['image_scale'] == "on") ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_image_scale1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3504 |
-
<input id="<?php echo $prefix; ?>_image_scale0" type="radio" name="<?php echo $prefix; ?>_image_scale" value="off" <?php echo (($new_layer['image_scale'] == "on") ? '' : 'checked="checked"'); ?> />
|
3505 |
-
<label <?php echo (($new_layer['image_scale'] == "on") ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_image_scale0"><?php _e('No', WDS()->prefix); ?></label>
|
3506 |
-
<p class="description"></p>
|
3507 |
-
</span>
|
3508 |
-
</div>
|
3509 |
-
</div>
|
3510 |
-
</div>
|
3511 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
3512 |
-
<div class="wd-box-section">
|
3513 |
-
<div class="wd-box-content">
|
3514 |
-
<span class="wd-group">
|
3515 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
3516 |
-
<span style="display: inline-block;">
|
3517 |
-
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
3518 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3519 |
-
</span>
|
3520 |
-
<span style="display: inline-block;">
|
3521 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3522 |
-
<?php
|
3523 |
-
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
3524 |
-
?>
|
3525 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3526 |
-
<?php
|
3527 |
-
}
|
3528 |
-
?>
|
3529 |
-
</select>
|
3530 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3531 |
-
</span>
|
3532 |
-
<span style="display: inline-block;">
|
3533 |
-
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
3534 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3535 |
-
</span>
|
3536 |
-
<span style="display: inline-block;">
|
3537 |
-
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3538 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3539 |
-
</span>
|
3540 |
-
</span>
|
3541 |
-
<span class="wd-group">
|
3542 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3543 |
-
<span style="display: inline-block;">
|
3544 |
-
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3545 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3546 |
-
</span>
|
3547 |
-
<span style="display: inline-block;">
|
3548 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3549 |
-
<?php
|
3550 |
-
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3551 |
-
?>
|
3552 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3553 |
-
<?php
|
3554 |
-
}
|
3555 |
-
?>
|
3556 |
-
</select>
|
3557 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3558 |
-
</span>
|
3559 |
-
<span style="display: inline-block;">
|
3560 |
-
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
3561 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3562 |
-
</span>
|
3563 |
-
<span style="display: inline-block;">
|
3564 |
-
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3565 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3566 |
-
</span>
|
3567 |
-
</span>
|
3568 |
-
<span class="wd-group">
|
3569 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
3570 |
-
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3571 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3572 |
-
</span>
|
3573 |
-
<span class="wd-group">
|
3574 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3575 |
-
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3576 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3577 |
-
</span>
|
3578 |
-
<span class="wd-group">
|
3579 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_add_class" title=""><?php _e('Add class:', WDS()->prefix); ?></label>
|
3580 |
-
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3581 |
-
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3582 |
-
</span>
|
3583 |
-
</div>
|
3584 |
-
</div>
|
3585 |
-
</div>
|
3586 |
-
</div>
|
3587 |
-
</td>
|
3588 |
-
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="<?php echo $new_layer['videoType']?>">
|
3589 |
-
</tr>
|
3590 |
-
<?php
|
3591 |
-
return ob_get_clean();
|
3592 |
-
}
|
3593 |
-
|
3594 |
-
/**
|
3595 |
-
* Hotspot layer template
|
3596 |
-
*/
|
3597 |
-
function wds_hotspotLayerTemplate( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $hotp_text_positions, $id=false, $prefix=false, $layer=false ) {
|
3598 |
-
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
3599 |
-
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
3600 |
-
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
3601 |
-
if( $layer == "" ) {
|
3602 |
-
$new_layer = array(
|
3603 |
-
'text' => 'Sample Text',
|
3604 |
-
'static_layer' => '0',
|
3605 |
-
'image_width' => '',
|
3606 |
-
'image_height' => '',
|
3607 |
-
'image_scale' => 'slide' . $id . '_layerpr_1_image_scale',
|
3608 |
-
'size' => '18',
|
3609 |
-
'min_size' => '11',
|
3610 |
-
'left' => 20,
|
3611 |
-
'top' => 20,
|
3612 |
-
'google_fonts' => $google_fonts,
|
3613 |
-
'ffamily' => $font_families,
|
3614 |
-
'fweight' => '1',
|
3615 |
-
'link' => '',
|
3616 |
-
'target_attr_layer' => 1,
|
3617 |
-
'layer_callback_list' => $layer_callbacks,
|
3618 |
-
'published' => 1,
|
3619 |
-
'start' => 1000,
|
3620 |
-
'layer_effect_in' => 'none',
|
3621 |
-
'duration_eff_in' => 1000,
|
3622 |
-
'infinite_in' => 1,
|
3623 |
-
'end' => 3000,
|
3624 |
-
'layer_effect_out' => 'none',
|
3625 |
-
'duration_eff_out' => 1000,
|
3626 |
-
'infinite_out' => 1,
|
3627 |
-
'padding' => '5px',
|
3628 |
-
'fbgcolor' => '000000',
|
3629 |
-
'color' => 'FFFFFF',
|
3630 |
-
'transparent' => 50,
|
3631 |
-
'border_width' => 2,
|
3632 |
-
'border_style' => $border_styles,
|
3633 |
-
'border_color' => 'BBBBBB',
|
3634 |
-
'hotp_border_radius' => '25px',
|
3635 |
-
'border_radius' => '2px',
|
3636 |
-
'shadow' => '',
|
3637 |
-
'add_class' => '',
|
3638 |
-
'text_alignment' => $text_alignments,
|
3639 |
-
'hotspot_text_display' => 'hover',
|
3640 |
-
'hotspot_animation' => '1',
|
3641 |
-
'hotp_width' => 20,
|
3642 |
-
'hotp_text_position' => 'right',
|
3643 |
-
'hotp_border_width' => 2,
|
3644 |
-
'hotp_border_style' => $border_styles,
|
3645 |
-
'hotp_border_color' => 'BBBBBB',
|
3646 |
-
'hotp_fbgcolor' => 'FFFFFF',
|
3647 |
-
'link_to_slide' => '',
|
3648 |
-
);
|
3649 |
-
} else {
|
3650 |
-
$new_layer = array(
|
3651 |
-
'text' => $layer->text,
|
3652 |
-
'static_layer' => $layer->static_layer,
|
3653 |
-
'image_width' => $layer->image_width,
|
3654 |
-
'image_height' => $layer->image_height,
|
3655 |
-
'image_scale' => $layer->image_scale,
|
3656 |
-
'size' => $layer->size,
|
3657 |
-
'min_size' => $layer->min_size,
|
3658 |
-
'left' => $layer->left,
|
3659 |
-
'top' => $layer->top,
|
3660 |
-
'google_fonts' => $layer->google_fonts,
|
3661 |
-
'ffamily' => $layer->ffamily,
|
3662 |
-
'fweight' => $layer->fweight,
|
3663 |
-
'link' => $layer->link,
|
3664 |
-
'target_attr_layer' => $layer->target_attr_layer,
|
3665 |
-
'layer_callback_list' => $layer->layer_callback_list,
|
3666 |
-
'published' => $layer->published,
|
3667 |
-
'start' => $layer->start,
|
3668 |
-
'layer_effect_in' => $layer->layer_effect_in,
|
3669 |
-
'duration_eff_in' => $layer->duration_eff_in,
|
3670 |
-
'infinite_in' => $layer->infinite_in,
|
3671 |
-
'end' => $layer->end,
|
3672 |
-
'layer_effect_out' => $layer->layer_effect_out,
|
3673 |
-
'duration_eff_out' => $layer->duration_eff_out,
|
3674 |
-
'infinite_out' => $layer->infinite_out,
|
3675 |
-
'padding' => $layer->padding,
|
3676 |
-
'fbgcolor' => $layer->fbgcolor,
|
3677 |
-
'color' => $layer->color,
|
3678 |
-
'transparent' => $layer->transparent,
|
3679 |
-
'border_width' => $layer->border_width,
|
3680 |
-
'border_style' => $layer->border_style,
|
3681 |
-
'border_color' => $layer->border_color,
|
3682 |
-
'hotp_border_radius' => $layer->hotp_border_radius,
|
3683 |
-
'border_radius' => $layer->border_radius,
|
3684 |
-
'shadow' => $layer->shadow,
|
3685 |
-
'add_class' => $layer->add_class,
|
3686 |
-
'text_alignment' => $layer->text_alignment,
|
3687 |
-
'hotspot_text_display' => $layer->hotspot_text_display,
|
3688 |
-
'hotspot_animation' => $layer->hotspot_animation,
|
3689 |
-
'hotp_width' => $layer->hotp_width,
|
3690 |
-
'hotp_text_position' => $layer->hotp_text_position,
|
3691 |
-
'hotp_border_width' => $layer->hotp_border_width,
|
3692 |
-
'hotp_border_style' => $layer->hotp_border_style,
|
3693 |
-
'hotp_border_color' => $layer->hotp_border_color,
|
3694 |
-
'hotp_fbgcolor' => $layer->hotp_fbgcolor,
|
3695 |
-
'link_to_slide' => $layer->link_to_slide,
|
3696 |
-
);
|
3697 |
-
}
|
3698 |
-
ob_start();
|
3699 |
-
?>
|
3700 |
-
<tr class="wds_layer_tr wds_hotspotLayer wds_layer_content" style="display: none;">
|
3701 |
-
<td colspan=3>
|
3702 |
-
<div class="wd-table">
|
3703 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
3704 |
-
<div class="wd-box-section">
|
3705 |
-
<div class="wd-box-content">
|
3706 |
-
<span class="wd-group">
|
3707 |
-
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
3708 |
-
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
3709 |
-
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3710 |
-
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
3711 |
-
<label <?php echo (($new_layer['published']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
3712 |
-
<p class="description"></p>
|
3713 |
-
</span>
|
3714 |
-
<span class="wd-group">
|
3715 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_text"><?php _e('Text:', WDS()->prefix); ?></label>
|
3716 |
-
<textarea id="<?php echo $prefix; ?>_text" class="wds_textarea" name="<?php echo $prefix; ?>_text" onkeyup="wds_new_line('<?php echo $prefix; ?>');"><?php echo $new_layer['text']; ?></textarea>
|
3717 |
-
<p class="description"></p>
|
3718 |
-
</span>
|
3719 |
-
<span class="wd-group">
|
3720 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
3721 |
-
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
3722 |
-
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
3723 |
-
</span>
|
3724 |
-
<span class="wd-group">
|
3725 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_image_width" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
3726 |
-
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onchange="wds_hotspot_text_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
3727 |
-
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onchange="wds_hotspot_text_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
3728 |
-
<input id="<?php echo $prefix; ?>_image_scale" type="checkbox" onchange="wds_break_word(this, '<?php echo $prefix; ?>')" name="<?php echo $prefix; ?>_image_scale" <?php echo (($new_layer['image_scale']) ? 'checked="checked"' : ''); ?> /><label for="<?php echo $prefix; ?>_image_scale"><?php _e('Break-word', WDS()->prefix); ?></label>
|
3729 |
-
<p class="description"><?php _e('Leave blank to keep the initial width and height. ', WDS()->prefix); ?><?php _e('Break-word may break lines from between any two letters, if their width is larger than dimensions.', WDS()->prefix); ?></p>
|
3730 |
-
</span>
|
3731 |
-
<span class="wd-group">
|
3732 |
-
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
3733 |
-
X <input id="<?php echo $prefix; ?>_div_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>_div').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
3734 |
-
Y <input id="<?php echo $prefix; ?>_div_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>_div').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
3735 |
-
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
3736 |
-
</span>
|
3737 |
-
<span class="wd-group">
|
3738 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_link" title=""><?php _e('Link:', WDS()->prefix); ?></label>
|
3739 |
-
<input id="<?php echo $prefix; ?>_link" type="text" size="39" class="wds_link" value="<?php echo $new_layer['link']; ?>" name="<?php echo $prefix; ?>_link" />
|
3740 |
-
<input id="<?php echo $prefix; ?>_target_attr_layer" type="checkbox" name="<?php echo $prefix; ?>_target_attr_layer" <?php echo (($new_layer['target_attr_layer']) ? 'checked="checked"' : ''); ?> value="1" /><label for="<?php echo $prefix; ?>_target_attr_layer"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
3741 |
-
<p class="description"><?php _e('Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
3742 |
-
</span>
|
3743 |
-
<span class="wd-group">
|
3744 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_htextposition"><?php _e('Hotspot text position:', WDS()->prefix); ?></label>
|
3745 |
-
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_htextposition" name="<?php echo $prefix; ?>_htextposition" onchange="jQuery('#<?php echo $prefix; ?>_div').attr('data-text-position', jQuery(this).val()); wds_hotspot_position('<?php echo $prefix; ?>')">
|
3746 |
-
<?php
|
3747 |
-
foreach ($hotp_text_positions as $key => $hotp_text_position) {
|
3748 |
-
?>
|
3749 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['hotp_text_position'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $hotp_text_position; ?></option>
|
3750 |
-
<?php
|
3751 |
-
}
|
3752 |
-
?>
|
3753 |
-
</select>
|
3754 |
-
<p class="description"></p>
|
3755 |
-
</span>
|
3756 |
-
<span class="wd-group">
|
3757 |
-
<label class="wd-label" title=""><?php _e('Show Hotspot text:', WDS()->prefix); ?></label>
|
3758 |
-
<input type="radio" name="<?php echo $prefix; ?>_hotspot_text_display" id="<?php echo $prefix; ?>_hotspot_text_display_1" value="hover" <?php if ($new_layer['hotspot_text_display'] == 'hover') echo 'checked="checked"'; ?> /><label <?php echo $new_layer['hotspot_text_display'] == 'hover' ? 'class="selected_color"' : ''; ?> for="<?php echo $prefix; ?>_hotspot_text_display_1"><?php _e('On hover', WDS()->prefix); ?></label>
|
3759 |
-
<input type="radio" name="<?php echo $prefix; ?>_hotspot_text_display" id="<?php echo $prefix; ?>_hotspot_text_display_0" value="click" <?php if ($new_layer['hotspot_text_display'] == 'click' ) echo 'checked="checked"'; ?> /><label <?php echo $new_layer['hotspot_text_display'] == 'click' ? 'class="selected_color"' : ''; ?> for="<?php echo $prefix; ?>_hotspot_text_display_0"><?php _e('On click', WDS()->prefix); ?></label>
|
3760 |
-
<p class="description"><?php _e('Select between the option of always displaying the navigation buttons or only when hovered.', WDS()->prefix); ?></p>
|
3761 |
-
</span>
|
3762 |
-
<span class="wd-group">
|
3763 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_link"><?php _e('Hotspot Width:', WDS()->prefix); ?></label>
|
3764 |
-
<input id="<?php echo $prefix; ?>_hotp_width" class="spider_int_input" type="text" onchange="wds_hotspot_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['hotp_width']; ?>" name="<?php echo $prefix; ?>_hotp_width" /> px
|
3765 |
-
</span>
|
3766 |
-
<span class="wd-group">
|
3767 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_hotp_fbgcolor"><?php _e('Hotspot Background Color:', WDS()->prefix); ?></label>
|
3768 |
-
<input id="<?php echo $prefix; ?>_hotp_fbgcolor" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>_round').css({backgroundColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['hotp_fbgcolor']; ?>" name="<?php echo $prefix; ?>_hotp_fbgcolor" />
|
3769 |
-
<p class="description"></p>
|
3770 |
-
</span>
|
3771 |
-
<span class="wd-group">
|
3772 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_hotp_border_width"><?php _e('Hotspot Border:', WDS()->prefix); ?></label>
|
3773 |
-
<input id="<?php echo $prefix; ?>_round_hotp_border_width" class="spider_int_input" type="text" onchange="wds_hotpborder_width('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['hotp_border_width']; ?>" name="<?php echo $prefix; ?>_hotp_border_width"> px
|
3774 |
-
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_round_hotp_border_style" onchange="wds_hotpborder_width('<?php echo $prefix; ?>')" style="width: 80px;" name="<?php echo $prefix; ?>_hotp_border_style">
|
3775 |
-
<?php
|
3776 |
-
foreach ($border_styles as $key => $hotp_border_style) {
|
3777 |
-
?>
|
3778 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['hotp_border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $hotp_border_style; ?></option>
|
3779 |
-
<?php
|
3780 |
-
}
|
3781 |
-
?>
|
3782 |
-
</select>
|
3783 |
-
<input id="<?php echo $prefix; ?>_hotp_border_color" class="color" type="text" onchange="wds_hotpborder_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['hotp_border_color']; ?>" name="<?php echo $prefix; ?>_hotp_border_color" />
|
3784 |
-
<p class="description"></p>
|
3785 |
-
</span>
|
3786 |
-
<span class="wd-group">
|
3787 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_hotp_border_radius" title=""><?php _e('Hotspot Radius:', WDS()->prefix); ?></label>
|
3788 |
-
<input placeholder="4px" id="<?php echo $prefix; ?>_hotp_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>_round').css({borderRadius: jQuery(this).val()});jQuery('#<?php echo $prefix; ?>_round_effect').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['hotp_border_radius']; ?>" name="<?php echo $prefix; ?>_hotp_border_radius">
|
3789 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3790 |
-
</span>
|
3791 |
-
<span class="wd-group">
|
3792 |
-
<label class="wd-label"><?php _e('Hotspot Animation:', WDS()->prefix); ?></label>
|
3793 |
-
<input id="<?php echo $prefix; ?>_hotspot_animation1" type="radio" name="<?php echo $prefix; ?>_hotspot_animation" value="1" <?php echo (($new_layer['hotspot_animation']) ? 'checked="checked"' : ''); ?> />
|
3794 |
-
<label <?php echo (($new_layer['hotspot_animation']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_hotspot_animation1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3795 |
-
<input id="<?php echo $prefix; ?>_hotspot_animation0" type="radio" name="<?php echo $prefix; ?>_hotspot_animation" value="0" <?php echo (($new_layer['hotspot_animation']) ? '' : 'checked="checked"'); ?> />
|
3796 |
-
<label <?php echo (($new_layer['hotspot_animation']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_hotspot_animation0"><?php _e('No', WDS()->prefix); ?></label>
|
3797 |
-
<p class="description"></p>
|
3798 |
-
</span>
|
3799 |
-
<span class="wd-group">
|
3800 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_callback_list"><?php _e('Add click action:', WDS()->prefix); ?></label>
|
3801 |
-
<select class="select_icon select_icon_320" style="width: 120px;" id="<?php echo $prefix; ?>_layer_callback_list" name="<?php echo $prefix; ?>_layer_callback_list" onchange="wds_show_slides_name('<?php echo $prefix; ?>', jQuery(this).val())">
|
3802 |
-
<?php
|
3803 |
-
foreach ($layer_callbacks as $key => $layer_callback_list) {
|
3804 |
-
?>
|
3805 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['layer_callback_list'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $layer_callback_list; ?></option>
|
3806 |
-
<?php
|
3807 |
-
}
|
3808 |
-
?>
|
3809 |
-
</select>
|
3810 |
-
<p class="description"></p>
|
3811 |
-
</span>
|
3812 |
-
<span class="wd-group">
|
3813 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_link_to_slide" class="link_to_slide" style="<?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>"><?php _e('Slides Name:', WDS()->prefix); ?></label>
|
3814 |
-
<select class="select_icon select_icon_320" style="width: 120px; <?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>" id="<?php echo $prefix; ?>_link_to_slide" name="<?php echo $prefix; ?>_link_to_slide">
|
3815 |
-
<?php
|
3816 |
-
foreach ($slides_name as $key => $slide_name) {
|
3817 |
-
?>
|
3818 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['link_to_slide'] == $key ) ? 'selected="selected"' : ''); ?>><?php echo $slide_name; ?></option>
|
3819 |
-
<?php
|
3820 |
-
}
|
3821 |
-
?>
|
3822 |
-
</select>
|
3823 |
-
<p class="description"></p>
|
3824 |
-
</span>
|
3825 |
-
</div>
|
3826 |
-
</div>
|
3827 |
-
</div>
|
3828 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
3829 |
-
<div class="wd-box-section">
|
3830 |
-
<div class="wd-box-content">
|
3831 |
-
<span class="wd-group">
|
3832 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
3833 |
-
<span style="display: inline-block;">
|
3834 |
-
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
3835 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3836 |
-
</span>
|
3837 |
-
<span style="display: inline-block;">
|
3838 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3839 |
-
<?php
|
3840 |
-
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
3841 |
-
?>
|
3842 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3843 |
-
<?php
|
3844 |
-
}
|
3845 |
-
?>
|
3846 |
-
</select>
|
3847 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3848 |
-
</span>
|
3849 |
-
<span style="display: inline-block;">
|
3850 |
-
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" />ms
|
3851 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3852 |
-
</span>
|
3853 |
-
<span style="display: inline-block;">
|
3854 |
-
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3855 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3856 |
-
</span>
|
3857 |
-
</span>
|
3858 |
-
<span class="wd-group">
|
3859 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3860 |
-
<span style="display: inline-block;">
|
3861 |
-
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3862 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3863 |
-
</span>
|
3864 |
-
<span style="display: inline-block;">
|
3865 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3866 |
-
<?php
|
3867 |
-
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3868 |
-
?>
|
3869 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3870 |
-
<?php
|
3871 |
-
}
|
3872 |
-
?>
|
3873 |
-
</select>
|
3874 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3875 |
-
</span>
|
3876 |
-
<span style="display: inline-block;">
|
3877 |
-
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
3878 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3879 |
-
</span>
|
3880 |
-
<span style="display: inline-block;">
|
3881 |
-
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3882 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3883 |
-
</span>
|
3884 |
-
</span>
|
3885 |
-
<span class="wd-group">
|
3886 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_padding" title=""><?php _e('Padding:', WDS()->prefix); ?></label>
|
3887 |
-
<input placeholder="5px 10px 10px" id="<?php echo $prefix; ?>_padding" class="spider_char_input" type="text" onchange="document.getElementById('<?php echo $prefix; ?>').style.padding=jQuery(this).val();" value="<?php echo $new_layer['padding']; ?>" name="<?php echo $prefix; ?>_padding">
|
3888 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3889 |
-
</span>
|
3890 |
-
<span class="wd-group">
|
3891 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Size:', WDS()->prefix); ?> </label>
|
3892 |
-
<span style="display: inline-block">
|
3893 |
-
<input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['size']; ?>" name="<?php echo $prefix; ?>_size" /> px
|
3894 |
-
</span>
|
3895 |
-
<p class="description"><?php _e('Sets the font size of the text.', WDS()->prefix); ?></p>
|
3896 |
-
</span>
|
3897 |
-
<span class="wd-group">
|
3898 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Minimum font size:', WDS()->prefix); ?> </label>
|
3899 |
-
<span style="display: inline-block;">
|
3900 |
-
<input id="<?php echo $prefix; ?>_min_size" class="spider_int_input" type="text" onchange="wds_min_size_validation('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['min_size']; ?>" name="<?php echo $prefix; ?>_min_size" /> px
|
3901 |
-
</span>
|
3902 |
-
<p class="description"><?php _e('Text layer font size shrinks on small screens. Choose the minimum font size, which the text should have.', WDS()->prefix); ?></p>
|
3903 |
-
</span>
|
3904 |
-
|
3905 |
-
<span class="wd-group">
|
3906 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
3907 |
-
<input id="<?php echo $prefix; ?>_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({color: '#' + jQuery(this).val()})" value="<?php echo $new_layer['color']; ?>" name="<?php echo $prefix; ?>_color" />
|
3908 |
-
<p class="description"></p>
|
3909 |
-
</span>
|
3910 |
-
<span class="wd-group">
|
3911 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_ffamily"><?php _e('Font family:', WDS()->prefix); ?></label>
|
3912 |
-
<select class="select_icon select_icon_320" style="width: 180px;" id="<?php echo $prefix; ?>_ffamily" onchange="wds_change_fonts('<?php echo $prefix; ?>', 1)" name="<?php echo $prefix; ?>_ffamily">
|
3913 |
-
<?php
|
3914 |
-
$fonts = (isset($new_layer['google_fonts']) && $new_layer['google_fonts']) ? $google_fonts : $font_families;
|
3915 |
-
foreach ($fonts as $key => $font_family) {
|
3916 |
-
?>
|
3917 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['ffamily'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
|
3918 |
-
<?php
|
3919 |
-
}
|
3920 |
-
?>
|
3921 |
-
</select>
|
3922 |
-
<input id="<?php echo $prefix; ?>_google_fonts1" type="radio" name="<?php echo $prefix; ?>_google_fonts" value="1" <?php echo (($new_layer['google_fonts']) ? 'checked="checked"' : ''); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
3923 |
-
<label for="<?php echo $prefix; ?>_google_fonts1">Google fonts</label>
|
3924 |
-
<input id="<?php echo $prefix; ?>_google_fonts0" type="radio" name="<?php echo $prefix; ?>_google_fonts" value="0" <?php echo (($new_layer['google_fonts']) ? '' : 'checked="checked"'); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
3925 |
-
<label for="<?php echo $prefix; ?>_google_fonts0"><?php _e('Default', WDS()->prefix); ?></label>
|
3926 |
-
<p class="description"></p>
|
3927 |
-
</span>
|
3928 |
-
<span class="wd-group">
|
3929 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_fweight"><?php _e('Font weight:', WDS()->prefix); ?></label>
|
3930 |
-
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_fweight" onchange="jQuery('#<?php echo $prefix; ?>').css({fontWeight: jQuery(this).val()})" name="<?php echo $prefix; ?>_fweight">
|
3931 |
-
<?php
|
3932 |
-
foreach ($font_weights as $key => $fweight) {
|
3933 |
-
?>
|
3934 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['fweight'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $fweight; ?></option>
|
3935 |
-
<?php
|
3936 |
-
}
|
3937 |
-
?>
|
3938 |
-
</select>
|
3939 |
-
<p class="description"></p>
|
3940 |
-
</span>
|
3941 |
-
<span class="wd-group">
|
3942 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_fbgcolor"><?php _e('Background Color:', WDS()->prefix); ?></label>
|
3943 |
-
<input id="<?php echo $prefix; ?>_fbgcolor" class="color" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" value="<?php echo $new_layer['fbgcolor']; ?>" name="<?php echo $prefix; ?>_fbgcolor" />
|
3944 |
-
<p class="description"></p>
|
3945 |
-
</span>
|
3946 |
-
<span class="wd-group">
|
3947 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_transparent" title=""><?php _e('Transparency:', WDS()->prefix); ?></label>
|
3948 |
-
<input id="<?php echo $prefix; ?>_transparent" class="spider_int_input" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['transparent']; ?>" name="<?php echo $prefix; ?>_transparent"> %
|
3949 |
-
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
3950 |
-
</span>
|
3951 |
-
<span class="wd-group">
|
3952 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3953 |
-
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3954 |
-
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px;" name="<?php echo $prefix; ?>_border_style">
|
3955 |
-
<?php
|
3956 |
-
foreach ($border_styles as $key => $border_style) {
|
3957 |
-
?>
|
3958 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3959 |
-
<?php
|
3960 |
-
}
|
3961 |
-
?>
|
3962 |
-
</select>
|
3963 |
-
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
3964 |
-
<p class="description"></p>
|
3965 |
-
</span>
|
3966 |
-
<span class="wd-group">
|
3967 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius"><?php _e('Radius:', WDS()->prefix); ?></label>
|
3968 |
-
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3969 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3970 |
-
</span>
|
3971 |
-
<span class="wd-group">
|
3972 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3973 |
-
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3974 |
-
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3975 |
-
</span>
|
3976 |
-
<span class="wd-group">
|
3977 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_add_class"><?php _e('Add class:', WDS()->prefix); ?></label>
|
3978 |
-
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3979 |
-
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3980 |
-
</span>
|
3981 |
-
<span class="wd-group">
|
3982 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_text_alignment"><?php _e('Text alignment:', WDS()->prefix); ?></label>
|
3983 |
-
<select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_text_alignment" onchange="jQuery('#<?php echo $prefix; ?>').css({textAlign: jQuery(this).val()})" name="<?php echo $prefix; ?>_text_alignment">
|
3984 |
-
<?php
|
3985 |
-
foreach ($text_alignments as $key => $text_alignment) {
|
3986 |
-
?>
|
3987 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['text_alignment'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $text_alignment; ?></option>
|
3988 |
-
<?php
|
3989 |
-
}
|
3990 |
-
?>
|
3991 |
-
</select>
|
3992 |
-
<p class="description"></p>
|
3993 |
-
</span>
|
3994 |
-
</div>
|
3995 |
-
</div>
|
3996 |
-
</div>
|
3997 |
-
</div>
|
3998 |
-
</td>
|
3999 |
-
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="hotspots">
|
4000 |
-
</tr>
|
4001 |
-
<?php
|
4002 |
-
return ob_get_clean();
|
4003 |
-
}
|
4004 |
-
|
4005 |
-
/**
|
4006 |
-
* Social layer template
|
4007 |
-
*/
|
4008 |
-
function wds_socialLayerTemplate( $social_buttons, $layer_effects_in, $layer_effects_out, $id=false, $prefix=false, $layer=false ) {
|
4009 |
-
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
4010 |
-
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
4011 |
-
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
4012 |
-
if( $layer == "" ) {
|
4013 |
-
$new_layer = array(
|
4014 |
-
'static_layer' => '0',
|
4015 |
-
'left' => '0',
|
4016 |
-
'top' => '0',
|
4017 |
-
'social_button' => $social_buttons,
|
4018 |
-
'size' => 18,
|
4019 |
-
'transparent' => 0,
|
4020 |
-
'published' => 1,
|
4021 |
-
'start' => 1000,
|
4022 |
-
'layer_effect_in' => 'none',
|
4023 |
-
'duration_eff_in' => 1000,
|
4024 |
-
'infinite_in' => 1,
|
4025 |
-
'end' => 1000,
|
4026 |
-
'layer_effect_out' => 'none',
|
4027 |
-
'duration_eff_out' => 1000,
|
4028 |
-
'infinite_out' => 1,
|
4029 |
-
'color' => 'FFFFFF',
|
4030 |
-
'hover_color' => 'FFFFFF',
|
4031 |
-
'add_class' => '',
|
4032 |
-
);
|
4033 |
-
} else {
|
4034 |
-
$new_layer = array(
|
4035 |
-
'static_layer' => $layer->static_layer,
|
4036 |
-
'left' => $layer->left,
|
4037 |
-
'top' => $layer->top,
|
4038 |
-
'social_button' => $layer->social_button,
|
4039 |
-
'size' => $layer->size,
|
4040 |
-
'transparent' => $layer->transparent,
|
4041 |
-
'published' => $layer->published,
|
4042 |
-
'start' => $layer->start,
|
4043 |
-
'layer_effect_in' => $layer->layer_effect_in,
|
4044 |
-
'duration_eff_in' => $layer->duration_eff_in,
|
4045 |
-
'infinite_in' => $layer->infinite_in,
|
4046 |
-
'end' => $layer->end,
|
4047 |
-
'layer_effect_out' => $layer->layer_effect_out,
|
4048 |
-
'duration_eff_out' => $layer->duration_eff_out,
|
4049 |
-
'infinite_out' => $layer->infinite_out,
|
4050 |
-
'color' => $layer->color,
|
4051 |
-
'hover_color' => $layer->hover_color,
|
4052 |
-
'add_class' => $layer->add_class,
|
4053 |
-
);
|
4054 |
-
}
|
4055 |
-
|
4056 |
-
ob_start();
|
4057 |
-
?>
|
4058 |
-
<tr class="wds_layer_tr wds_socialLayer wds_layer_content" style="display: none;">
|
4059 |
-
<td colspan="3">
|
4060 |
-
<div class="wd-table">
|
4061 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
4062 |
-
<div class="wd-box-section">
|
4063 |
-
<div class="wd-box-content">
|
4064 |
-
<span class="wd-group">
|
4065 |
-
<label class="wd-label"><?php _e('Published:', WDS()->prefix);?></label>
|
4066 |
-
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
4067 |
-
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix);?></label>
|
4068 |
-
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?>/>
|
4069 |
-
<label <?php echo (($new_layer['published']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix);?></label>
|
4070 |
-
<p class="description"></p>
|
4071 |
-
</span>
|
4072 |
-
<span class="wd-group">
|
4073 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix);?> </label>
|
4074 |
-
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
4075 |
-
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix);?></p>
|
4076 |
-
</span>
|
4077 |
-
<span class="wd-group">
|
4078 |
-
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix);?></label>
|
4079 |
-
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
4080 |
-
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
4081 |
-
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix);?></p>
|
4082 |
-
</span>
|
4083 |
-
<span class="wd-group">
|
4084 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_social_button"><?php _e('Social button:', WDS()->prefix);?></label>
|
4085 |
-
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_social_button" onchange="jQuery('#<?php echo $prefix; ?>').attr('class', 'wds_draggable_<?php echo $id; ?> wds_draggable fa fa-' + jQuery(this).val())" name="<?php echo $prefix; ?>_social_button" style="width:150px;">
|
4086 |
-
<?php
|
4087 |
-
foreach ($social_buttons as $key => $social_button) {
|
4088 |
-
?>
|
4089 |
-
<option value="<?php echo $key; ?>" <?php echo (($new_layer['social_button'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $social_button; ?></option>
|
4090 |
-
<?php
|
4091 |
-
}
|
4092 |
-
?>
|
4093 |
-
</select>
|
4094 |
-
<p class="description"></p>
|
4095 |
-
</span>
|
4096 |
-
<span class="wd-group">
|
4097 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Size:', WDS()->prefix);?></label>
|
4098 |
-
<input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['size']; ?>" name="<?php echo $prefix; ?>_size" /> px
|
4099 |
-
<p class="description"></p>
|
4100 |
-
</span>
|
4101 |
-
<span class="wd-group">
|
4102 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_transparent" title=""><?php _e('Transparency:', WDS()->prefix);?></label>
|
4103 |
-
<input id="<?php echo $prefix; ?>_transparent" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({opacity: (100 - jQuery(this).val()) / 100, filter: 'Alpha(opacity=' + 100 - jQuery(this).val() + ')'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['transparent']; ?>" name="<?php echo $prefix; ?>_transparent" /> %
|
4104 |
-
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix);?></p>
|
4105 |
-
</span>
|
4106 |
-
</div>
|
4107 |
-
</div>
|
4108 |
-
</div>
|
4109 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
4110 |
-
<div class="wd-box-section">
|
4111 |
-
<div class="wd-box-content">
|
4112 |
-
<span class="wd-group">
|
4113 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix);?></label>
|
4114 |
-
<span style="display: inline-block;">
|
4115 |
-
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
4116 |
-
<p class="description"><?php _e('Start', WDS()->prefix);?></p>
|
4117 |
-
</span>
|
4118 |
-
<span style="display: inline-block;">
|
4119 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
4120 |
-
<?php
|
4121 |
-
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
4122 |
-
?>
|
4123 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
4124 |
-
<?php
|
4125 |
-
}
|
4126 |
-
?>
|
4127 |
-
</select>
|
4128 |
-
<p class="description"><?php _e('Effect', WDS()->prefix);?></p>
|
4129 |
-
</span>
|
4130 |
-
<span style="display: inline-block;">
|
4131 |
-
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
4132 |
-
<p class="description"><?php _e('Duration', WDS()->prefix);?></p>
|
4133 |
-
</span>
|
4134 |
-
<span style="display: inline-block;">
|
4135 |
-
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
4136 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix);?></p>
|
4137 |
-
</span>
|
4138 |
-
</span>
|
4139 |
-
<span class="wd-group">
|
4140 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix);?></label>
|
4141 |
-
<span style="display: inline-block;">
|
4142 |
-
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
4143 |
-
<p class="description"><?php _e('Start', WDS()->prefix);?></p>
|
4144 |
-
</span>
|
4145 |
-
<span style="display: inline-block;">
|
4146 |
-
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
4147 |
-
<?php
|
4148 |
-
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
4149 |
-
?>
|
4150 |
-
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
4151 |
-
<?php
|
4152 |
-
}
|
4153 |
-
?>
|
4154 |
-
</select>
|
4155 |
-
<p class="description"><?php _e('Effect', WDS()->prefix);?></p>
|
4156 |
-
</span>
|
4157 |
-
<span style="display: inline-block;">
|
4158 |
-
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out">ms
|
4159 |
-
<p class="description"><?php _e('Duration', WDS()->prefix);?></p>
|
4160 |
-
</span>
|
4161 |
-
<span style="display: inline-block;">
|
4162 |
-
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
4163 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix);?></p>
|
4164 |
-
</span>
|
4165 |
-
</span>
|
4166 |
-
<span class="wd-group">
|
4167 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_color"><?php _e('Color:', WDS()->prefix);?></label>
|
4168 |
-
<input id="<?php echo $prefix; ?>_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({color: '#' + jQuery(this).val()})" value="<?php echo $new_layer['color']; ?>" name="<?php echo $prefix; ?>_color" />
|
4169 |
-
<p class="description"></p>
|
4170 |
-
</span>
|
4171 |
-
<span class="wd-group">
|
4172 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_hover_color"><?php _e('Hover Color:', WDS()->prefix);?></label>
|
4173 |
-
<input id="<?php echo $prefix; ?>_hover_color" class="color" type="text" value="<?php echo $new_layer['hover_color']; ?>" name="<?php echo $prefix; ?>_hover_color" />
|
4174 |
-
<p class="description"></p>
|
4175 |
-
</span>
|
4176 |
-
<span class="wd-group">
|
4177 |
-
<label class="wd-label" for="<?php echo $prefix; ?>_add_class" title=""><?php _e('Add class:', WDS()->prefix);?></label>
|
4178 |
-
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
4179 |
-
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix);?></p>
|
4180 |
-
</span>
|
4181 |
-
</div>
|
4182 |
-
</div>
|
4183 |
-
</div>
|
4184 |
-
</div>
|
4185 |
-
</td>
|
4186 |
-
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="social">
|
4187 |
-
</tr>
|
4188 |
-
<?php
|
4189 |
-
return ob_get_clean();
|
4190 |
-
}
|
4191 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class SlidersView_wds
|
5 |
+
*/
|
6 |
+
class SlidersView_wds extends AdminView_wds {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Display.
|
10 |
+
*
|
11 |
+
* @param array $params
|
12 |
+
*/
|
13 |
+
public function display( $params = array() ) {
|
14 |
+
ob_start();
|
15 |
+
echo $this->body($params);
|
16 |
+
$form_attr = array(
|
17 |
+
'id' => WDS()->prefix . '_sliders_form',
|
18 |
+
'name' => WDS()->prefix . '_sliders',
|
19 |
+
'class' => WDS()->prefix . '_sliders wd-form',
|
20 |
+
'action' => add_query_arg(array( 'page' => 'sliders_' . WDS()->prefix ), 'admin.php'),
|
21 |
+
);
|
22 |
+
echo $this->form(ob_get_clean(), $form_attr);
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Body.
|
27 |
+
*
|
28 |
+
* @param array $params
|
29 |
+
*/
|
30 |
+
public function body( $params = array() ) {
|
31 |
+
echo $this->title(array(
|
32 |
+
'title' => $params['page_title'],
|
33 |
+
'title_class' => 'wd-header',
|
34 |
+
'add_new_button' => array(
|
35 |
+
'href' => add_query_arg( array(
|
36 |
+
'page' => $params['page'],
|
37 |
+
'task' => 'edit',
|
38 |
+
), admin_url('admin.php')),
|
39 |
+
),
|
40 |
+
));
|
41 |
+
echo $this->search();
|
42 |
+
?>
|
43 |
+
<div class="tablenav top">
|
44 |
+
<?php
|
45 |
+
echo $this->bulk_actions($params['actions'], TRUE);
|
46 |
+
echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']);
|
47 |
+
?>
|
48 |
+
</div>
|
49 |
+
<table class="adminlist table table-striped wp-list-table widefat fixed pages media">
|
50 |
+
<thead>
|
51 |
+
<td id="cb" class="column-cb check-column">
|
52 |
+
<label class="screen-reader-text" for="cb-select-all-1"><?php _e('Title', WDS()->prefix); ?></label>
|
53 |
+
<input id="check_all" type="checkbox">
|
54 |
+
</td>
|
55 |
+
<?php echo WDW_S_Library::ordering('name', $params['orderby'], $params['order'], __('Title', WDS()->prefix), $params['page_url'], 'column-primary'); ?>
|
56 |
+
<th class="col-slides-count"><?php _e('Slides count', WDS()->prefix); ?></th>
|
57 |
+
<th class="col-shortcode"><?php _e('Shortcode', WDS()->prefix); ?></th>
|
58 |
+
<th class="col-function"><?php _e('PHP function', WDS()->prefix); ?></th>
|
59 |
+
</thead>
|
60 |
+
<tbody>
|
61 |
+
<?php
|
62 |
+
if ( $params['rows'] ) {
|
63 |
+
foreach ( $params['rows'] as $row ) {
|
64 |
+
$alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
|
65 |
+
$edit_url = add_query_arg(array(
|
66 |
+
'page' => $params['page'],
|
67 |
+
'task' => 'edit',
|
68 |
+
'current_id' => $row->id,
|
69 |
+
), admin_url('admin.php'));
|
70 |
+
$publish_url = add_query_arg(array(
|
71 |
+
'task' => ($row->published ? 'unpublish' : 'publish'),
|
72 |
+
'current_id' => $row->id,
|
73 |
+
), $params['page_url']);
|
74 |
+
$delete_url = add_query_arg( array(
|
75 |
+
'task' => 'delete',
|
76 |
+
'current_id' => $row->id
|
77 |
+
), $params['page_url']
|
78 |
+
);
|
79 |
+
|
80 |
+
$preview_url = add_query_arg( array(
|
81 |
+
'slider_id' => $row->id
|
82 |
+
), $params['preview_url']
|
83 |
+
);
|
84 |
+
$images_count = !empty($params['slides_info'][$row->id]['count']) ? $params['slides_info'][$row->id]['count'] : 0;
|
85 |
+
$preview_image = !empty($params['slides_info'][$row->id]['preview_thumb']) ? $params['slides_info'][$row->id]['preview_thumb'] : WDS()->plugin_url . '/images/no-image.png';
|
86 |
+
?>
|
87 |
+
<tr id="tr_<?php echo $row->id; ?>" <?php echo $alternate; ?>>
|
88 |
+
<th class="check-column">
|
89 |
+
<input type="checkbox" id="check_<?php echo $row->id; ?>" name="check[<?php echo $row->id; ?>]" onclick="spider_check_all(this)" />
|
90 |
+
</th>
|
91 |
+
<td class="column-primary column-title" data-colname="<?php _e('Title', WDS()->prefix); ?>">
|
92 |
+
<strong class="has-media-icon">
|
93 |
+
<a href="<?php echo $edit_url; ?>">
|
94 |
+
<span class="media-icon image-icon">
|
95 |
+
<img class="preview-image" title="<?php echo $row->name; ?>" src="<?php echo $preview_image; ?>" width="60" height="60" />
|
96 |
+
</span>
|
97 |
+
<?php echo $row->name; ?>
|
98 |
+
</a>
|
99 |
+
<?php if ( !$row->published ) { ?>
|
100 |
+
— <span class="post-state"><?php _e('Unpublished', WDS()->prefix); ?></span>
|
101 |
+
<?php } ?>
|
102 |
+
</strong>
|
103 |
+
<div class="row-actions">
|
104 |
+
<span><a href="<?php echo $edit_url; ?>"><?php _e('Edit', WDS()->prefix); ?></a> |</span>
|
105 |
+
<span><a href="<?php echo $publish_url; ?>"><?php echo($row->published ? __('Unpublish', WDS()->prefix) : __('Publish', WDS()->prefix)); ?></a> |</span>
|
106 |
+
<span class="trash"><a onclick="if (!confirm('<?php echo addslashes(__('Do you want to delete selected item?', WDS()->prefix)); ?>')) {return false;}" href="<?php echo $delete_url; ?>"><?php _e('Delete', WDS()->prefix); ?></a> |</span>
|
107 |
+
<span><a href="<?php echo $preview_url; ?>" target="_blank"><?php _e('Preview', WDS()->prefix); ?></a></span>
|
108 |
+
</div>
|
109 |
+
<button class="toggle-row" type="button">
|
110 |
+
<span class="screen-reader-text"><?php _e('Show more details', WDS()->prefix); ?></span>
|
111 |
+
</button>
|
112 |
+
</td>
|
113 |
+
<td data-colname="<?php _e('Slides count', WDS()->prefix); ?>"><?php echo $images_count; ?></td>
|
114 |
+
<td data-colname="<?php _e('Shortcode', WDS()->prefix); ?>">
|
115 |
+
<input type="text" value='[wds id="<?php echo $row->id; ?>"]' onclick="spider_select_value(this)" size="11" readonly="readonly" />
|
116 |
+
</td>
|
117 |
+
<td data-colname="<?php _e('PHP function', WDS()->prefix); ?>">
|
118 |
+
<input type="text" value="<?php if( function_exists('wd_slider') ) { wd_slider(<?php echo $row->id; ?>); } ?>" onclick="spider_select_value(this)" size="17" readonly="readonly" />
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
echo WDW_S_Library::no_items('sliders', 5);
|
126 |
+
}
|
127 |
+
?>
|
128 |
+
</tbody>
|
129 |
+
</table>
|
130 |
+
<div class="tablenav bottom">
|
131 |
+
<?php echo $this->pagination($params['page_url'], $params['total'], $params['items_per_page']); ?>
|
132 |
+
</div>
|
133 |
+
<?php if ( !empty($params['rows']) ) { ?>
|
134 |
+
<div class="wds_opacity_merge" onclick="jQuery('.wds_opacity_merge').hide();jQuery('.wds_merge').hide();"></div>
|
135 |
+
<div class="wds_merge">
|
136 |
+
<select class="select_icon select_icon_320" style="width:200px" name="select_slider_merge" id="select_slider_merge" style="margin-bottom: 6px;">
|
137 |
+
<option><?php _e('-select-', WDS()->prefix); ?></option>
|
138 |
+
<?php foreach ( $params['rows'] as $row ) { ?>
|
139 |
+
<option value="<?php echo $row->id; ?>"><?php echo $row->name; ?></option>
|
140 |
+
<?php } ?>
|
141 |
+
</select>
|
142 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'merge');" value="<?php _e('Merge', WDS()->prefix); ?>" />
|
143 |
+
<input type="button" class="button-secondary" onclick="jQuery('.wds_merge').hide();jQuery('.wds_opacity_merge').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
144 |
+
<p class="description"><?php _e('Select slider to use settings from.', WDS()->prefix); ?></p>
|
145 |
+
</div>
|
146 |
+
<?php } ?>
|
147 |
+
<div class="wds_opacity_export" onclick="jQuery('.wds_opacity_export').hide();jQuery('.wds_exports').hide();"></div>
|
148 |
+
<div class="wds_exports">
|
149 |
+
<input type="checkbox" name="imagesexport" id="imagesexport" checked="checked" />
|
150 |
+
<label for="imagesexport"><?php _e('Check the box to export the images included within sliders', WDS()->prefix); ?></label>
|
151 |
+
<a class="button-secondary wds_export" type="button" href="<?php echo add_query_arg(array('action' => 'WDSExport'), admin_url('admin-ajax.php')); ?>" onclick="wds_get_checked()"><?php _e('Export', WDS()->prefix); ?></a>
|
152 |
+
<input type="button" class="button-secondary" onclick="jQuery('.wds_exports').hide();jQuery('.wds_opacity_export').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
153 |
+
</div>
|
154 |
+
<?php
|
155 |
+
global $wp_version;
|
156 |
+
if (version_compare($wp_version, '4','<')) {
|
157 |
+
?>
|
158 |
+
<style>
|
159 |
+
#wpwrap {
|
160 |
+
background-color: #F1F1F1;
|
161 |
+
}
|
162 |
+
@media screen and (max-width: 640px) {
|
163 |
+
.buttons_div input {
|
164 |
+
width: 31%;
|
165 |
+
font-size: 10px;
|
166 |
+
}
|
167 |
+
.tablenav{
|
168 |
+
height:auto
|
169 |
+
}
|
170 |
+
#wpcontent {
|
171 |
+
margin-left: 40px !important
|
172 |
+
}
|
173 |
+
.alignleft {
|
174 |
+
display:none;
|
175 |
+
}
|
176 |
+
}
|
177 |
+
</style>
|
178 |
+
<?php
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Edit.
|
184 |
+
*
|
185 |
+
* @param array $params
|
186 |
+
*/
|
187 |
+
public function edit( $params = array() ) {
|
188 |
+
$id = $params['id'];
|
189 |
+
$row = $params['row'];
|
190 |
+
$slides_row = $params['slides_row'];
|
191 |
+
$layers_row = $params['layers_row'];
|
192 |
+
$global_options = $params['global_options'];
|
193 |
+
$options_values = $params['options_values'];
|
194 |
+
$slider_preview_link = $params['slider_preview_link'];
|
195 |
+
$spider_uploader = isset($global_options->spider_uploader) ? $global_options->spider_uploader : 0;
|
196 |
+
$page_title = $params['page_title'];
|
197 |
+
$save_btn_name = $params['save_btn_name'];
|
198 |
+
$sub_tab_type = $params['sub_tab_type'];
|
199 |
+
// Get options values.
|
200 |
+
$aligns = $options_values['aligns'];
|
201 |
+
$border_styles = $options_values['border_styles'];
|
202 |
+
$button_styles = $options_values['button_styles'];
|
203 |
+
$bull_styles = $options_values['bull_styles'];
|
204 |
+
$font_families = $options_values['font_families'];
|
205 |
+
$google_fonts = $options_values['google_fonts'];
|
206 |
+
$font_weights = $options_values['font_weights'];
|
207 |
+
$social_buttons = $options_values['social_buttons'];
|
208 |
+
$effects = $options_values['effects'];
|
209 |
+
$layer_effects_in = $options_values['layer_effects_in'];
|
210 |
+
$layer_effects_out = $options_values['layer_effects_out'];
|
211 |
+
$hotp_text_positions = $options_values['hotp_text_positions'];
|
212 |
+
$slider_callbacks = $options_values['slider_callbacks'];
|
213 |
+
$layer_callbacks = $options_values['layer_callbacks'];
|
214 |
+
$text_alignments = $options_values['text_alignments'];
|
215 |
+
$built_in_watermark_fonts = $options_values['built_in_watermark_fonts'];
|
216 |
+
$slider_fillmode_option = $options_values['slider_fillmode_option'];
|
217 |
+
$free_effects = array('none', 'fade', 'sliceH', 'fan', 'scaleIn');
|
218 |
+
$fv = (WDS()->is_free && get_option("wds_theme_version") ? TRUE : FALSE);
|
219 |
+
|
220 |
+
$query_url = add_query_arg(array('action' => 'addImage', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif'), admin_url('admin-ajax.php'));
|
221 |
+
$query_url = wp_nonce_url($query_url, 'addImage', WDS()->nonce);
|
222 |
+
$slide_ids_string = '';
|
223 |
+
?>
|
224 |
+
<div class="spider_message_cont"></div>
|
225 |
+
<div class="spider_load">
|
226 |
+
<div class="spider_load_cont"></div>
|
227 |
+
<div class="spider_load_icon"><img class="spider_ajax_loading" src="<?php echo WDS()->plugin_url . '/images/ajax_loader_back.gif'; ?>"></div>
|
228 |
+
</div>
|
229 |
+
<form class="wrap wds_form wds-check-change_form js" method="post" id="sliders_form" action="admin.php?page=sliders_wds">
|
230 |
+
<h1 class="hidden"></h1>
|
231 |
+
<?php wp_nonce_field(WDS()->nonce, WDS()->nonce); ?>
|
232 |
+
<span class="slider-icon"></span>
|
233 |
+
<h2 class="wds_default"><?php echo $page_title; ?></h2>
|
234 |
+
<div class="buttons_conteiner">
|
235 |
+
<h1 class="wp-heading-inline"><?php _e('Slider Title', WDS()->prefix); ?></h1>
|
236 |
+
<input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="20" class="wds_requried" data-name="<?php _e('Slider title', WDS()->prefix); ?>" />
|
237 |
+
<div class="wds_buttons">
|
238 |
+
<button class="button button-primary button-large" onclick="spider_set_input_value('task', 'apply'); if(!wds_spider_ajax_save('sliders_form', event)) return false;">
|
239 |
+
<?php echo $save_btn_name; ?>
|
240 |
+
</button>
|
241 |
+
<button class="button button-large" <?php echo ($id == 0) ? 'disabled="disabled"' : 'onclick="window.open(\''. add_query_arg( array('slider_id' => $id), $slider_preview_link ) .'\', \'_blank\'); return false;"'; ?>><?php _e('Preview', WDS()->prefix); ?></button>
|
242 |
+
<button class="button button-secondary button-large wd-hidden reset-all-settings" onclick="wds_reset(event); return false;"><?php _e('Reset all settings', WDS()->prefix); ?></button>
|
243 |
+
</div>
|
244 |
+
</div>
|
245 |
+
<div>
|
246 |
+
<div class="tab_conteiner">
|
247 |
+
<div class="tab_button_wrap slides_tab_button_wrap" onclick="wds_change_tab(this, 'wds_slides_box')" >
|
248 |
+
<a class="wds_button-secondary wds_slides" href="#">
|
249 |
+
<span tab_type="slides" class="wds_tab_label"><span class="dashicons dashicons-format-gallery"></span><?php _e('Slides', WDS()->prefix); ?></span>
|
250 |
+
</a>
|
251 |
+
</div>
|
252 |
+
<div class="tab_button_wrap settings_tab_button_wrap" onclick="wds_change_tab(this, 'wds_settings_box')">
|
253 |
+
<a class="wds_button-secondary wds_settings" href="#">
|
254 |
+
<span tab_type="settings" class="wds_tab_label"><span class="dashicons dashicons-admin-generic"></span><?php _e('Settings', WDS()->prefix); ?></span>
|
255 |
+
</a>
|
256 |
+
</div>
|
257 |
+
<div class="tab_button_wrap howto_tab_button_wrap <?php echo (!$row->id) ? 'hide' : ''; ?>" onclick="wds_change_tab(this, 'wds_howto_box')">
|
258 |
+
<a class="wds_button-secondary wds_howto" href="#">
|
259 |
+
<span tab_type="howto" class="wds_tab_label"><span class="dashicons dashicons-editor-help"></span><?php _e('How to use', WDS()->prefix); ?></span>
|
260 |
+
</a>
|
261 |
+
</div>
|
262 |
+
</div>
|
263 |
+
<!--------------Settings tab----------->
|
264 |
+
<div class="wds_box wds_settings_box">
|
265 |
+
<div class="clear"></div>
|
266 |
+
<div class="wds_nav_tabs">
|
267 |
+
<div class="wds_menu_icon" onclick="jQuery('.wds_nav_tabs ul').slideToggle(500);"></div>
|
268 |
+
<ul>
|
269 |
+
<li tab_type="global" onclick="wds_change_nav(this, 'wds_nav_global_box')">
|
270 |
+
<a href="#"><?php _e('Global', WDS()->prefix); ?></a>
|
271 |
+
</li>
|
272 |
+
<li tab_type="carousel" onclick="wds_change_nav(this, 'wds_nav_carousel_box')">
|
273 |
+
<a href="#"><?php _e('Carousel', WDS()->prefix); ?></a>
|
274 |
+
</li>
|
275 |
+
<li tab_type="navigation" onclick="wds_change_nav(this, 'wds_nav_navigation_box')" >
|
276 |
+
<a href="#"><?php _e('Navigation', WDS()->prefix); ?></a>
|
277 |
+
</li>
|
278 |
+
<li tab_type="bullets" onclick="wds_change_nav(this, 'wds_nav_bullets_box')" >
|
279 |
+
<a href="#"><?php _e('Bullets', WDS()->prefix); ?></a>
|
280 |
+
</li>
|
281 |
+
<li tab_type="filmstrip" onclick="wds_change_nav(this, 'wds_nav_filmstrip_box')" >
|
282 |
+
<a href="#"><?php _e('Filmstrip', WDS()->prefix); ?></a>
|
283 |
+
</li>
|
284 |
+
<li tab_type="timer_bar" onclick="wds_change_nav(this, 'wds_nav_timer_bar_box')" >
|
285 |
+
<a href="#"><?php _e('Timer bar', WDS()->prefix); ?></a>
|
286 |
+
</li>
|
287 |
+
<li tab_type="watermark" onclick="wds_change_nav(this, 'wds_nav_watermark_box')" >
|
288 |
+
<a href="#"><?php _e('Watermark', WDS()->prefix); ?></a>
|
289 |
+
</li>
|
290 |
+
<li tab_type="css" onclick="wds_change_nav(this, 'wds_nav_css_box')" >
|
291 |
+
<a href="#"><?php _e('CSS', WDS()->prefix); ?></a>
|
292 |
+
</li>
|
293 |
+
<li tab_type="callbacks" onclick="wds_change_nav(this, 'wds_nav_callbacks_box')" >
|
294 |
+
<a href="#"><?php _e('Slider Callbacks', WDS()->prefix); ?></a>
|
295 |
+
</li>
|
296 |
+
</ul>
|
297 |
+
</div>
|
298 |
+
<div>
|
299 |
+
<div class="wds_nav_box wds_nav_global_box">
|
300 |
+
<div class="wd-table">
|
301 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
302 |
+
<div class="wd-box-section">
|
303 |
+
<div class="wd-box-content">
|
304 |
+
<span class="wd-group">
|
305 |
+
<input type="radio" onclick="hide_dimmension_ratio()" id="full_width2" name="full_width" <?php echo (($row->full_width == '2' || $row->full_width == '') ? 'checked="checked"' : ''); ?> value="2" />
|
306 |
+
<label <?php echo (($row->full_width == 2) ? 'class="selected_color"' : ''); ?> for="full_width2"><?php _e('Boxed layout', WDS()->prefix); ?></label>
|
307 |
+
<input type="radio" onclick="hide_dimmension_ratio()" id="full_width1" name="full_width" <?php echo (($row->full_width == '1') ? 'checked="checked"' : ''); ?> value="1" />
|
308 |
+
<label <?php echo ($row->full_width == 1) ? 'class="selected_color"' : ''; ?> for="full_width1"><?php _e('Full width', WDS()->prefix); ?></label>
|
309 |
+
<input type="radio" onclick="hide_dimmension_ratio()" id="full_width0" name="full_width" <?php echo (($row->full_width == '0') ? 'checked="checked"' : ''); ?> value="0" />
|
310 |
+
<label <?php echo ($row->full_width == 0) ? 'class="selected_color"' : ''; ?> for="full_width0"><?php _e('Custom', WDS()->prefix); ?></label>
|
311 |
+
<p class="description full_width_desc" id="full_width2_desc"><?php _e('With Boxed layout, the slideshow will take the 100% width of its parent container.', WDS()->prefix); ?></p>
|
312 |
+
<p class="description full_width_desc" id="full_width1_desc"><?php _e('The slider will take the full width of the page. Height will be applied based on the ratio of dimensions or auto height option.', WDS()->prefix); ?></p>
|
313 |
+
<p class="description full_width_desc" id="full_width0_desc"><?php _e('This option lets you specify custom dimensions for your slider.', WDS()->prefix); ?></p>
|
314 |
+
</span>
|
315 |
+
<span class="wd-group" id="auto_height">
|
316 |
+
<label class="wd-label"><?php _e('Auto height', WDS()->prefix); ?></label>
|
317 |
+
<input type="radio" onclick="hide_dimmension_ratio()" id="auto_height1" name="auto_height" <?php echo (($row->auto_height) ? 'checked="checked"' : ''); ?> value="1" />
|
318 |
+
<label <?php echo (($row->auto_height) ? 'class="selected_color"' : ''); ?> for="auto_height1"><?php _e('Yes', WDS()->prefix); ?></label>
|
319 |
+
<input type="radio" onclick="hide_dimmension_ratio()" id="auto_height0" name="auto_height" <?php echo (($row->auto_height) ? '' : 'checked="checked"'); ?> value="0" />
|
320 |
+
<label <?php echo ($row->auto_height) ? '' : 'class="selected_color"'; ?> for="auto_height0"><?php _e('No', WDS()->prefix); ?></label>
|
321 |
+
<p class="description"><?php _e('The slider will take the full height of the screen.', WDS()->prefix); ?></p>
|
322 |
+
</span>
|
323 |
+
<span class="wd-group" id="dimensions">
|
324 |
+
<label class="wd-label"><?php _e('Dimensions', WDS()->prefix); ?></label>
|
325 |
+
<input type="text" name="width" id="width" value="<?php echo $row->width; ?>" class="spider_int_input" onchange="wds_whr('width')" onkeypress="return spider_check_isnum(event)" /> x
|
326 |
+
<input type="text" name="height" id="height" value="<?php echo $row->height; ?>" class="spider_int_input" onchange="wds_whr('height')" onkeypress="return spider_check_isnum(event)" /> px
|
327 |
+
<input type="text" name="ratio" id="ratio" value="" class="spider_int_input" onchange="wds_whr('ratio')" onkeypress="return spider_check_isnum(event)" title = "<?php _e('The slider height will be applied based on the ratio of dimensions.', WDS()->prefix); ?>"/><?php _e(' ratio', WDS()->prefix); ?>
|
328 |
+
<p class="description"><?php _e('Maximum width and height for slider.', WDS()->prefix); ?></p>
|
329 |
+
</span>
|
330 |
+
<span class="wd-group">
|
331 |
+
<label class="wd-label" for="effect"><?php _e('Effect', WDS()->prefix); ?></label>
|
332 |
+
<select class="select_icon select_icon_320" name="effect" id="effect">
|
333 |
+
<?php
|
334 |
+
foreach ($effects as $key => $effect) {
|
335 |
+
?>
|
336 |
+
<option value="<?php echo $key; ?>" <?php echo (WDS()->is_free && !in_array($key, $free_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> <?php if ($row->effect == $key) echo 'selected="selected"'; ?>><?php echo $effect; ?></option>
|
337 |
+
<?php
|
338 |
+
}
|
339 |
+
?>
|
340 |
+
</select>
|
341 |
+
<p class="description"><?php _e('Select the effect which will be applied when navigating through slides.', WDS()->prefix); ?></p>
|
342 |
+
</span>
|
343 |
+
<span class="wd-group">
|
344 |
+
<label class="wd-label" for="effect_duration"><?php _e('Еffect duration', WDS()->prefix); ?></label>
|
345 |
+
<input type="text" id="effect_duration" name="effect_duration" value="<?php echo $row->effect_duration; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> ms
|
346 |
+
<p class="description"><?php _e('Set the duration for the effect.', WDS()->prefix); ?></p>
|
347 |
+
</span>
|
348 |
+
<span class="wd-group">
|
349 |
+
<label class="wd-label" for="hide_on_mobile"><?php _e('Hide on small screens', WDS()->prefix); ?></label>
|
350 |
+
<input type="text" id="hide_on_mobile" name="hide_on_mobile" value="<?php echo $row->hide_on_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
351 |
+
<p class="description"><?php _e('Hide slider when screen size is smaller than this value.', WDS()->prefix); ?></p>
|
352 |
+
</span>
|
353 |
+
<span class="wd-group">
|
354 |
+
<label class="wd-label" for="full_width_for_mobile"><?php _e('Full width on small screens', WDS()->prefix); ?></label>
|
355 |
+
<input type="text" id="full_width_for_mobile" name="full_width_for_mobile" value="<?php echo $row->full_width_for_mobile; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
356 |
+
<p class="description"><?php _e('The slider will have full width when screen size is smaller than this value.', WDS()->prefix); ?></p>
|
357 |
+
</span>
|
358 |
+
<span class="wd-group" id="tr_smart_crop">
|
359 |
+
<label class="wd-label"><?php _e('Smart Crop', WDS()->prefix); ?></label>
|
360 |
+
<input onClick="wds_enable_disable('', 'tr_crop_pos', 'smart_crop1')" type="radio" id="smart_crop1" name="smart_crop" <?php echo (($row->smart_crop) ? 'checked="checked"' : ''); ?> value="1" />
|
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>
|
368 |
+
<table class="wds_position_table">
|
369 |
+
<tbody>
|
370 |
+
<tr>
|
371 |
+
<td class="wds_position_td"><input type="radio" value="left top" name="crop_image_position" <?php if ($row->crop_image_position == "left top") echo 'checked="checked"'; ?> ></td>
|
372 |
+
<td class="wds_position_td"><input type="radio" value="center top" name="crop_image_position" <?php if ($row->crop_image_position == "center top") echo 'checked="checked"'; ?> ></td>
|
373 |
+
<td class="wds_position_td"><input type="radio" value="right top" name="crop_image_position" <?php if ($row->crop_image_position == "right top") echo 'checked="checked"'; ?> ></td>
|
374 |
+
</tr>
|
375 |
+
<tr>
|
376 |
+
<td class="wds_position_td"><input type="radio" value="left center" name="crop_image_position" <?php if ($row->crop_image_position == "left center") echo 'checked="checked"'; ?> ></td>
|
377 |
+
<td class="wds_position_td"><input type="radio" value="center center" name="crop_image_position" <?php if ($row->crop_image_position == "center center") echo 'checked="checked"'; ?> ></td>
|
378 |
+
<td class="wds_position_td"><input type="radio" value="right center" name="crop_image_position" <?php if ($row->crop_image_position == "right center") echo 'checked="checked"'; ?> ></td>
|
379 |
+
</tr>
|
380 |
+
<tr>
|
381 |
+
<td class="wds_position_td"><input type="radio" value="left bottom" name="crop_image_position" <?php if ($row->crop_image_position == "left bottom") echo 'checked="checked"'; ?> ></td>
|
382 |
+
<td class="wds_position_td"><input type="radio" value="center bottom" name="crop_image_position" <?php if ($row->crop_image_position == "center bottom") echo 'checked="checked"'; ?> ></td>
|
383 |
+
<td class="wds_position_td"><input type="radio" value="right bottom" name="crop_image_position" <?php if ($row->crop_image_position == "right bottom") echo 'checked="checked"'; ?> ></td>
|
384 |
+
</tr>
|
385 |
+
</tbody>
|
386 |
+
</table>
|
387 |
+
</span>
|
388 |
+
<span class="wd-group">
|
389 |
+
<label class="wd-label"><?php _e('Fixed background:', WDS()->prefix); ?></label>
|
390 |
+
<input type="radio" id="fixed_bg1" name="fixed_bg" <?php echo (($row->fixed_bg) ? 'checked="checked"' : ''); ?> value="1" />
|
391 |
+
<label <?php echo (($row->fixed_bg) ? 'class="selected_color"' : ''); ?> for="fixed_bg1"><?php _e('Yes', WDS()->prefix); ?></label>
|
392 |
+
<input type="radio" id="fixed_bg0" name="fixed_bg" <?php echo (($row->fixed_bg) ? '' : 'checked="checked"'); ?> value="0" />
|
393 |
+
<label <?php echo ((!$row->fixed_bg) ? 'class="selected_color"' : ''); ?> for="fixed_bg0"><?php _e('No', WDS()->prefix); ?></label>
|
394 |
+
<p class="description"></p>
|
395 |
+
</span>
|
396 |
+
<span class="wd-group">
|
397 |
+
<label class="wd-label"><?php _e('Slides order direction:', WDS()->prefix); ?></label>
|
398 |
+
<input type="radio" id="order_dir1" name="order_dir" <?php echo checked('asc', $row->order_dir); ?> value="asc" />
|
399 |
+
<label <?php echo (($row->order_dir == 'asc') ? 'class="selected_color"' : ''); ?> for="order_dir1"><?php _e('Ascending', WDS()->prefix); ?></label>
|
400 |
+
<input type="radio" id="order_dir0" name="order_dir" <?php checked('desc', $row->order_dir); ?> value="desc" />
|
401 |
+
<label <?php echo (($row->order_dir == 'desc') ? 'class="selected_color"' : ''); ?> for="order_dir0"><?php _e('Descending', WDS()->prefix); ?></label>
|
402 |
+
<p class="description"></p>
|
403 |
+
</span>
|
404 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
405 |
+
<label class="wd-label"><?php _e('Parallax Effect', WDS()->prefix); ?></label>
|
406 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="parallax_effect1" name="parallax_effect" <?php echo (($row->parallax_effect) ? 'checked="checked"' : ''); ?> value="1" />
|
407 |
+
<label <?php echo (($row->parallax_effect) ? 'class="selected_color"' : ''); ?> for="parallax_effect1"><?php _e('Yes', WDS()->prefix); ?></label>
|
408 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="parallax_effect0" name="parallax_effect" <?php echo (($row->parallax_effect) ? '' : 'checked="checked"'); ?> value="0" />
|
409 |
+
<label <?php echo (($row->parallax_effect) ? '' : 'class="selected_color"'); ?> for="parallax_effect0"><?php _e('No', WDS()->prefix); ?></label>
|
410 |
+
<p class="description"><?php _e('The direction of the movement, as well as the layer moving pace depend on the z-index value.', WDS()->prefix); ?></p>
|
411 |
+
</span>
|
412 |
+
<span class="wd-group">
|
413 |
+
<label class="wd-label"><?php _e('Smart Load', WDS()->prefix); ?></label>
|
414 |
+
<input type="radio" id="preload_images1" name="preload_images" <?php echo (($row->preload_images) ? 'checked="checked"' : ''); ?> value="1" />
|
415 |
+
<label <?php echo (($row->preload_images) ? 'class="selected_color"' : ''); ?> for="preload_images1"><?php _e('Yes', WDS()->prefix); ?></label>
|
416 |
+
<input type="radio" id="preload_images0" name="preload_images" <?php echo (($row->preload_images) ? '' : 'checked="checked"'); ?> value="0" />
|
417 |
+
<label <?php echo (($row->preload_images) ? '' : 'class="selected_color"'); ?> for="preload_images0"><?php _e('No', WDS()->prefix); ?></label>
|
418 |
+
<p class="description"><?php _e('Turn this option on to have faster loading for the first few images and process the rest meanwhile.', WDS()->prefix); ?></p>
|
419 |
+
</span>
|
420 |
+
<span class="wd-group">
|
421 |
+
<label class="wd-label"><?php _e('Right click protection', WDS()->prefix); ?></label>
|
422 |
+
<input type="radio" name="image_right_click" id="image_right_click_1" value="1" <?php if ($row->image_right_click) echo 'checked="checked"'; ?> />
|
423 |
+
<label <?php echo $row->image_right_click ? 'class="selected_color"' : ''; ?> for="image_right_click_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
424 |
+
<input type="radio" name="image_right_click" id="image_right_click_0" value="0" <?php if (!$row->image_right_click) echo 'checked="checked"'; ?> />
|
425 |
+
<label <?php echo $row->image_right_click ? '' : 'class="selected_color"'; ?> for="image_right_click_0"><?php _e('No', WDS()->prefix); ?></label>
|
426 |
+
<p class="description"><?php _e('Disable right-click on slider images.', WDS()->prefix); ?></p>
|
427 |
+
</span>
|
428 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
429 |
+
<label class="wd-label"><?php _e('Layer out on next', WDS()->prefix); ?></label>
|
430 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" name="layer_out_next" id="layer_out_next_1" value="1" <?php if ($row->layer_out_next) echo 'checked="checked"'; ?> />
|
431 |
+
<label <?php echo $row->layer_out_next ? 'class="selected_color"' : ''; ?> for="layer_out_next_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
432 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" name="layer_out_next" id="layer_out_next_0" value="0" <?php if (!$row->layer_out_next) echo 'checked="checked"'; ?> />
|
433 |
+
<label <?php echo $row->layer_out_next ? '' : 'class="selected_color"'; ?> for="layer_out_next_0"><?php _e('No', WDS()->prefix); ?></label>
|
434 |
+
<p class="description"><?php _e('Enable this option to have the layer effect out regardless of the timing between the hit to the next slider.', WDS()->prefix); ?></p>
|
435 |
+
</span>
|
436 |
+
<span class="wd-group">
|
437 |
+
<label class="wd-label"><?php _e('Published', WDS()->prefix); ?></label>
|
438 |
+
<input type="radio" id="published1" name="published" <?php echo (($row->published) ? 'checked="checked"' : ''); ?> value="1" />
|
439 |
+
<label <?php echo (($row->published) ? 'class="selected_color"' : ''); ?> for="published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
440 |
+
<input type="radio" id="published0" name="published" <?php echo (($row->published) ? '' : 'checked="checked"'); ?> value="0" />
|
441 |
+
<label <?php echo (($row->published) ? '' : 'class="selected_color"'); ?> for="published0"><?php _e('No', WDS()->prefix); ?></label>
|
442 |
+
<p class="description"></p>
|
443 |
+
</span>
|
444 |
+
</div>
|
445 |
+
</div>
|
446 |
+
</div>
|
447 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
448 |
+
<div class="wd-box-section">
|
449 |
+
<div class="wd-box-content">
|
450 |
+
<span class="wd-group">
|
451 |
+
<label class="wd-label"><?php _e('Autoplay', WDS()->prefix); ?></label>
|
452 |
+
<input type="radio" id="autoplay1" name="autoplay" <?php echo (($row->autoplay) ? 'checked="checked"' : ''); ?> value="1" />
|
453 |
+
<label <?php echo (($row->autoplay) ? 'class="selected_color"' : ''); ?> for="autoplay1"><?php _e('Yes', WDS()->prefix); ?></label>
|
454 |
+
<input type="radio" id="autoplay0" name="autoplay" <?php echo (($row->autoplay) ? '' : 'checked="checked"'); ?> value="0" />
|
455 |
+
<label <?php echo (($row->autoplay) ? '' : 'class="selected_color"'); ?> for="autoplay0"><?php _e('No', WDS()->prefix); ?></label>
|
456 |
+
<p class="description"><?php _e('Enable this option to autoplay the slider.', WDS()->prefix); ?></p>
|
457 |
+
</span>
|
458 |
+
<span class="wd-group">
|
459 |
+
<label class="wd-label" for="time_intervval"><?php _e('Time Interval', WDS()->prefix); ?></label>
|
460 |
+
<input type="text" id="time_intervval" name="time_intervval" value="<?php echo $row->time_intervval; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> sec.
|
461 |
+
<p class="description"><?php _e('Set the time interval between the slides when autoplay is on.', WDS()->prefix); ?></p>
|
462 |
+
</span>
|
463 |
+
<span class="wd-group">
|
464 |
+
<label class="wd-label"><?php _e('Enable loop', WDS()->prefix); ?></label>
|
465 |
+
<input type="radio" id="slider_loop1" name="slider_loop" <?php echo (($row->slider_loop) ? 'checked="checked"' : ''); ?> value="1" />
|
466 |
+
<label <?php echo (($row->slider_loop) ? 'class="selected_color"' : ''); ?> for="slider_loop1"><?php _e('Yes', WDS()->prefix); ?></label>
|
467 |
+
<input type="radio" id="slider_loop0" name="slider_loop" <?php echo (($row->slider_loop) ? '' : 'checked="checked"'); ?> value="0" />
|
468 |
+
<label <?php echo (($row->slider_loop) ? '' : 'class="selected_color"'); ?> for="slider_loop0"><?php _e('No', WDS()->prefix); ?></label>
|
469 |
+
<p class="description"></p>
|
470 |
+
</span>
|
471 |
+
<span class="wd-group">
|
472 |
+
<label class="wd-label"><?php _e('Shuffle', WDS()->prefix); ?></label>
|
473 |
+
<input type="radio" id="shuffle1" name="shuffle" <?php echo (($row->shuffle) ? 'checked="checked"' : ''); ?> value="1" />
|
474 |
+
<label <?php echo (($row->shuffle) ? 'class="selected_color"' : ''); ?> for="shuffle1"><?php _e('Yes', WDS()->prefix); ?></label>
|
475 |
+
<input type="radio" id="shuffle0" name="shuffle" <?php echo (($row->shuffle) ? '' : 'checked="checked"'); ?> value="0" />
|
476 |
+
<label <?php echo (($row->shuffle) ? '' : 'class="selected_color"'); ?> for="shuffle0"><?php _e('No', WDS()->prefix); ?></label>
|
477 |
+
<p class="description"><?php _e('Enable this setting to have the slides change in random order during autoplay.', WDS()->prefix); ?></p>
|
478 |
+
</span>
|
479 |
+
<span class="wd-group">
|
480 |
+
<label class="wd-label"><?php _e('Two way slideshow', WDS()->prefix); ?></label>
|
481 |
+
<input type="radio" id="twoway_slideshow1" name="twoway_slideshow" <?php echo (($row->twoway_slideshow) ? 'checked="checked"' : ''); ?> value="1" />
|
482 |
+
<label <?php echo (($row->twoway_slideshow) ? 'class="selected_color"' : ''); ?> for="twoway_slideshow1"><?php _e('Yes', WDS()->prefix); ?></label>
|
483 |
+
<input type="radio" id="twoway_slideshow0" name="twoway_slideshow" <?php echo (($row->twoway_slideshow) ? '' : 'checked="checked"'); ?> value="0" />
|
484 |
+
<label <?php echo (($row->twoway_slideshow) ? '' : 'class="selected_color"'); ?> for="twoway_slideshow0"><?php _e('No', WDS()->prefix); ?></label>
|
485 |
+
<p class="description"><?php _e('If the user switches to previous slide, the slideshow starts to go backwards during autoplay.', WDS()->prefix); ?></p>
|
486 |
+
</span>
|
487 |
+
<span class="wd-group">
|
488 |
+
<label class="wd-label"><?php _e('Stop on hover', WDS()->prefix); ?></label>
|
489 |
+
<input type="radio" id="stop_animation1" name="stop_animation" <?php echo (($row->stop_animation) ? 'checked="checked"' : ''); ?> value="1" />
|
490 |
+
<label <?php echo (($row->stop_animation) ? 'class="selected_color"' : ''); ?> for="stop_animation1"><?php _e('Yes', WDS()->prefix); ?></label>
|
491 |
+
<input type="radio" id="stop_animation0" name="stop_animation" <?php echo (($row->stop_animation) ? '' : 'checked="checked"'); ?> value="0" />
|
492 |
+
<label <?php echo (($row->stop_animation) ? '' : 'class="selected_color"'); ?> for="stop_animation0"><?php _e('No', WDS()->prefix); ?></label>
|
493 |
+
<p class="description"><?php _e('The option works when autoplay is on.', WDS()->prefix); ?></p>
|
494 |
+
</span>
|
495 |
+
<span class="wd-group">
|
496 |
+
<label class="wd-label" for="start_slide_num"><?php _e('Start with slide', WDS()->prefix); ?></label>
|
497 |
+
<input type="text" name="start_slide_num" id="start_slide_num" value="<?php echo $row->start_slide_num; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" />
|
498 |
+
<p class="description"><?php _e('The slider will start from the specified slide. Set the value to 0 for random.', WDS()->prefix); ?></p>
|
499 |
+
</span>
|
500 |
+
<span class="wd-group">
|
501 |
+
<label class="wd-label"><?php _e('Music', WDS()->prefix); ?></label>
|
502 |
+
<input type="radio" id="music1" name="music" <?php echo (($row->music) ? 'checked="checked"' : ''); ?> value="1" onClick="wds_enable_disable('', 'tr_music_url', 'music1')" />
|
503 |
+
<label <?php echo (($row->music) ? 'class="selected_color"' : ''); ?> for="music1"><?php _e('Yes', WDS()->prefix); ?></label>
|
504 |
+
<input type="radio" id="music0" name="music" <?php echo (($row->music) ? '' : 'checked="checked"'); ?> value="0" onClick="wds_enable_disable('none', 'tr_music_url', 'music0')" />
|
505 |
+
<label <?php echo (($row->music) ? '' : 'class="selected_color"'); ?> for="music0"><?php _e('No', WDS()->prefix); ?></label>
|
506 |
+
<p class="description"><?php _e('You can have music/audio track playback with the slider.', WDS()->prefix); ?></p>
|
507 |
+
</span>
|
508 |
+
<span class="wd-group" id="tr_music_url">
|
509 |
+
<label class="wd-label" for="music_url"><?php _e('Music url', WDS()->prefix); ?></label>
|
510 |
+
<input type="text" id="music_url" name="music_url" size="39" value="<?php echo $row->music_url; ?>" style="display:inline-block;" />
|
511 |
+
<input id="add_music_url" class="button button-secondary" type="button" onclick="wds_media_uploader('music', event, false); return false;" value="<?php _e('Add music', WDS()->prefix); ?>" />
|
512 |
+
<p class="description"><?php _e('Only .aac,.m4a,.f4a,.mp3,.ogg,.oga formats are supported.', WDS()->prefix); ?></p>
|
513 |
+
</span>
|
514 |
+
<span class="wd-group">
|
515 |
+
<label class="wd-label" for="align"><?php _e('Slider alignment', WDS()->prefix); ?></label>
|
516 |
+
<select class="select_icon select_icon_320" name="align" id="align">
|
517 |
+
<?php
|
518 |
+
foreach ($aligns as $key => $align) {
|
519 |
+
?>
|
520 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->align == $key) ? 'selected="selected"' : ''); ?>><?php echo $align; ?></option>
|
521 |
+
<?php
|
522 |
+
}
|
523 |
+
?>
|
524 |
+
</select>
|
525 |
+
<p class="description"><?php _e('Set the alignment of the slider.', WDS()->prefix); ?></p>
|
526 |
+
</span>
|
527 |
+
<span class="wd-group">
|
528 |
+
<label class="wd-label" for="background_color"><?php _e('Background color', WDS()->prefix); ?></label>
|
529 |
+
<input type="text" name="background_color" id="background_color" value="<?php echo $row->background_color; ?>" class="color" onchange="jQuery('div[id^=\'wds_preview_image\']').css({backgroundColor: wds_hex_rgba(jQuery(this).val(), 100 - jQuery('#background_transparent').val())})" />
|
530 |
+
<input id="background_transparent" name="background_transparent" class="spider_int_input" type="text" onchange="jQuery('div[id^=\'wds_preview_image\']').css({backgroundColor: wds_hex_rgba(jQuery('#background_color').val(), 100 - jQuery(this).val())})" onkeypress="return spider_check_isnum(event)" value="<?php echo $row->background_transparent; ?>" /> %
|
531 |
+
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
532 |
+
</span>
|
533 |
+
<span class="wd-group">
|
534 |
+
<label class="wd-label" for="glb_border_width"><?php _e('Border', WDS()->prefix); ?></label>
|
535 |
+
<input type="text" name="glb_border_width" id="glb_border_width" value="<?php echo $row->glb_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
536 |
+
<select class="select_icon select_icon_320" name="glb_border_style" id="glb_border_style">
|
537 |
+
<?php
|
538 |
+
foreach ($border_styles as $key => $border_style) {
|
539 |
+
?>
|
540 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->glb_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
541 |
+
<?php
|
542 |
+
}
|
543 |
+
?>
|
544 |
+
</select>
|
545 |
+
<input type="text" name="glb_border_color" id="glb_border_color" value="<?php echo $row->glb_border_color; ?>" class="color" />
|
546 |
+
<p class="description"><?php _e('Set the border width, type and the color.', WDS()->prefix); ?></p>
|
547 |
+
</span>
|
548 |
+
<span class="wd-group">
|
549 |
+
<label class="wd-label" for="glb_border_radius"><?php _e('Border radius', WDS()->prefix); ?></label>
|
550 |
+
<input type="text" name="glb_border_radius" id="glb_border_radius" value="<?php echo $row->glb_border_radius; ?>" class="spider_char_input" />
|
551 |
+
<p class="description"><?php _e('Use CSS type values (e.g. 4px).', WDS()->prefix); ?></p>
|
552 |
+
</span>
|
553 |
+
<span class="wd-group">
|
554 |
+
<label class="wd-label" for="glb_margin"><?php _e('Margin', WDS()->prefix); ?></label>
|
555 |
+
<input type="text" name="glb_margin" id="glb_margin" value="<?php echo $row->glb_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
556 |
+
<p class="description"><?php _e('Set a margin for the slider.', WDS()->prefix); ?></p>
|
557 |
+
</span>
|
558 |
+
<span class="wd-group">
|
559 |
+
<label class="wd-label" for="glb_box_shadow"><?php _e('Shadow', WDS()->prefix); ?></label>
|
560 |
+
<input type="text" name="glb_box_shadow" id="glb_box_shadow" value="<?php echo $row->glb_box_shadow; ?>" class="spider_box_input" />
|
561 |
+
<p class="description"><?php _e('Use CSS type values (e.g. 10px 10px 5px #888888).', WDS()->prefix); ?></p>
|
562 |
+
</span>
|
563 |
+
</div>
|
564 |
+
</div>
|
565 |
+
</div>
|
566 |
+
</div>
|
567 |
+
</div>
|
568 |
+
<div class="wds_nav_box wds_nav_carousel_box<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
569 |
+
<div class="wd-table">
|
570 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
571 |
+
<div class="wd-box-section">
|
572 |
+
<div class="wd-box-content">
|
573 |
+
<?php
|
574 |
+
if ( WDS()->is_free ) {
|
575 |
+
echo WDW_S_Library::message_id(0, __('Carousel is disabled in free version.', WDS()->prefix), 'error');
|
576 |
+
}
|
577 |
+
?>
|
578 |
+
<span class="wd-group">
|
579 |
+
<label class="wd-label"><?php _e('Carousel:', WDS()->prefix); ?></label>
|
580 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel1" name="carousel" <?php echo (($row->carousel) ? 'checked="checked"' : ''); ?> value="1" onClick="showhide_for_carousel_fildes(1)"/>
|
581 |
+
<label <?php echo (($row->carousel) ? 'class="selected_color"' : ''); ?> for="carousel1"><?php _e('Yes', WDS()->prefix); ?></label>
|
582 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel0" name="carousel" <?php echo (($row->carousel) ? '' : 'checked="checked"'); ?> value="0" onClick="showhide_for_carousel_fildes(0)"/>
|
583 |
+
<label <?php echo (($row->carousel) ? '' : 'class="selected_color"'); ?> for="carousel0"><?php _e('No', WDS()->prefix); ?></label>
|
584 |
+
<p class="description"><?php _e('Use this option to activate Carousel feature. Note, that the effects you have selected in Global settings for your slider will not apply.', WDS()->prefix); ?></p>
|
585 |
+
</span>
|
586 |
+
<span class="wd-group">
|
587 |
+
<label class="wd-label" for="carousel_image_counts"><?php _e('Number of images for carousel:', WDS()->prefix); ?></label>
|
588 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_image_counts" name="carousel_image_counts" value="<?php echo $row->carousel_image_counts; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" />
|
589 |
+
<p class="description"></p>
|
590 |
+
</span>
|
591 |
+
<span class="wd-group">
|
592 |
+
<label class="wd-label" for="carousel_image_parameters"><?php _e('Carousel image ratio:', WDS()->prefix); ?></label>
|
593 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_image_parameters" name="carousel_image_parameters" value="<?php echo $row->carousel_image_parameters; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" />
|
594 |
+
<p class="description"><?php _e('The value must be between 0 and 1.', WDS()->prefix); ?></p>
|
595 |
+
</span>
|
596 |
+
<span class="wd-group">
|
597 |
+
<label class="wd-label"><?php _e('Container fit:', WDS()->prefix); ?></label>
|
598 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel_fit_containerWidth1" name="carousel_fit_containerWidth" <?php echo (($row->carousel_fit_containerWidth) ? 'checked="checked"' : ''); ?> value="1" />
|
599 |
+
<label <?php echo (($row->carousel_fit_containerWidth) ? 'class="selected_color"' : ''); ?> for="carousel_fit_containerWidth1"><?php _e('Yes', WDS()->prefix); ?></label>
|
600 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="carousel_fit_containerWidth0" name="carousel_fit_containerWidth" <?php echo (($row->carousel_fit_containerWidth) ? '' : 'checked="checked"'); ?> value="0" />
|
601 |
+
<label <?php echo (($row->carousel_fit_containerWidth) ? '' : 'class="selected_color"'); ?> for="carousel_fit_containerWidth0"><?php _e('No', WDS()->prefix); ?></label>
|
602 |
+
<p class="description"></p>
|
603 |
+
</span>
|
604 |
+
</div>
|
605 |
+
</div>
|
606 |
+
</div>
|
607 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
608 |
+
<div class="wd-box-section">
|
609 |
+
<div class="wd-box-content">
|
610 |
+
<span class="wd-group">
|
611 |
+
<label class="wd-label" for="carousel_width"><?php _e('Fixed width:', WDS()->prefix); ?></label>
|
612 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_width" name="carousel_width" value="<?php echo $row->carousel_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
613 |
+
<p class="description"></p>
|
614 |
+
</span>
|
615 |
+
<span class="wd-group">
|
616 |
+
<label class="wd-label" for="carousel_degree"><?php _e('Background image angle:', WDS()->prefix); ?></label>
|
617 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="carousel_degree" name="carousel_degree" value="<?php echo $row->carousel_degree; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> deg
|
618 |
+
<p class="description"></p>
|
619 |
+
</span>
|
620 |
+
<span class="wd-group">
|
621 |
+
<label class="wd-label" for="carousel_grayscale"><?php _e('Background image grayscale:', WDS()->prefix); ?></label>
|
622 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="carousel_grayscale" id="carousel_grayscale" value="<?php echo $row->carousel_grayscale; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/>%
|
623 |
+
<p class="description"><?php _e('You can change the color scheme for background images to grayscale. Values must be between 0 to 100', WDS()->prefix); ?></p>
|
624 |
+
</span>
|
625 |
+
<span class="wd-group">
|
626 |
+
<label class="wd-label" for="carousel_transparency"><?php _e('Background image transparency:', WDS()->prefix); ?></label>
|
627 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="carousel_transparency" id="carousel_transparency" value="<?php echo $row->carousel_transparency; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/>%
|
628 |
+
<p class="description"><?php _e('You can set transparency level for background images. Values should be between 0 to 100', WDS()->prefix); ?></p>
|
629 |
+
</span>
|
630 |
+
</div>
|
631 |
+
</div>
|
632 |
+
</div>
|
633 |
+
</div>
|
634 |
+
</div>
|
635 |
+
<div class="wds_nav_box wds_nav_navigation_box">
|
636 |
+
<div class="wd-table">
|
637 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
638 |
+
<div class="wd-box-section">
|
639 |
+
<div class="wd-box-content">
|
640 |
+
<span class="wd-group">
|
641 |
+
<label class="wd-label"><?php _e('Next / Previous buttons:', WDS()->prefix); ?></label>
|
642 |
+
<input type="radio" name="prev_next_butt" id="prev_next_butt_1" value="1" <?php if ($row->prev_next_butt) echo 'checked="checked"'; ?> />
|
643 |
+
<label <?php echo $row->prev_next_butt ? 'class="selected_color"' : ''; ?> for="prev_next_butt_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
644 |
+
<input type="radio" name="prev_next_butt" id="prev_next_butt_0" value="0" <?php if (!$row->prev_next_butt) echo 'checked="checked"'; ?> />
|
645 |
+
<label <?php echo $row->prev_next_butt ? '' : 'class="selected_color"'; ?> for="prev_next_butt_0"><?php _e('No', WDS()->prefix); ?></label>
|
646 |
+
<p class="description"><?php _e('Enable this option to display Previous and Next buttons.', WDS()->prefix); ?></p>
|
647 |
+
</span>
|
648 |
+
<span class="wd-group">
|
649 |
+
<label class="wd-label"><?php _e('Mouse swipe navigation:', WDS()->prefix); ?></label>
|
650 |
+
<input type="radio" name="mouse_swipe_nav" id="mouse_swipe_nav_1" value="1" <?php if ($row->mouse_swipe_nav) echo 'checked="checked"'; ?> />
|
651 |
+
<label <?php echo $row->mouse_swipe_nav ? 'class="selected_color"' : ''; ?> for="mouse_swipe_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
652 |
+
<input type="radio" name="mouse_swipe_nav" id="mouse_swipe_nav_0" value="0" <?php if (!$row->mouse_swipe_nav) echo 'checked="checked"'; ?> />
|
653 |
+
<label <?php echo $row->mouse_swipe_nav ? '' : 'class="selected_color"'; ?> for="mouse_swipe_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
654 |
+
<p class="description"></p>
|
655 |
+
</span>
|
656 |
+
<span class="wd-group">
|
657 |
+
<label class="wd-label"><?php _e('Touch swipe navigation:', WDS()->prefix); ?></label>
|
658 |
+
<input type="radio" name="touch_swipe_nav" id="touch_swipe_nav_1" value="1" <?php if ($row->touch_swipe_nav) echo 'checked="checked"'; ?> />
|
659 |
+
<label <?php echo $row->touch_swipe_nav ? 'class="selected_color"' : ''; ?> for="touch_swipe_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
660 |
+
<input type="radio" name="touch_swipe_nav" id="touch_swipe_nav_0" value="0" <?php if (!$row->touch_swipe_nav) echo 'checked="checked"'; ?> />
|
661 |
+
<label <?php echo $row->touch_swipe_nav ? '' : 'class="selected_color"'; ?> for="touch_swipe_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
662 |
+
<p class="description"></p>
|
663 |
+
</span>
|
664 |
+
<span class="wd-group">
|
665 |
+
<label class="wd-label"><?php _e('Mouse wheel navigation:', WDS()->prefix); ?></label>
|
666 |
+
<input type="radio" name="mouse_wheel_nav" id="mouse_wheel_nav_1" value="1" <?php if ($row->mouse_wheel_nav) echo 'checked="checked"'; ?> />
|
667 |
+
<label <?php echo $row->mouse_wheel_nav ? 'class="selected_color"' : ''; ?> for="mouse_wheel_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
668 |
+
<input type="radio" name="mouse_wheel_nav" id="mouse_wheel_nav_0" value="0" <?php if (!$row->mouse_wheel_nav) echo 'checked="checked"'; ?> />
|
669 |
+
<label <?php echo $row->mouse_wheel_nav ? '' : 'class="selected_color"'; ?> for="mouse_wheel_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
670 |
+
<p class="description"></p>
|
671 |
+
</span>
|
672 |
+
<span class="wd-group">
|
673 |
+
<label class="wd-label"><?php _e('Keyboard navigation:', WDS()->prefix); ?></label>
|
674 |
+
<input type="radio" name="keyboard_nav" id="keyboard_nav_1" value="1" <?php if ($row->keyboard_nav) echo 'checked="checked"'; ?> />
|
675 |
+
<label <?php echo $row->keyboard_nav ? 'class="selected_color"' : ''; ?> for="keyboard_nav_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
676 |
+
<input type="radio" name="keyboard_nav" id="keyboard_nav_0" value="0" <?php if (!$row->keyboard_nav) echo 'checked="checked"'; ?> />
|
677 |
+
<label <?php echo $row->keyboard_nav ? '' : 'class="selected_color"'; ?> for="keyboard_nav_0"><?php _e('No', WDS()->prefix); ?></label>
|
678 |
+
<p class="description"></p>
|
679 |
+
</span>
|
680 |
+
<span class="wd-group">
|
681 |
+
<label class="wd-label"><?php _e('Show Navigation buttons:', WDS()->prefix); ?></label>
|
682 |
+
<input type="radio" name="navigation" id="navigation_1" value="hover" <?php if ($row->navigation == 'hover') echo 'checked="checked"'; ?> />
|
683 |
+
<label <?php echo $row->navigation == 'hover' ? 'class="selected_color"' : ''; ?> for="navigation_1"><?php _e('On hover', WDS()->prefix); ?></label>
|
684 |
+
<input type="radio" name="navigation" id="navigation_0" value="always" <?php if ($row->navigation == 'always' ) echo 'checked="checked"'; ?> />
|
685 |
+
<label <?php echo $row->navigation == 'always' ? 'class="selected_color"' : ''; ?> for="navigation_0"><?php _e('Always', WDS()->prefix); ?></label>
|
686 |
+
<p class="description"></p>
|
687 |
+
</span>
|
688 |
+
<span class="wd-group">
|
689 |
+
<label class="wd-label"><?php _e('Image for Next / Previous buttons:', WDS()->prefix); ?></label>
|
690 |
+
<input type="radio" name="rl_butt_img_or_not" id="rl_butt_img_or_not_our" value="our" <?php if ($row->rl_butt_img_or_not == 'our') echo 'checked="checked"'; ?> onClick="image_for_next_prev_butt('our')" />
|
691 |
+
<label <?php if ($row->rl_butt_img_or_not == 'our') echo 'class="selected_color"'; ?> for="rl_butt_img_or_not_our"><?php _e('Default', WDS()->prefix); ?></label>
|
692 |
+
<input type="radio" name="rl_butt_img_or_not" id="rl_butt_img_or_not_cust" value="custom" <?php if ($row->rl_butt_img_or_not == 'custom') echo 'checked="checked"'; ?> onClick="image_for_next_prev_butt('custom')" />
|
693 |
+
<label <?php if ($row->rl_butt_img_or_not == 'custom') echo 'class="selected_color"'; ?> for="rl_butt_img_or_not_cust"><?php _e('Custom', WDS()->prefix); ?></label>
|
694 |
+
<input type="radio" name="rl_butt_img_or_not" id="rl_butt_img_or_not_style" value="style" <?php if ($row->rl_butt_img_or_not == 'style') echo 'checked="checked"'; ?> onClick="image_for_next_prev_butt('style')" />
|
695 |
+
<label <?php if ($row->rl_butt_img_or_not == 'style') echo 'class="selected_color"'; ?> for="rl_butt_img_or_not_style"><?php _e('Styled', WDS()->prefix); ?></label>
|
696 |
+
<input type="hidden" id="right_butt_url" name="right_butt_url" value="<?php echo $row->right_butt_url; ?>" />
|
697 |
+
<input type="hidden" id="right_butt_hov_url" name="right_butt_hov_url" value="<?php echo $row->right_butt_hov_url; ?>" />
|
698 |
+
<input type="hidden" id="left_butt_url" name="left_butt_url" value="<?php echo $row->left_butt_url; ?>" />
|
699 |
+
<input type="hidden" id="left_butt_hov_url" name="left_butt_hov_url" value="<?php echo $row->left_butt_hov_url; ?>" />
|
700 |
+
<p class="description"><?php _e('You can select to use default navigation buttons or to upload custom icons.', WDS()->prefix); ?></p>
|
701 |
+
</span>
|
702 |
+
<span class="wd-group" id="right_left_butt_style">
|
703 |
+
<label class="wd-label" for="rl_butt_style"><?php _e('Next / Previous buttons style:', WDS()->prefix); ?></label>
|
704 |
+
<div style="display: table;">
|
705 |
+
<div style="display: table-cell; vertical-align: middle;">
|
706 |
+
<select class="select_icon select_icon_320" name="rl_butt_style" id="rl_butt_style" onchange="change_rl_butt_style(jQuery(this).val())">
|
707 |
+
<?php
|
708 |
+
foreach ($button_styles as $key => $button_style) {
|
709 |
+
?>
|
710 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->rl_butt_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $button_style; ?></option>
|
711 |
+
<?php
|
712 |
+
}
|
713 |
+
?>
|
714 |
+
</select>
|
715 |
+
</div>
|
716 |
+
<div style="display: table-cell; vertical-align: middle; background-color: rgba(229, 229, 229, 0.62); text-align: center;">
|
717 |
+
<i id="wds_left_style" class="fa <?php echo $row->rl_butt_style; ?>-left" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
718 |
+
<i id="wds_right_style" class="fa <?php echo $row->rl_butt_style; ?>-right" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
719 |
+
</div>
|
720 |
+
</div>
|
721 |
+
<p class="description"><?php _e('Choose the style of the button you prefer to have as navigation buttons.', WDS()->prefix); ?></p>
|
722 |
+
</span>
|
723 |
+
<span class="wd-group" id="right_butt_upl">
|
724 |
+
<label class="wd-label"><?php _e('Upload buttons images:', WDS()->prefix); ?></label>
|
725 |
+
<div style="display: table;">
|
726 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
727 |
+
<?php
|
728 |
+
if (!$spider_uploader) {
|
729 |
+
?>
|
730 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_left_but', event, false); return false;" value="<?php _e('Previous Button', WDS()->prefix); ?>" />
|
731 |
+
<?php
|
732 |
+
}
|
733 |
+
else {
|
734 |
+
?>
|
735 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_left_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Previous Button', WDS()->prefix); ?>" onclick="return false;">
|
736 |
+
<?php _e('Previous Button', WDS()->prefix); ?>
|
737 |
+
</a>
|
738 |
+
<?php
|
739 |
+
}
|
740 |
+
?>
|
741 |
+
<?php
|
742 |
+
if (!$spider_uploader) {
|
743 |
+
?>
|
744 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_left_hov_but', event, false); return false;" value="<?php _e('Previous Button Hover', WDS()->prefix); ?>" />
|
745 |
+
<?php
|
746 |
+
}
|
747 |
+
else {
|
748 |
+
?>
|
749 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_left_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Previous Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
750 |
+
<?php _e('Previous Button Hover', WDS()->prefix); ?>
|
751 |
+
</a>
|
752 |
+
<?php
|
753 |
+
}
|
754 |
+
?>
|
755 |
+
</div>
|
756 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
757 |
+
<?php
|
758 |
+
if (!$spider_uploader) {
|
759 |
+
?>
|
760 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_right_but', event, false); return false;" value="<?php _e('Next Button', WDS()->prefix); ?>" />
|
761 |
+
<?php
|
762 |
+
}
|
763 |
+
else {
|
764 |
+
?>
|
765 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_right_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Next Button', WDS()->prefix); ?>" onclick="return false;">
|
766 |
+
<?php _e('Next Button', WDS()->prefix); ?>
|
767 |
+
</a>
|
768 |
+
<?php
|
769 |
+
}
|
770 |
+
?>
|
771 |
+
<?php
|
772 |
+
if (!$spider_uploader) {
|
773 |
+
?>
|
774 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('nav_right_hov_but', event, false); return false;" value="<?php _e('Next Button Hover', WDS()->prefix); ?>" />
|
775 |
+
<?php
|
776 |
+
}
|
777 |
+
else {
|
778 |
+
?>
|
779 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'nav_right_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Next Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
780 |
+
<?php _e('Next Button Hover', WDS()->prefix); ?>
|
781 |
+
</a>
|
782 |
+
<?php
|
783 |
+
}
|
784 |
+
?>
|
785 |
+
</div>
|
786 |
+
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="display_block">
|
787 |
+
<img id="left_butt_img" src="<?php echo $row->left_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
788 |
+
<img id="right_butt_img" src="<?php echo $row->right_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
789 |
+
<img id="left_butt_hov_img" src="<?php echo $row->left_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
790 |
+
<img id="right_butt_hov_img" src="<?php echo $row->right_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
791 |
+
</div>
|
792 |
+
<div style="display: table-cell; text-align: center; vertical-align: middle;" class="display_block wds_reverse_cont">
|
793 |
+
<input type="button" class="button button-small wds_reverse" onclick="wds_change_custom_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
794 |
+
</div>
|
795 |
+
</div>
|
796 |
+
<script>
|
797 |
+
var wds_rl_butt_type = [];
|
798 |
+
var rl_butt_dir = '<?php echo WDS()->plugin_url . '/images/arrow/'; ?>';
|
799 |
+
var type_cur_fold = '1';
|
800 |
+
<?php
|
801 |
+
$folder_names = scandir(WDS()->plugin_dir . '/images/arrow');
|
802 |
+
$cur_fold_name = '';
|
803 |
+
$cur_type_key = '';
|
804 |
+
$cur_color_key = '';
|
805 |
+
$cur_sub_fold_names = array();
|
806 |
+
array_splice($folder_names, 0, 2);
|
807 |
+
$flag = FALSE;
|
808 |
+
foreach ($folder_names as $type_key => $folder_name) {
|
809 |
+
if (is_dir(WDS()->plugin_dir . '/images/arrow/' . $folder_name)) {
|
810 |
+
?>
|
811 |
+
wds_rl_butt_type["<?php echo $type_key; ?>"] = [];
|
812 |
+
wds_rl_butt_type["<?php echo $type_key; ?>"]["type_name"] = "<?php echo $folder_name; ?>";
|
813 |
+
<?php
|
814 |
+
if ($row->left_butt_url != '') {
|
815 |
+
/* Getting current button's type folder and color folder.*/
|
816 |
+
$check_cur_fold = explode('/' , $row->left_butt_url);
|
817 |
+
if (in_array($folder_name, $check_cur_fold)) {
|
818 |
+
$flag = TRUE;
|
819 |
+
$cur_fold_name = $folder_name;
|
820 |
+
$cur_type_key = $type_key;
|
821 |
+
$cur_sub_fold_names = scandir(WDS()->plugin_dir . '/images/arrow/' . $cur_fold_name);
|
822 |
+
array_splice($cur_sub_fold_names, 0, 2);
|
823 |
+
?>
|
824 |
+
type_cur_fold = '<?php echo $cur_type_key;?>';
|
825 |
+
<?php
|
826 |
+
}
|
827 |
+
}
|
828 |
+
$sub_folder_names = scandir( WDS()->plugin_dir . '/images/arrow/' . $folder_name);
|
829 |
+
array_splice($sub_folder_names, 0, 2);
|
830 |
+
foreach ($sub_folder_names as $color_key => $sub_folder_name) {
|
831 |
+
if (is_dir(WDS()->plugin_dir . '/images/arrow/' . $folder_name . '/' . $sub_folder_name)) {
|
832 |
+
if ($cur_fold_name == $folder_name) {
|
833 |
+
/* Getting current button's color key.*/
|
834 |
+
if (in_array($sub_folder_name, $check_cur_fold)) {
|
835 |
+
$cur_color_key = $color_key;
|
836 |
+
}
|
837 |
+
}
|
838 |
+
?>
|
839 |
+
wds_rl_butt_type["<?php echo $type_key; ?>"]["<?php echo $color_key; ?>"] = "<?php echo $sub_folder_name; ?>";
|
840 |
+
<?php
|
841 |
+
}
|
842 |
+
}
|
843 |
+
}
|
844 |
+
else {
|
845 |
+
?>
|
846 |
+
console.log('<?php echo $folder_name . " is not a directory."; ?>');
|
847 |
+
<?php
|
848 |
+
}
|
849 |
+
}
|
850 |
+
?>
|
851 |
+
</script>
|
852 |
+
</span>
|
853 |
+
<span class="wd-group" id="right_left_butt_select">
|
854 |
+
<label class="wd-label" for="right_butt_url"><?php _e('Choose buttons:', WDS()->prefix); ?></label>
|
855 |
+
<div style="display: table; margin-bottom: 14px;">
|
856 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
857 |
+
<div style="display: block; width: 122px;" class="default_buttons">
|
858 |
+
<div class="spider_choose_option" onclick="wds_choose_option(this)">
|
859 |
+
<div class="spider_option_main_title"><?php _e('Choose group', WDS()->prefix); ?></div>
|
860 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE"></i></div>
|
861 |
+
</div>
|
862 |
+
<div class="spider_options_cont">
|
863 |
+
<?php
|
864 |
+
foreach ($folder_names as $type_key => $folder_name) {
|
865 |
+
?>
|
866 |
+
<div class="spider_option_cont wds_rl_butt_groups" value="<?php echo $type_key; ?>" <?php echo (($cur_type_key == $type_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_rl_butt_type(this)">
|
867 |
+
<div class="spider_option_cont_title">
|
868 |
+
<?php _e('Group', WDS()->prefix); echo '-' . ++$type_key; ?>
|
869 |
+
</div>
|
870 |
+
<div class="spider_option_cont_img">
|
871 |
+
<img class="src_top_left" style="display: inline-block; width: 14px; height: 14px;" />
|
872 |
+
<img class="src_top_right" style="display: inline-block; width: 14px; height: 14px;" />
|
873 |
+
<img class="src_bottom_left" style="display: inline-block; width: 14px; height: 14px;" />
|
874 |
+
<img class="src_bottom_right" style="display: inline-block; width: 14px; height: 14px;" />
|
875 |
+
</div>
|
876 |
+
</div>
|
877 |
+
<?php
|
878 |
+
}
|
879 |
+
if (!$flag) {
|
880 |
+
/* Folder doesn't exist.*/
|
881 |
+
?>
|
882 |
+
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
883 |
+
<?php
|
884 |
+
}
|
885 |
+
?>
|
886 |
+
</div>
|
887 |
+
</div>
|
888 |
+
</div>
|
889 |
+
<div style="display:table-cell;vertical-align: middle;" class="display_block">
|
890 |
+
<div style="display: block; width: 122px; margin-left: 12px;" class="default_buttons">
|
891 |
+
<div class="spider_choose_option" onclick="<?php echo (WDS()->is_free ? 'alert(\'' . addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) . '\')' : 'wds_choose_option_color(this)'); ?>">
|
892 |
+
<div class="spider_option_main_title"><?php _e('Choose color', WDS()->prefix); ?></div>
|
893 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color:#1E8CBE"></i></div>
|
894 |
+
</div>
|
895 |
+
<div class="spider_options_color_cont">
|
896 |
+
<?php
|
897 |
+
foreach ($cur_sub_fold_names as $color_key => $cur_sub_fold_name) {
|
898 |
+
?>
|
899 |
+
<div class="spider_option_cont wds_rl_butt_col_groups" value="<?php echo $color_key; ?>" <?php echo (($cur_color_key == $color_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_rl_butt_color(this,<?php echo $cur_type_key; ?>)">
|
900 |
+
<div class="spider_option_cont_title" >
|
901 |
+
<?php _e('Color', WDS()->prefix); echo '-' . ++$color_key; ?>
|
902 |
+
</div>
|
903 |
+
<div class="spider_option_cont_img">
|
904 |
+
<img class="src_col_top_left" style="display:inline-block; width: 14px; height: 14px;" />
|
905 |
+
<img class="src_col_top_right" style="display:inline-block; width: 14px; height: 14px;" />
|
906 |
+
<img class="src_col_bottom_left" style="display:inline-block; width: 14px; height: 14px;" />
|
907 |
+
<img class="src_col_bottom_right" style="display:inline-block; width: 14px; height: 14px;" />
|
908 |
+
</div>
|
909 |
+
</div>
|
910 |
+
<?php
|
911 |
+
}
|
912 |
+
if (!$flag) {
|
913 |
+
/* Folder doesn't exist.*/
|
914 |
+
?>
|
915 |
+
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
916 |
+
<?php
|
917 |
+
}
|
918 |
+
?>
|
919 |
+
</div>
|
920 |
+
</div>
|
921 |
+
</div>
|
922 |
+
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;" class="display_block">
|
923 |
+
<div style=" display: block; margin-left: 12px; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="play_buttons_cont">
|
924 |
+
<img id="rl_butt_img_l" src="<?php echo $row->left_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
925 |
+
<img id="rl_butt_img_r" src="<?php echo $row->right_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
926 |
+
<img id="rl_butt_hov_img_l" src="<?php echo $row->left_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
927 |
+
<img id="rl_butt_hov_img_r" src="<?php echo $row->right_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
928 |
+
</div>
|
929 |
+
</div>
|
930 |
+
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
931 |
+
<input type="button" class="button button-small wds_reverse" onclick="change_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
932 |
+
</div>
|
933 |
+
</div>
|
934 |
+
<p class="description"><?php _e('Choose the type and color of navigation buttons.', WDS()->prefix); ?></p>
|
935 |
+
</span>
|
936 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="right_left_butt_size">
|
937 |
+
<label class="wd-label" for="rl_butt_size"><?php _e('Next / Previous buttons size:', WDS()->prefix); ?></label>
|
938 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="rl_butt_size" id="rl_butt_size" value="<?php echo $row->rl_butt_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
939 |
+
<p class="description"><?php _e('Set the size of Next and Previous buttons.', WDS()->prefix); ?></p>
|
940 |
+
</span>
|
941 |
+
</div>
|
942 |
+
</div>
|
943 |
+
</div>
|
944 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
945 |
+
<div class="wd-box-section">
|
946 |
+
<div class="wd-box-content">
|
947 |
+
<span class="wd-group">
|
948 |
+
<label class="wd-label"><?php _e('Play / Pause button:', WDS()->prefix); ?></label>
|
949 |
+
<input type="radio" name="play_paus_butt" id="play_paus_butt_1" value="1" <?php if ($row->play_paus_butt) echo 'checked="checked"'; ?> />
|
950 |
+
<label <?php if ($row->play_paus_butt) echo 'class="selected_color"'; ?> for="play_paus_butt_1"><?php _e('Yes', WDS()->prefix); ?></label>
|
951 |
+
<input type="radio" name="play_paus_butt" id="play_paus_butt_0" value="0" <?php if (!$row->play_paus_butt) echo 'checked="checked"'; ?> />
|
952 |
+
<label <?php if (!$row->play_paus_butt) echo 'class="selected_color"'; ?> for="play_paus_butt_0"><?php _e('No', WDS()->prefix); ?></label>
|
953 |
+
<p class="description"><?php _e('Select this option to display Play and Pause buttons.', WDS()->prefix); ?></p>
|
954 |
+
</span>
|
955 |
+
<span class="wd-group">
|
956 |
+
<label class="wd-label"><?php _e('Image for Play / Pause buttons:', WDS()->prefix); ?></label>
|
957 |
+
<input type="radio" name="play_paus_butt_img_or_not" id="play_pause_butt_img_or_not_our" value="our" <?php if ($row->play_paus_butt_img_or_not == 'our') echo 'checked="checked"'; ?> onClick="image_for_play_pause_butt('our')" />
|
958 |
+
<label <?php if ($row->play_paus_butt_img_or_not == 'our') echo 'class="selected_color"'; ?> for="play_pause_butt_img_or_not_our"><?php _e('Default', WDS()->prefix); ?></label>
|
959 |
+
<input type="radio" name="play_paus_butt_img_or_not" id="play_pause_butt_img_or_not_cust" value="custom" <?php if ($row->play_paus_butt_img_or_not == 'custom') echo 'checked="checked"'; ?> onClick="image_for_play_pause_butt('custom')" />
|
960 |
+
<label <?php if ($row->play_paus_butt_img_or_not == 'custom') echo 'class="selected_color"'; ?> for="play_pause_butt_img_or_not_cust"><?php _e('Custom', WDS()->prefix); ?></label>
|
961 |
+
<input type="radio" name="play_paus_butt_img_or_not" id="play_pause_butt_img_or_not_select" value="style" <?php if ($row->play_paus_butt_img_or_not == 'style') echo 'checked="checked"'; ?> onClick="image_for_play_pause_butt('style')" />
|
962 |
+
<label <?php if ($row->play_paus_butt_img_or_not == 'style') echo 'class="selected_color"'; ?> for="play_pause_butt_img_or_not_select"><?php _e('Styled', WDS()->prefix); ?></label>
|
963 |
+
<input type="hidden" id="play_butt_url" name="play_butt_url" value="<?php echo $row->play_butt_url; ?>" />
|
964 |
+
<input type="hidden" id="play_butt_hov_url" name="play_butt_hov_url" value="<?php echo $row->play_butt_hov_url; ?>" />
|
965 |
+
<input type="hidden" id="paus_butt_url" name="paus_butt_url" value="<?php echo $row->paus_butt_url; ?>" />
|
966 |
+
<input type="hidden" id="paus_butt_hov_url" name="paus_butt_hov_url" value="<?php echo $row->paus_butt_hov_url; ?>" />
|
967 |
+
<p class="description"><?php _e('You can use default Play and Pause buttons or to upload custom icons.', WDS()->prefix); ?></p>
|
968 |
+
</span>
|
969 |
+
<span class="wd-group" id="play_pause_butt_style">
|
970 |
+
<label class="wd-label" for="pp_butt_style"><?php _e('Play / Pause buttons style:', WDS()->prefix); ?></label>
|
971 |
+
<div style="display: table-cell; vertical-align: middle; background-color: rgba(229, 229, 229, 0.62); text-align: center;">
|
972 |
+
<i id="wds_play_style" class="fa fa-play" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
973 |
+
<i id="wds_paus_style" class="fa fa-pause" style="color: #<?php echo $row->butts_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
974 |
+
</div>
|
975 |
+
</span>
|
976 |
+
<span class="wd-group" id="play_pause_butt_cust">
|
977 |
+
<label class="wd-label"><?php _e('Upload buttons images:', WDS()->prefix); ?></label>
|
978 |
+
<div style="display: table;">
|
979 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
980 |
+
<?php
|
981 |
+
if (!$spider_uploader) {
|
982 |
+
?>
|
983 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('play_but', event, false); return false;" value="<?php _e('Play Button', WDS()->prefix); ?>" />
|
984 |
+
<?php
|
985 |
+
}
|
986 |
+
else {
|
987 |
+
?>
|
988 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'play_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Play Button', WDS()->prefix); ?>" onclick="return false;">
|
989 |
+
<?php _e('Play Button', WDS()->prefix); ?>
|
990 |
+
</a>
|
991 |
+
<?php
|
992 |
+
}
|
993 |
+
?>
|
994 |
+
<?php
|
995 |
+
if (!$spider_uploader) {
|
996 |
+
?>
|
997 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('play_hov_but', event, false); return false;" value="<?php _e('Play Button Hover', WDS()->prefix); ?>" />
|
998 |
+
<?php
|
999 |
+
}
|
1000 |
+
else {
|
1001 |
+
?>
|
1002 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'play_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Play Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
1003 |
+
<?php _e('Play Button Hover', WDS()->prefix); ?>
|
1004 |
+
</a>
|
1005 |
+
<?php
|
1006 |
+
}
|
1007 |
+
?>
|
1008 |
+
</div>
|
1009 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
1010 |
+
<?php
|
1011 |
+
if (!$spider_uploader) {
|
1012 |
+
?>
|
1013 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('paus_but', event, false); return false;" value="<?php _e('Pause Button', WDS()->prefix); ?>" />
|
1014 |
+
<?php
|
1015 |
+
}
|
1016 |
+
else {
|
1017 |
+
?>
|
1018 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'paus_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Pause Button', WDS()->prefix); ?>" onclick="return false;">
|
1019 |
+
<?php _e('Pause Button', WDS()->prefix); ?>
|
1020 |
+
</a>
|
1021 |
+
<?php
|
1022 |
+
}
|
1023 |
+
?>
|
1024 |
+
<?php
|
1025 |
+
if (!$spider_uploader) {
|
1026 |
+
?>
|
1027 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('paus_hov_but', event, false); return false;" value="<?php _e('Pause Button Hover', WDS()->prefix); ?>" />
|
1028 |
+
<?php
|
1029 |
+
}
|
1030 |
+
else {
|
1031 |
+
?>
|
1032 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'paus_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Pause Button Hover', WDS()->prefix); ?>" onclick="return false;">
|
1033 |
+
<?php _e('Pause Button Hover', WDS()->prefix); ?>
|
1034 |
+
</a>
|
1035 |
+
<?php
|
1036 |
+
}
|
1037 |
+
?>
|
1038 |
+
</div>
|
1039 |
+
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="display_block">
|
1040 |
+
<img id="play_butt_img" src="<?php echo $row->play_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1041 |
+
<img id="paus_butt_img" src="<?php echo $row->paus_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1042 |
+
<img id="play_butt_hov_img" src="<?php echo $row->play_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1043 |
+
<img id="paus_butt_hov_img" src="<?php echo $row->paus_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1044 |
+
</div>
|
1045 |
+
<div style="display: table-cell; text-align: center; vertical-align: middle;" class="display_block wds_reverse_cont">
|
1046 |
+
<input type="button" class="button button-small wds_reverse" onclick="wds_change_play_paus_custom_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1047 |
+
</div>
|
1048 |
+
</div>
|
1049 |
+
<script>
|
1050 |
+
var wds_pp_butt_type = [];
|
1051 |
+
var pp_butt_dir = '<?php echo WDS()->plugin_url . '/images/button/'; ?>';
|
1052 |
+
var pp_type_cur_fold = '1';
|
1053 |
+
<?php
|
1054 |
+
$folder_names = scandir(WDS()->plugin_dir . '/images/button');
|
1055 |
+
$butt_cur_fold_name = '';
|
1056 |
+
$butt_cur_type_key = '';
|
1057 |
+
$butt_cur_color_key = '';
|
1058 |
+
$butt_cur_sub_fold_names = array();
|
1059 |
+
array_splice($folder_names, 0, 2);
|
1060 |
+
$flag = FALSE;
|
1061 |
+
foreach ($folder_names as $type_key => $folder_name) {
|
1062 |
+
if (is_dir(WDS()->plugin_dir . '/images/button/' . $folder_name)) {
|
1063 |
+
?>
|
1064 |
+
wds_pp_butt_type["<?php echo $type_key; ?>"] = [];
|
1065 |
+
wds_pp_butt_type["<?php echo $type_key; ?>"]["type_name"] = "<?php echo $folder_name; ?>";
|
1066 |
+
<?php
|
1067 |
+
if ($row->play_butt_url != '') {
|
1068 |
+
/* Getting current button's type folder and color folder.*/
|
1069 |
+
$check_butt_cur_fold = explode('/' , $row->play_butt_url);
|
1070 |
+
if (in_array($folder_name, $check_butt_cur_fold)) {
|
1071 |
+
$flag = TRUE;
|
1072 |
+
$butt_cur_fold_name = $folder_name;
|
1073 |
+
$butt_cur_type_key = $type_key;
|
1074 |
+
$butt_cur_sub_fold_names = scandir(WDS()->plugin_dir . '/images/button/' . $butt_cur_fold_name);
|
1075 |
+
array_splice($butt_cur_sub_fold_names, 0, 2);
|
1076 |
+
?>
|
1077 |
+
pp_type_cur_fold = '<?php echo $butt_cur_type_key;?>';
|
1078 |
+
<?php
|
1079 |
+
}
|
1080 |
+
}
|
1081 |
+
$sub_folder_names = scandir( WDS()->plugin_dir . '/images/button/' . $folder_name);
|
1082 |
+
array_splice($sub_folder_names, 0, 2);
|
1083 |
+
foreach ($sub_folder_names as $color_key => $sub_folder_name) {
|
1084 |
+
if (is_dir(WDS()->plugin_dir . '/images/button/' . $folder_name . '/' . $sub_folder_name)) {
|
1085 |
+
if ($butt_cur_fold_name == $folder_name) {
|
1086 |
+
/* Getting current button's color key.*/
|
1087 |
+
if (in_array($sub_folder_name, $check_butt_cur_fold)) {
|
1088 |
+
$butt_cur_color_key = $color_key;
|
1089 |
+
}
|
1090 |
+
}
|
1091 |
+
?>
|
1092 |
+
wds_pp_butt_type["<?php echo $type_key; ?>"]["<?php echo $color_key; ?>"] = "<?php echo $sub_folder_name; ?>";
|
1093 |
+
<?php
|
1094 |
+
}
|
1095 |
+
}
|
1096 |
+
}
|
1097 |
+
else {
|
1098 |
+
?>
|
1099 |
+
console.log('<?php echo $folder_name . " is not a directory."; ?>');
|
1100 |
+
<?php
|
1101 |
+
}
|
1102 |
+
}
|
1103 |
+
?>
|
1104 |
+
</script>
|
1105 |
+
</span>
|
1106 |
+
<span class="wd-group" id="play_pause_butt_select">
|
1107 |
+
<label class="wd-label" for="right_butt_url"><?php _e('Choose buttons:', WDS()->prefix); ?></label>
|
1108 |
+
<div style="display: table; margin-bottom: 14px;">
|
1109 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block" >
|
1110 |
+
<div style="display: block; width: 122px;" class="default_buttons">
|
1111 |
+
<div class="spider_choose_option" onclick="wds_choose_pp_option(this)">
|
1112 |
+
<div class="spider_option_main_title"><?php _e('Choose group', WDS()->prefix); ?></div>
|
1113 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE"></i></div>
|
1114 |
+
</div>
|
1115 |
+
<div class="spider_pp_options_cont">
|
1116 |
+
<?php
|
1117 |
+
foreach ($folder_names as $type_key => $folder_name) {
|
1118 |
+
?>
|
1119 |
+
<div class="spider_option_cont wds_pp_butt_groups" value="<?php echo $type_key; ?>" <?php echo (($butt_cur_type_key == $type_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_play_paus_butt_type(this)">
|
1120 |
+
<div class="spider_option_cont_title">
|
1121 |
+
<?php _e('Group', WDS()->prefix); echo '-' . ++$type_key; ?>
|
1122 |
+
</div>
|
1123 |
+
<div class="spider_option_cont_img">
|
1124 |
+
<img class="pp_src_top_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1125 |
+
<img class="pp_src_top_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1126 |
+
<img class="pp_src_bottom_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1127 |
+
<img class="pp_src_bottom_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1128 |
+
</div>
|
1129 |
+
</div>
|
1130 |
+
<?php
|
1131 |
+
}
|
1132 |
+
if (!$flag) {
|
1133 |
+
/* Folder doesn't exist.*/
|
1134 |
+
?>
|
1135 |
+
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1136 |
+
<?php
|
1137 |
+
}
|
1138 |
+
?>
|
1139 |
+
</div>
|
1140 |
+
</div>
|
1141 |
+
</div>
|
1142 |
+
<div style="display:table-cell;vertical-align: middle;" class="display_block">
|
1143 |
+
<div style="display: block; width: 122px; margin-left: 12px;" class="default_buttons">
|
1144 |
+
<div class="spider_choose_option" onclick="<?php echo (WDS()->is_free ? 'alert(\'' . addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) . '\')' : 'wds_choose_pp_option_color(this)'); ?>">
|
1145 |
+
<div class="spider_option_main_title"><?php _e('Choose color', WDS()->prefix); ?></div>
|
1146 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color:#1E8CBE"></i></div>
|
1147 |
+
</div>
|
1148 |
+
<div class="spider_pp_options_color_cont">
|
1149 |
+
<?php
|
1150 |
+
foreach ($butt_cur_sub_fold_names as $color_key => $cur_sub_fold_name) {
|
1151 |
+
?>
|
1152 |
+
<div class="spider_option_cont wds_pp_butt_col_groups" value="<?php echo $color_key; ?>" <?php echo (($butt_cur_color_key == $color_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_play_paus_butt_color(this, <?php echo $cur_type_key; ?>)">
|
1153 |
+
<div class="spider_option_cont_title" >
|
1154 |
+
<?php _e('Color', WDS()->prefix); echo '-' . ++$color_key; ?>
|
1155 |
+
</div>
|
1156 |
+
<div class="spider_option_cont_img">
|
1157 |
+
<img class="pp_src_col_top_left" style="display:inline-block; width: 14px; height: 14px;" />
|
1158 |
+
<img class="pp_src_col_top_right" style="display:inline-block; width: 14px; height: 14px;" />
|
1159 |
+
<img class="pp_src_col_bottom_left" style="display:inline-block; width: 14px; height: 14px;" />
|
1160 |
+
<img class="pp_src_col_bottom_right" style="display:inline-block; width: 14px; height: 14px;" />
|
1161 |
+
</div>
|
1162 |
+
</div>
|
1163 |
+
<?php
|
1164 |
+
}
|
1165 |
+
if (!$flag) {
|
1166 |
+
/* Folder doesn't exist.*/
|
1167 |
+
?>
|
1168 |
+
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1169 |
+
<?php
|
1170 |
+
}
|
1171 |
+
?>
|
1172 |
+
</div>
|
1173 |
+
</div>
|
1174 |
+
</div>
|
1175 |
+
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;" class="display_block">
|
1176 |
+
<div style=" display: block; margin-left: 12px; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;" class="play_buttons_cont">
|
1177 |
+
<img id="pp_butt_img_play" src="<?php echo $row->play_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1178 |
+
<img id="pp_butt_img_paus" src="<?php echo $row->paus_butt_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1179 |
+
<img id="pp_butt_hov_img_play" src="<?php echo $row->play_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1180 |
+
<img id="pp_butt_hov_img_paus" src="<?php echo $row->paus_butt_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1181 |
+
</div>
|
1182 |
+
</div>
|
1183 |
+
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
1184 |
+
<input type="button" class="button button-small wds_reverse" onclick="change_play_paus_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1185 |
+
</div>
|
1186 |
+
</div>
|
1187 |
+
<p class="description"><?php _e('Choose the type and color of navigation buttons.', WDS()->prefix); ?></p>
|
1188 |
+
</span>
|
1189 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="play_pause_butt_size">
|
1190 |
+
<label class="wd-label" for="pp_butt_size"><?php _e('Play / Pause button size:', WDS()->prefix); ?></label>
|
1191 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="pp_butt_size" id="pp_butt_size" value="<?php echo $row->pp_butt_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1192 |
+
<p class="description"><?php _e('Set the size of Play and Pause buttons.', WDS()->prefix); ?></p>
|
1193 |
+
</span>
|
1194 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="tr_butts_color">
|
1195 |
+
<label class="wd-label" for="butts_color"><?php _e('Buttons color:', WDS()->prefix); ?></label>
|
1196 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="butts_color" id="butts_color" value="<?php echo $row->butts_color; ?>" class="color" onchange="jQuery('#wds_left_style,#wds_right_style,#wds_play_style,#wds_paus_style').css({color: '#' + jQuery(this).val()})" />
|
1197 |
+
<p class="description"><?php _e('Select a color for the navigation buttons.', WDS()->prefix); ?></p>
|
1198 |
+
</span>
|
1199 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="tr_hover_color">
|
1200 |
+
<label class="wd-label" for="hover_color"><?php _e('Hover color:', WDS()->prefix); ?></label>
|
1201 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="hover_color" id="hover_color" value="<?php echo $row->hover_color; ?>" class="color" />
|
1202 |
+
<p class="description"><?php _e('Select a hover color for the navigation buttons.', WDS()->prefix); ?></p>
|
1203 |
+
</span>
|
1204 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1205 |
+
<label class="wd-label" for="nav_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
1206 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_border_width" id="nav_border_width" value="<?php echo $row->nav_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1207 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="nav_border_style" id="nav_border_style">
|
1208 |
+
<?php
|
1209 |
+
foreach ($border_styles as $key => $border_style) {
|
1210 |
+
?>
|
1211 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->nav_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
1212 |
+
<?php
|
1213 |
+
}
|
1214 |
+
?>
|
1215 |
+
</select>
|
1216 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_border_color" id="nav_border_color" value="<?php echo $row->nav_border_color; ?>" class="color" />
|
1217 |
+
<p class="description"><?php _e('Select the type, size and the color of border for the navigation buttons.', WDS()->prefix); ?></p>
|
1218 |
+
</span>
|
1219 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1220 |
+
<label class="wd-label" for="nav_border_radius"><?php _e('Border radius:', WDS()->prefix); ?></label>
|
1221 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_border_radius" id="nav_border_radius" value="<?php echo $row->nav_border_radius; ?>" class="spider_char_input" />
|
1222 |
+
<p class="description"><?php _e('Use CSS type values (e.g. 4px).', WDS()->prefix); ?></p>
|
1223 |
+
</span>
|
1224 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1225 |
+
<label class="wd-label" for="nav_bg_color"><?php _e('Background color:', WDS()->prefix); ?></label>
|
1226 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="nav_bg_color" id="nav_bg_color" value="<?php echo $row->nav_bg_color; ?>" class="color" />
|
1227 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="butts_transparent" id="butts_transparent" value="<?php echo $row->butts_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
1228 |
+
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
1229 |
+
</span>
|
1230 |
+
</div>
|
1231 |
+
</div>
|
1232 |
+
</div>
|
1233 |
+
</div>
|
1234 |
+
</div>
|
1235 |
+
<div class="wds_nav_box wds_nav_bullets_box">
|
1236 |
+
<div class="wd-table">
|
1237 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1238 |
+
<div class="wd-box-section">
|
1239 |
+
<div class="wd-box-content">
|
1240 |
+
<span class="wd-group">
|
1241 |
+
<label class="wd-label"><?php _e('Enable bullets:', WDS()->prefix); ?></label>
|
1242 |
+
<input type="radio" id="enable_bullets1" name="enable_bullets" <?php echo (($row->enable_bullets) ? 'checked="checked"' : ''); ?> value="1" />
|
1243 |
+
<label <?php echo (($row->enable_bullets) ? 'class="selected_color"' : ''); ?> for="enable_bullets1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1244 |
+
<input type="radio" id="enable_bullets0" name="enable_bullets" <?php echo (($row->enable_bullets) ? '' : 'checked="checked"'); ?> value="0" />
|
1245 |
+
<label <?php echo (($row->enable_bullets) ? '' : 'class="selected_color"'); ?> for="enable_bullets0"><?php _e('No', WDS()->prefix); ?></label>
|
1246 |
+
<p class="description"><?php _e('Enable navigation bullets with this option.', WDS()->prefix); ?></p>
|
1247 |
+
</span>
|
1248 |
+
<span class="wd-group">
|
1249 |
+
<label class="wd-label"><?php _e('Show bullets:', WDS()->prefix); ?></label>
|
1250 |
+
<input type="radio" name="bull_hover" id="bull_hover_0" value="0" <?php if ($row->bull_hover == 0) echo 'checked="checked"'; ?> />
|
1251 |
+
<label <?php if ($row->bull_hover == 0) echo 'class="selected_color"'; ?> for="bull_hover_0"><?php _e('On hover', WDS()->prefix); ?></label>
|
1252 |
+
<input type="radio" name="bull_hover" id="bull_hover_1" value="1" <?php if ($row->bull_hover == 1) echo 'checked="checked"'; ?> />
|
1253 |
+
<label <?php if ($row->bull_hover == 1) echo 'class="selected_color"'; ?> for="bull_hover_1"><?php _e('Always', WDS()->prefix); ?></label>
|
1254 |
+
<p class="description"><?php _e('You can display navigation bullets always or only when hovered.', WDS()->prefix); ?></p>
|
1255 |
+
</span>
|
1256 |
+
<span class="wd-group">
|
1257 |
+
<label class="wd-label"><?php _e('Show thumbnail on bullet hover:', WDS()->prefix); ?></label>
|
1258 |
+
<input onClick="wds_enable_disable('', 'tr_thumb_size', 'show_thumbnail1')" type="radio" id="show_thumbnail1" name="show_thumbnail" <?php echo (($row->show_thumbnail) ? 'checked="checked"' : ''); ?> value="1" />
|
1259 |
+
<label <?php echo (($row->show_thumbnail) ? 'class="selected_color"' : ''); ?> for="show_thumbnail1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1260 |
+
<input onClick="wds_enable_disable('none', 'tr_thumb_size', 'show_thumbnail0')" type="radio" id="show_thumbnail0" name="show_thumbnail" <?php echo (($row->show_thumbnail) ? '' : 'checked="checked"'); ?> value="0" />
|
1261 |
+
<label for="show_thumbnail0"><?php _e('No', WDS()->prefix); ?></label>
|
1262 |
+
<p class="description"></p>
|
1263 |
+
</span>
|
1264 |
+
<span class="wd-group" id="tr_thumb_size">
|
1265 |
+
<label class="wd-label" for="wds_thumb_size"><?php _e('Thumbnail Size:', WDS()->prefix); ?></label>
|
1266 |
+
<input onblur="wds_check_number()" type="text" id="wds_thumb_size" name="wds_thumb_size" size="15" value="<?php echo $row->thumb_size; ?>" style="display:inline-block;" />
|
1267 |
+
<p class="description"><?php _e('Value must be between 0 to 1.', WDS()->prefix); ?></p>
|
1268 |
+
</span>
|
1269 |
+
<span class="wd-group">
|
1270 |
+
<label class="wd-label"><?php _e('Position:', WDS()->prefix); ?></label>
|
1271 |
+
<select class="select_icon select_icon_320" name="bull_position" id="bull_position">
|
1272 |
+
<option value="top" <?php echo (($row->bull_position == "top") ? 'selected="selected"' : ''); ?>><?php _e('Top', WDS()->prefix); ?></option>
|
1273 |
+
<option value="bottom" <?php echo (($row->bull_position == "bottom") ? 'selected="selected"' : ''); ?>><?php _e('Bottom', WDS()->prefix); ?></option>
|
1274 |
+
</select>
|
1275 |
+
<p class="description"><?php _e('Select the position for navigation bullets.', WDS()->prefix); ?></p>
|
1276 |
+
</span>
|
1277 |
+
<span class="wd-group">
|
1278 |
+
<label class="wd-label"><?php _e('Bullets type:', WDS()->prefix); ?></label>
|
1279 |
+
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_our" value="our" <?php if ($row->bull_butt_img_or_not == 'our') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('our')" />
|
1280 |
+
<label <?php if ($row->bull_butt_img_or_not == 'our') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_our"><?php _e('Default', WDS()->prefix); ?></label>
|
1281 |
+
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_cust" value="custom" <?php if ($row->bull_butt_img_or_not == 'custom') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('custom')" />
|
1282 |
+
<label <?php if ($row->bull_butt_img_or_not == 'custom') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_cust"><?php _e('Custom', WDS()->prefix); ?></label>
|
1283 |
+
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_stl" value="style" <?php if ($row->bull_butt_img_or_not == 'style') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('style')" />
|
1284 |
+
<label <?php if ($row->bull_butt_img_or_not == 'style') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_stl"><?php _e('Styled', WDS()->prefix); ?></label>
|
1285 |
+
<input type="radio" name="bull_butt_img_or_not" id="bull_butt_img_or_not_txt" value="text" <?php if ($row->bull_butt_img_or_not == 'text') echo 'checked="checked"'; ?> onClick="image_for_bull_butt('text')" />
|
1286 |
+
<label <?php if ($row->bull_butt_img_or_not == 'text') echo 'class="selected_color"'; ?> for="bull_butt_img_or_not_txt"><?php _e('Text', WDS()->prefix); ?></label>
|
1287 |
+
<input type="hidden" id="bullets_img_main_url" name="bullets_img_main_url" value="<?php echo $row->bullets_img_main_url; ?>" />
|
1288 |
+
<input type="hidden" id="bullets_img_hov_url" name="bullets_img_hov_url" value="<?php echo $row->bullets_img_hov_url; ?>" />
|
1289 |
+
<p class="description"></p>
|
1290 |
+
</span>
|
1291 |
+
<span class="wd-group" id="bullets_style">
|
1292 |
+
<label class="wd-label" for="bull_style"><?php _e('Bullet style:', WDS()->prefix); ?></label>
|
1293 |
+
<div style="display: table;">
|
1294 |
+
<div style="display: table-cell; vertical-align: middle;">
|
1295 |
+
<select class="select_icon select_icon_320" name="bull_style" id="bull_style" onchange="change_bull_style(jQuery(this).val())">
|
1296 |
+
<?php
|
1297 |
+
foreach ($bull_styles as $key => $bull_style) {
|
1298 |
+
?>
|
1299 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->bull_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $bull_style; ?></option>
|
1300 |
+
<?php
|
1301 |
+
}
|
1302 |
+
?>
|
1303 |
+
</select>
|
1304 |
+
</div>
|
1305 |
+
<div style="display: table-cell; vertical-align: middle; background-color: rgba(229, 229, 229, 0.62); text-align: center;">
|
1306 |
+
<i id="wds_act_bull_style" class="fa <?php echo str_replace('-o', '', $row->bull_style); ?>" style="color: #<?php echo $row->bull_act_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
1307 |
+
<i id="wds_deact_bull_style" class="fa <?php echo $row->bull_style; ?>" style="color: #<?php echo $row->bull_color; ?>; display: inline-block; font-size: 40px; width: 40px; height: 40px;"></i>
|
1308 |
+
</div>
|
1309 |
+
</div>
|
1310 |
+
<p class="description"><?php _e('Choose the style for the bullets.', WDS()->prefix); ?></p>
|
1311 |
+
<script>
|
1312 |
+
var wds_blt_img_type = [];
|
1313 |
+
var blt_img_dir = '<?php echo WDS()->plugin_url . '/images/bullet/'; ?>';
|
1314 |
+
var bull_type_cur_fold = '1';
|
1315 |
+
<?php
|
1316 |
+
$folder_names = scandir(WDS()->plugin_dir . '/images/bullet');
|
1317 |
+
$bull_cur_fold_name = '';
|
1318 |
+
$bull_cur_type_key = '';
|
1319 |
+
$bull_cur_color_key = '';
|
1320 |
+
$bull_cur_sub_fold_names = array();
|
1321 |
+
array_splice($folder_names, 0, 2);
|
1322 |
+
$flag = FALSE;
|
1323 |
+
foreach ($folder_names as $type_key => $folder_name) {
|
1324 |
+
if (is_dir(WDS()->plugin_dir . '/images/bullet/' . $folder_name)) {
|
1325 |
+
?>
|
1326 |
+
wds_blt_img_type["<?php echo $type_key; ?>"] = [];
|
1327 |
+
wds_blt_img_type["<?php echo $type_key; ?>"]["type_name"] = "<?php echo $folder_name; ?>";
|
1328 |
+
<?php
|
1329 |
+
if ($row->bullets_img_main_url != '') {
|
1330 |
+
/* Getting current button's type folder and color folder.*/
|
1331 |
+
$check_bull_cur_fold = explode('/' , $row->bullets_img_main_url);
|
1332 |
+
if (in_array($folder_name, $check_bull_cur_fold)) {
|
1333 |
+
$flag = TRUE;
|
1334 |
+
$bull_cur_fold_name = $folder_name;
|
1335 |
+
$bull_cur_type_key = $type_key;
|
1336 |
+
$bull_cur_sub_fold_names = scandir(WDS()->plugin_dir . '/images/bullet/' . $bull_cur_fold_name);
|
1337 |
+
array_splice($bull_cur_sub_fold_names, 0, 2);
|
1338 |
+
?>
|
1339 |
+
bull_type_cur_fold = '<?php echo $bull_cur_type_key;?>';
|
1340 |
+
<?php
|
1341 |
+
}
|
1342 |
+
}
|
1343 |
+
$sub_folder_names = scandir(WDS()->plugin_dir . '/images/bullet/' . $folder_name);
|
1344 |
+
array_splice($sub_folder_names, 0, 2);
|
1345 |
+
foreach ($sub_folder_names as $color_key => $sub_folder_name) {
|
1346 |
+
if (is_dir(WDS()->plugin_dir . '/images/bullet/' . $folder_name . '/' . $sub_folder_name)) {
|
1347 |
+
if ($bull_cur_fold_name == $folder_name) {
|
1348 |
+
/* Getting current button's color key.*/
|
1349 |
+
if (in_array($sub_folder_name, $check_bull_cur_fold)) {
|
1350 |
+
$bull_cur_color_key = $color_key;
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
?>
|
1354 |
+
wds_blt_img_type["<?php echo $type_key; ?>"]["<?php echo $color_key; ?>"] = "<?php echo $sub_folder_name; ?>";
|
1355 |
+
<?php
|
1356 |
+
}
|
1357 |
+
}
|
1358 |
+
}
|
1359 |
+
else {
|
1360 |
+
?>
|
1361 |
+
console.log('<?php echo $folder_name . " is not a directory."; ?>');
|
1362 |
+
<?php
|
1363 |
+
}
|
1364 |
+
}
|
1365 |
+
?>
|
1366 |
+
</script>
|
1367 |
+
</span>
|
1368 |
+
<span class="wd-group" id="bullets_images_cust">
|
1369 |
+
<label class="wd-label"><?php _e('Upload buttons images:', WDS()->prefix); ?></label>
|
1370 |
+
<div style="display: table;">
|
1371 |
+
<div style="display: table-cell; vertical-align: middle;">
|
1372 |
+
<?php
|
1373 |
+
if (!$spider_uploader) {
|
1374 |
+
?>
|
1375 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('bullets_main_but', event, false); return false;" value="<?php _e('Active Button', WDS()->prefix); ?>" />
|
1376 |
+
<?php
|
1377 |
+
}
|
1378 |
+
else {
|
1379 |
+
?>
|
1380 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'bullets_main_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="Add Image" onclick="return false;">
|
1381 |
+
<?php _e('Active Button', WDS()->prefix); ?>
|
1382 |
+
</a>
|
1383 |
+
<?php
|
1384 |
+
}
|
1385 |
+
?>
|
1386 |
+
</div>
|
1387 |
+
<div style="display: table-cell; vertical-align: middle;">
|
1388 |
+
<?php
|
1389 |
+
if (!$spider_uploader) {
|
1390 |
+
?>
|
1391 |
+
<input class="button button-secondary wds_ctrl_btn_upload" type="button" onclick="wds_media_uploader('bullets_hov_but', event, false); return false;" value="<?php _e('Inactive Button', WDS()->prefix); ?>" />
|
1392 |
+
<?php
|
1393 |
+
}
|
1394 |
+
else {
|
1395 |
+
?>
|
1396 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'bullets_hov_but', 'dir' => '/arrows', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview wds_ctrl_btn_upload" title="<?php _e('Inactive Button', WDS()->prefix); ?>" onclick="return false;">
|
1397 |
+
<?php _e('Inactive Button', WDS()->prefix); ?>
|
1398 |
+
</a>
|
1399 |
+
<?php
|
1400 |
+
}
|
1401 |
+
?>
|
1402 |
+
</div>
|
1403 |
+
<div style="width:100px; display: table-cell; vertical-align: middle; text-align: center;background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;">
|
1404 |
+
<img id="bull_img_main" src="<?php echo $row->bullets_img_main_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1405 |
+
<img id="bull_img_hov" src="<?php echo $row->bullets_img_hov_url; ?>" style="display:inline-block; width: 40px; height: 40px;" />
|
1406 |
+
</div>
|
1407 |
+
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
1408 |
+
<input type="button" class="button button-small wds_reverse" onclick="wds_change_bullets_custom_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1409 |
+
</div>
|
1410 |
+
</div>
|
1411 |
+
</span>
|
1412 |
+
<span class="wd-group" id="bullets_images_select">
|
1413 |
+
<label class="wd-label" for="bullets_images_url"><?php _e('Choose buttons:', WDS()->prefix); ?></label>
|
1414 |
+
<div style="display: table; margin-bottom: 14px;">
|
1415 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
1416 |
+
<div style="display: block; width: 122px;" class="default_buttons">
|
1417 |
+
<div class="spider_choose_option" onclick="wds_choose_bull_option(this)">
|
1418 |
+
<div class="spider_option_main_title"><?php _e('Choose group', WDS()->prefix); ?></div>
|
1419 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE;"></i></div>
|
1420 |
+
</div>
|
1421 |
+
<div class="spider_bull_options_cont">
|
1422 |
+
<?php
|
1423 |
+
foreach ($folder_names as $type_key => $folder_name) {
|
1424 |
+
?>
|
1425 |
+
<div class="spider_option_cont wds_bull_butt_groups" value="<?php echo $type_key; ?>" <?php echo (($bull_cur_type_key == $type_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_bullets_images_type(this)">
|
1426 |
+
<div class="spider_option_cont_title" style="width: 64%;">
|
1427 |
+
<?php _e('Group', WDS()->prefix); echo '-' . ++$type_key; ?>
|
1428 |
+
</div>
|
1429 |
+
<div class="spider_option_cont_img">
|
1430 |
+
<img class="bull_src_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1431 |
+
<img class="bull_src_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1432 |
+
</div>
|
1433 |
+
</div>
|
1434 |
+
<?php
|
1435 |
+
}
|
1436 |
+
if (!$flag) {
|
1437 |
+
/* Folder doesn't exist.*/
|
1438 |
+
?>
|
1439 |
+
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1440 |
+
<?php
|
1441 |
+
}
|
1442 |
+
?>
|
1443 |
+
</div>
|
1444 |
+
</div>
|
1445 |
+
</div>
|
1446 |
+
<div style="display: table-cell; vertical-align: middle;" class="display_block">
|
1447 |
+
<div style="display: block; width: 122px; margin-left: 12px;">
|
1448 |
+
<div class="spider_choose_option" onclick="<?php echo (WDS()->is_free ? 'alert(\'' . addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) . '\')' : 'wds_choose_bull_option_color(this)'); ?>">
|
1449 |
+
<div class="spider_option_main_title"><?php _e('Choose color', WDS()->prefix); ?></div>
|
1450 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg" style="color: #1E8CBE;"></i></div>
|
1451 |
+
</div>
|
1452 |
+
<div class="spider_bull_options_color_cont">
|
1453 |
+
<?php
|
1454 |
+
foreach ($bull_cur_sub_fold_names as $color_key => $cur_sub_fold_name) {
|
1455 |
+
?>
|
1456 |
+
<div class="spider_option_cont wds_bull_butt_col_groups" value="<?php echo $color_key; ?>" <?php echo (($bull_cur_color_key == $color_key) ? 'selected="selected" style="background-color: #3399FF;"' : ''); ?> onclick="change_bullets_images_color(this, <?php echo $bull_cur_type_key; ?>)">
|
1457 |
+
<div class="spider_option_cont_title" style="width: 64%;">
|
1458 |
+
<?php echo _e('Color', WDS()->prefix); '-' . ++$color_key; ?>
|
1459 |
+
</div>
|
1460 |
+
<div class="spider_option_cont_img" style="width: 22%;">
|
1461 |
+
<img class="bull_col_src_left" style="display: inline-block; width: 14px; height: 14px;" />
|
1462 |
+
<img class="bull_col_src_right" style="display: inline-block; width: 14px; height: 14px;" />
|
1463 |
+
</div>
|
1464 |
+
</div>
|
1465 |
+
<?php
|
1466 |
+
}
|
1467 |
+
if (!$flag) {
|
1468 |
+
/* Folder doesn't exist.*/
|
1469 |
+
?>
|
1470 |
+
<div class="spider_option_cont" value="0" selected="selected" disabled="disabled"><?php _e('Custom', WDS()->prefix); ?></div>
|
1471 |
+
<?php
|
1472 |
+
}
|
1473 |
+
?>
|
1474 |
+
</div>
|
1475 |
+
</div>
|
1476 |
+
</div>
|
1477 |
+
<div style="width: 100px; display: table-cell; vertical-align: middle; text-align: center;">
|
1478 |
+
<div style="display: block; vertical-align: middle; margin-left: 12px; text-align: center; background-color: rgba(229, 229, 229, 0.62); padding-top: 4px; border-radius: 3px;">
|
1479 |
+
<img id="bullets_img_main" src="<?php echo $row->bullets_img_main_url; ?>" style="display: inline-block; width: 40px; height: 40px;" />
|
1480 |
+
<img id="bullets_img_hov" src="<?php echo $row->bullets_img_hov_url; ?>" style="display: inline-block; width: 40px; height: 40px;" />
|
1481 |
+
</div>
|
1482 |
+
</div>
|
1483 |
+
<div style="display: table-cell; text-align: center; vertical-align: middle;">
|
1484 |
+
<input type="button" class="button button-small wds_reverse" onclick="change_bullets_src()" value="<?php _e('Reverse', WDS()->prefix); ?>" />
|
1485 |
+
</div>
|
1486 |
+
</div>
|
1487 |
+
<p class="description"><?php _e('Choose the type and color for the bullets.', WDS()->prefix); ?></p>
|
1488 |
+
</span>
|
1489 |
+
</div>
|
1490 |
+
</div>
|
1491 |
+
</div>
|
1492 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1493 |
+
<div class="wd-box-section">
|
1494 |
+
<div class="wd-box-content">
|
1495 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullet_size">
|
1496 |
+
<label class="wd-label" for="bull_size"><?php _e('Size:', WDS()->prefix); ?></label>
|
1497 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_size" id="bull_size" value="<?php echo $row->bull_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1498 |
+
<p class="description"><?php _e('Set the size of navigation bullets.', WDS()->prefix); ?></p>
|
1499 |
+
</span>
|
1500 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1501 |
+
<label class="wd-label" for="bull_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
1502 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_color" id="bull_color" value="<?php echo $row->bull_color; ?>" class="color" onchange="jQuery('#wds_deact_bull_style').css({color: '#' + jQuery(this).val()})" />
|
1503 |
+
<p class="description"><?php _e('Select the color for navigation bullets.', WDS()->prefix); ?></p>
|
1504 |
+
</span>
|
1505 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_act_color">
|
1506 |
+
<label class="wd-label" for="bull_act_color"><?php _e('Active color:', WDS()->prefix); ?></label>
|
1507 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_act_color" id="bull_act_color" value="<?php echo $row->bull_act_color; ?>" class="color" onchange="jQuery('#wds_act_bull_style').css({color: '#' + jQuery(this).val()})" />
|
1508 |
+
<p class="description"><?php _e('Select the color for the bullet, which is currently displaying a corresponding image.', WDS()->prefix); ?></p>
|
1509 |
+
</span>
|
1510 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_back_act_color">
|
1511 |
+
<label class="wd-label" for="bull_back_act_color"><?php _e('Active Background color:', WDS()->prefix); ?></label>
|
1512 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_back_act_color" id="bull_back_act_color" value="<?php echo $row->bull_back_act_color; ?>" class="color" onchange="jQuery('#wds_back_act_bull_text').css({color: '#' + jQuery(this).val()})" />
|
1513 |
+
<p class="description"><?php _e('Select the background color for the bullet, which is currently displaying a corresponding image.', WDS()->prefix); ?></p>
|
1514 |
+
</span>
|
1515 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_back_color">
|
1516 |
+
<label class="wd-label" for="bull_back_color"><?php _e('Background color:', WDS()->prefix); ?></label>
|
1517 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_back_color" id="bull_back_color" value="<?php echo $row->bull_back_color; ?>" class="color" onchange="jQuery('#wds_back_bull_text').css({color: '#' + jQuery(this).val()})" />
|
1518 |
+
<p class="description"><?php _e('Select the background color for the bullet...', WDS()->prefix); ?></p>
|
1519 |
+
</span>
|
1520 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullets_radius">
|
1521 |
+
<label class="wd-label" for="bull_radius"><?php _e('Border radius:', WDS()->prefix); ?></label>
|
1522 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_radius" id="bull_radius" value="<?php echo $row->bull_radius; ?>" class="spider_char_input" />
|
1523 |
+
<p class="description"><?php _e('Use CSS type values (e.g. 4px).', WDS()->prefix); ?></p>
|
1524 |
+
</span>
|
1525 |
+
<span class="wd-group<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>" id="bullet_margin">
|
1526 |
+
<label class="wd-label" for="bull_margin"><?php _e('Margin:', WDS()->prefix); ?></label>
|
1527 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="bull_margin" id="bull_margin" value="<?php echo $row->bull_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1528 |
+
<p class="description"><?php _e('Set the margin for navigation bullets.', WDS()->prefix); ?></p>
|
1529 |
+
</span>
|
1530 |
+
</div>
|
1531 |
+
</div>
|
1532 |
+
</div>
|
1533 |
+
</div>
|
1534 |
+
</div>
|
1535 |
+
<div class="wds_nav_box wds_nav_filmstrip_box<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
1536 |
+
<div class="wd-table">
|
1537 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1538 |
+
<div class="wd-box-section">
|
1539 |
+
<div class="wd-box-content">
|
1540 |
+
<?php
|
1541 |
+
if ( WDS()->is_free ) {
|
1542 |
+
echo WDW_S_Library::message_id(0, __('This functionality is disabled in free version.', WDS()->prefix), 'error');
|
1543 |
+
}
|
1544 |
+
?>
|
1545 |
+
<span class="wd-group">
|
1546 |
+
<label class="wd-label"><?php _e('Enable filmstrip:', WDS()->prefix); ?></label>
|
1547 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="enable_filmstrip1" name="enable_filmstrip" <?php echo (($row->enable_filmstrip) ? 'checked="checked"' : ''); ?> value="1" />
|
1548 |
+
<label <?php echo (($row->enable_filmstrip) ? 'class="selected_color"' : ''); ?> for="enable_filmstrip1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1549 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="radio" id="enable_filmstrip0" name="enable_filmstrip" <?php echo (($row->enable_filmstrip) ? '' : 'checked="checked"'); ?> value="0" />
|
1550 |
+
<label <?php echo (($row->enable_filmstrip) ? '' : 'class="selected_color"'); ?> for="enable_filmstrip0"><?php _e('No', WDS()->prefix); ?></label>
|
1551 |
+
<p class="description"><?php _e('Enable this option to display thumbnails of the slides in a filmstrip.', WDS()->prefix); ?></p>
|
1552 |
+
</span>
|
1553 |
+
<span class="wd-group" id="filmstrip_position">
|
1554 |
+
<label class="wd-label"><?php _e('Position:', WDS()->prefix); ?></label>
|
1555 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="film_pos" id="film_pos">
|
1556 |
+
<option value="top" <?php echo (($row->film_pos == "top") ? 'selected="selected"' : ''); ?>><?php _e('Top', WDS()->prefix); ?></option>
|
1557 |
+
<option value="right" <?php echo (($row->film_pos == "right") ? 'selected="selected"' : ''); ?>><?php _e('Right', WDS()->prefix); ?></option>
|
1558 |
+
<option value="bottom" <?php echo (($row->film_pos == "bottom") ? 'selected="selected"' : ''); ?>><?php _e('Bottom', WDS()->prefix); ?></option>
|
1559 |
+
<option value="left" <?php echo (($row->film_pos == "left") ? 'selected="selected"' : ''); ?>><?php _e('Left', WDS()->prefix); ?></option>
|
1560 |
+
</select>
|
1561 |
+
<p class="description"><?php _e('Set the position of the filmstrip.', WDS()->prefix); ?></p>
|
1562 |
+
</span>
|
1563 |
+
<span class="wd-group" id="filmstrip_size">
|
1564 |
+
<label class="wd-label" for="film_thumb_width"><?php _e('Thumbnail dimensions:', WDS()->prefix); ?></label>
|
1565 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_thumb_width" id="film_thumb_width" value="<?php echo $row->film_thumb_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> x
|
1566 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_thumb_height" id="film_thumb_height" value="<?php echo $row->film_thumb_height; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
1567 |
+
<p class="description"><?php _e('Define the maximum width and heigth of the filmstrip thumbnails.', WDS()->prefix); ?></p>
|
1568 |
+
</span>
|
1569 |
+
<span class="wd-group">
|
1570 |
+
<label class="wd-label" for="film_bg_color"><?php _e('Background color:', WDS()->prefix); ?></label>
|
1571 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_bg_color" id="film_bg_color" value="<?php echo $row->film_bg_color; ?>" class="color" />
|
1572 |
+
<p class="description"><?php _e('Select the background color for the filmstrip.', WDS()->prefix); ?></p>
|
1573 |
+
</span>
|
1574 |
+
</div>
|
1575 |
+
</div>
|
1576 |
+
</div>
|
1577 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1578 |
+
<div class="wd-box-section">
|
1579 |
+
<div class="wd-box-content">
|
1580 |
+
<span class="wd-group" id="filmstrip_thumb_margin">
|
1581 |
+
<label class="wd-label" for="film_tmb_margin"><?php _e('Thumbnail separator:', WDS()->prefix); ?></label>
|
1582 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_tmb_margin" id="film_tmb_margin" value="<?php echo $row->film_tmb_margin; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1583 |
+
<p class="description"><?php _e('Set the size of the separator for thumbnails.', WDS()->prefix); ?></p>
|
1584 |
+
</span>
|
1585 |
+
<span class="wd-group">
|
1586 |
+
<label class="wd-label" for="film_act_border_width"><?php _e('Active border:', WDS()->prefix); ?></label>
|
1587 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_act_border_width" id="film_act_border_width" value="<?php echo $row->film_act_border_width; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
|
1588 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="film_act_border_style" id="film_act_border_style">
|
1589 |
+
<?php
|
1590 |
+
foreach ($border_styles as $key => $border_style) {
|
1591 |
+
?>
|
1592 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->film_act_border_style == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
1593 |
+
<?php
|
1594 |
+
}
|
1595 |
+
?>
|
1596 |
+
</select>
|
1597 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_act_border_color" id="film_act_border_color" value="<?php echo $row->film_act_border_color; ?>" class="color"/>
|
1598 |
+
<p class="description"><?php _e('The thumbnail for the currently displayed image will have a border. You can set its size, type and color.', WDS()->prefix); ?></p>
|
1599 |
+
</span>
|
1600 |
+
<span class="wd-group">
|
1601 |
+
<label class="wd-label" for="film_dac_transparent"><?php _e('Inactive transparency:', WDS()->prefix); ?></label>
|
1602 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" name="film_dac_transparent" id="film_dac_transparent" value="<?php echo $row->film_dac_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
1603 |
+
<p class="description"><?php _e('You can set a transparency level for the inactive filmstrip items which must be between 0 to 100..', WDS()->prefix); ?></p>
|
1604 |
+
</span>
|
1605 |
+
</div>
|
1606 |
+
</div>
|
1607 |
+
</div>
|
1608 |
+
</div>
|
1609 |
+
</div>
|
1610 |
+
<div class="wds_nav_box wds_nav_timer_bar_box">
|
1611 |
+
<div class="wd-table">
|
1612 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1613 |
+
<div class="wd-box-section">
|
1614 |
+
<div class="wd-box-content">
|
1615 |
+
<span class="wd-group">
|
1616 |
+
<label class="wd-label"><?php _e('Enable timer bar:', WDS()->prefix); ?></label>
|
1617 |
+
<input type="radio" id="enable_time_bar1" name="enable_time_bar" <?php echo (($row->enable_time_bar) ? 'checked="checked"' : ''); ?> value="1" />
|
1618 |
+
<label <?php echo (($row->enable_time_bar) ? 'class="selected_color"' : ''); ?> for="enable_time_bar1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1619 |
+
<input type="radio" id="enable_time_bar0" name="enable_time_bar" <?php echo (($row->enable_time_bar) ? '' : 'checked="checked"'); ?> value="0" />
|
1620 |
+
<label <?php echo (($row->enable_time_bar) ? '' : 'class="selected_color"'); ?> for="enable_time_bar0"><?php _e('No', WDS()->prefix); ?></label>
|
1621 |
+
<p class="description"><?php _e('You can add a bar, which displays the time left untill the slider switches to the next slide on autoplay.', WDS()->prefix); ?></p>
|
1622 |
+
</span>
|
1623 |
+
<span class="wd-group">
|
1624 |
+
<label class="wd-label" for="timer_bar_type"><?php _e('Type:', WDS()->prefix); ?></label>
|
1625 |
+
<select class="select_icon select_icon_320" name="timer_bar_type" id="timer_bar_type">
|
1626 |
+
<option value="top" <?php echo (($row->timer_bar_type == "top") ? 'selected="selected"' : ''); ?>><?php _e('Line top', WDS()->prefix); ?></option>
|
1627 |
+
<option value="bottom" <?php echo (($row->timer_bar_type == "bottom") ? 'selected="selected"' : ''); ?>><?php _e('Line Bottom', WDS()->prefix); ?></option>
|
1628 |
+
<option value="circle_top_left" <?php echo (($row->timer_bar_type == "circle_top_left") ? 'selected="selected"' : ''); ?>><?php _e('Circle top left', WDS()->prefix); ?></option>
|
1629 |
+
<option value="circle_top_right" <?php echo (($row->timer_bar_type == "circle_top_right") ? 'selected="selected"' : ''); ?>><?php _e('Circle top right', WDS()->prefix); ?></option>
|
1630 |
+
<option value="circle_bot_left" <?php echo (($row->timer_bar_type == "circle_bot_left") ? 'selected="selected"' : ''); ?>><?php _e('Circle bottom left', WDS()->prefix); ?></option>
|
1631 |
+
<option value="circle_bot_right" <?php echo (($row->timer_bar_type == "circle_bot_right") ? 'selected="selected"' : ''); ?>><?php _e('Circle bottom right', WDS()->prefix); ?></option>
|
1632 |
+
</select>
|
1633 |
+
<p class="description"><?php _e('Choose the type of the timer bar to be used within the slider.', WDS()->prefix); ?></p>
|
1634 |
+
</span>
|
1635 |
+
</div>
|
1636 |
+
</div>
|
1637 |
+
</div>
|
1638 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1639 |
+
<div class="wd-box-section">
|
1640 |
+
<div class="wd-box-content">
|
1641 |
+
<span class="wd-group">
|
1642 |
+
<label class="wd-label" for="timer_bar_size"><?php _e('Size:', WDS()->prefix); ?></label>
|
1643 |
+
<input type="text" name="timer_bar_size" id="timer_bar_size" value="<?php echo $row->timer_bar_size; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)" /> px
|
1644 |
+
<p class="description"><?php _e('Define the height of the timer bar.', WDS()->prefix); ?></p>
|
1645 |
+
</span>
|
1646 |
+
<span class="wd-group">
|
1647 |
+
<label class="wd-label" for="timer_bar_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
1648 |
+
<input type="text" name="timer_bar_color" id="timer_bar_color" value="<?php echo $row->timer_bar_color; ?>" class="color" />
|
1649 |
+
<input type="text" name="timer_bar_transparent" id="timer_bar_transparent" value="<?php echo $row->timer_bar_transparent; ?>" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> %
|
1650 |
+
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
1651 |
+
</span>
|
1652 |
+
</div>
|
1653 |
+
</div>
|
1654 |
+
</div>
|
1655 |
+
</div>
|
1656 |
+
</div>
|
1657 |
+
<div class="wds_nav_box wds_nav_watermark_box">
|
1658 |
+
<div class="wd_updated">
|
1659 |
+
<p><?php _e('Please note that the <b>Fill</b> and <b>Contain</b> options will work fine with <b>Watermark</b> option regardless of the image dimensions, whereas for the <b>Cover</b> option you should have the image identical to the size set in the <b>Dimensions</b> settings.
|
1660 |
+
If you have uploaded the image with another dimension, you will need to resize the image and upload it again.', WDS()->prefix); ?>
|
1661 |
+
</p>
|
1662 |
+
</div>
|
1663 |
+
<div class="wd-table">
|
1664 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1665 |
+
<div class="wd-box-section">
|
1666 |
+
<div class="wd-box-content">
|
1667 |
+
<span class="wd-group" id="tr_built_in_watermark_type">
|
1668 |
+
<label class="wd-label"><?php _e('Watermark type:', WDS()->prefix); ?></label>
|
1669 |
+
<input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_none" value="none" <?php if ($row->built_in_watermark_type == 'none') echo 'checked="checked"'; ?> onClick="wds_built_in_watermark('watermark_type_none')" />
|
1670 |
+
<label <?php if ($row->built_in_watermark_type == 'none') echo 'class="selected_color"'; ?> for="built_in_watermark_type_none"><?php _e('None', WDS()->prefix); ?></label>
|
1671 |
+
<input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_text" value="text" <?php if ($row->built_in_watermark_type == 'text') echo 'checked="checked"'; ?> onClick="wds_built_in_watermark('watermark_type_text')" onchange="preview_built_in_watermark()" />
|
1672 |
+
<label <?php if ($row->built_in_watermark_type == 'text') echo 'class="selected_color"'; ?> for="built_in_watermark_type_text"><?php _e('Text', WDS()->prefix); ?></label>
|
1673 |
+
<input type="radio" name="built_in_watermark_type" id="built_in_watermark_type_image" value="image" <?php if ($row->built_in_watermark_type == 'image') echo 'checked="checked"'; ?> onClick="wds_built_in_watermark('watermark_type_image')" onchange="preview_built_in_watermark()" />
|
1674 |
+
<label <?php if ($row->built_in_watermark_type == 'image') echo 'class="selected_color"'; ?> for="built_in_watermark_type_image"><?php _e('Image', WDS()->prefix); ?></label>
|
1675 |
+
<p class="description"><?php _e('Choose the kind of watermark you would like to use.', WDS()->prefix); ?></p>
|
1676 |
+
</span>
|
1677 |
+
<span class="wd-group" id="tr_built_in_watermark_url">
|
1678 |
+
<label class="wd-label" for="built_in_watermark_url"><?php _e('Watermark url:', WDS()->prefix); ?></label>
|
1679 |
+
<input type="text" id="built_in_watermark_url" name="built_in_watermark_url" style="width: 68%;" value="<?php echo $row->built_in_watermark_url; ?>" style="display:inline-block;" onchange="preview_built_in_watermark()" />
|
1680 |
+
<?php
|
1681 |
+
if (!$spider_uploader) {
|
1682 |
+
?>
|
1683 |
+
<input id="wat_img_add_butt" class="button button-secondary" type="button" onclick="wds_media_uploader('watermark', event, false); return false;" value="<?php _e('Add Image', WDS()->prefix); ?>" />
|
1684 |
+
<?php
|
1685 |
+
}
|
1686 |
+
else {
|
1687 |
+
?>
|
1688 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'watermark', 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview" title="<?php _e('Add Image', WDS()->prefix); ?>" onclick="return false;">
|
1689 |
+
<?php _e('Add Image', WDS()->prefix); ?>
|
1690 |
+
</a>
|
1691 |
+
<?php
|
1692 |
+
}
|
1693 |
+
?>
|
1694 |
+
<p class="description"><?php _e('Only .png format is supported.', WDS()->prefix); ?></p>
|
1695 |
+
</span>
|
1696 |
+
<span class="wd-group" id="tr_built_in_watermark_text">
|
1697 |
+
<label class="wd-label" for="built_in_watermark_text"><?php _e('Watermark text:', WDS()->prefix); ?></label>
|
1698 |
+
<input type="text" name="built_in_watermark_text" id="built_in_watermark_text" style="width: 100%;" value="<?php echo $row->built_in_watermark_text; ?>" onchange="preview_built_in_watermark()" onkeypress="preview_built_in_watermark()" />
|
1699 |
+
<p class="description"><?php _e('Write the text of the watermark. It will be displayed on the slides.', WDS()->prefix); ?></p>
|
1700 |
+
</span>
|
1701 |
+
<span class="wd-group" id="tr_built_in_watermark_size">
|
1702 |
+
<label class="wd-label" for="built_in_watermark_size"><?php _e('Watermark size:', WDS()->prefix); ?></label>
|
1703 |
+
<input type="text" name="built_in_watermark_size" id="built_in_watermark_size" value="<?php echo $row->built_in_watermark_size; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" /> %
|
1704 |
+
<p class="description"><?php _e('Enter size of watermark in percents according to image.', WDS()->prefix); ?></p>
|
1705 |
+
</span>
|
1706 |
+
<span class="wd-group" id="tr_built_in_watermark_font_size">
|
1707 |
+
<label class="wd-label" for="built_in_watermark_font_size"><?php _e('Watermark font size:', WDS()->prefix); ?></label>
|
1708 |
+
<input type="text" name="built_in_watermark_font_size" id="built_in_watermark_font_size" value="<?php echo $row->built_in_watermark_font_size; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" onkeypress="return spider_check_isnum(event)" /> px
|
1709 |
+
<p class="description"><?php _e('Specify the font size of the watermark.', WDS()->prefix); ?></p>
|
1710 |
+
</span>
|
1711 |
+
<span class="wd-group" id="tr_built_in_watermark_font">
|
1712 |
+
<label class="wd-label" for="built_in_watermark_font"><?php _e('Watermark font style:', WDS()->prefix); ?></label>
|
1713 |
+
<select class="select_icon select_icon_320" name="built_in_watermark_font" id="built_in_watermark_font" style="width:150px;" onchange="preview_built_in_watermark()">
|
1714 |
+
<?php
|
1715 |
+
foreach ($built_in_watermark_fonts as $watermark_font) {
|
1716 |
+
?>
|
1717 |
+
<option value="<?php echo $watermark_font; ?>" <?php if ($row->built_in_watermark_font == $watermark_font) echo 'selected="selected"'; ?>><?php echo $watermark_font; ?></option>
|
1718 |
+
<?php
|
1719 |
+
}
|
1720 |
+
?>
|
1721 |
+
</select>
|
1722 |
+
<?php
|
1723 |
+
foreach ($built_in_watermark_fonts as $watermark_font) {
|
1724 |
+
?>
|
1725 |
+
<style>
|
1726 |
+
@font-face {
|
1727 |
+
font-family: <?php echo 'wds_' . str_replace('.ttf', '', $watermark_font); ?>;
|
1728 |
+
src: url("<?php echo WDS()->plugin_url . '/fonts/' . $watermark_font; ?>");
|
1729 |
+
}
|
1730 |
+
</style>
|
1731 |
+
<?php
|
1732 |
+
}
|
1733 |
+
?>
|
1734 |
+
<p class="description"><?php _e('Specify the font family for the watermark text.', WDS()->prefix); ?></p>
|
1735 |
+
</span>
|
1736 |
+
<span class="wd-group" id="tr_built_in_watermark_color">
|
1737 |
+
<label class="wd-label" for="built_in_watermark_color"><?php _e('Watermark color:', WDS()->prefix); ?></label>
|
1738 |
+
<input type="text" name="built_in_watermark_color" id="built_in_watermark_color" value="<?php echo $row->built_in_watermark_color; ?>" class="color" onchange="preview_built_in_watermark()" />
|
1739 |
+
<input type="text" name="built_in_watermark_opacity" id="built_in_watermark_opacity" value="<?php echo $row->built_in_watermark_opacity; ?>" class="spider_int_input" onchange="preview_built_in_watermark()" /> %
|
1740 |
+
<p class="description"><?php _e('Transparency Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
1741 |
+
</span>
|
1742 |
+
<span class="wd-group" id="tr_built_in_watermark_position">
|
1743 |
+
<label class="wd-label"><?php _e('Watermark position:', WDS()->prefix); ?></label>
|
1744 |
+
<table class="wds_position_table">
|
1745 |
+
<tbody>
|
1746 |
+
<tr>
|
1747 |
+
<td class="wds_position_td"><input type="radio" value="top-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1748 |
+
<td class="wds_position_td"><input type="radio" value="top-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1749 |
+
<td class="wds_position_td"><input type="radio" value="top-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "top-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1750 |
+
</tr>
|
1751 |
+
<tr>
|
1752 |
+
<td class="wds_position_td"><input type="radio" value="middle-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1753 |
+
<td class="wds_position_td"><input type="radio" value="middle-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1754 |
+
<td class="wds_position_td"><input type="radio" value="middle-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "middle-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1755 |
+
</tr>
|
1756 |
+
<tr>
|
1757 |
+
<td class="wds_position_td"><input type="radio" value="bottom-left" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-left") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1758 |
+
<td class="wds_position_td"><input type="radio" value="bottom-center" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-center") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1759 |
+
<td class="wds_position_td"><input type="radio" value="bottom-right" name="built_in_watermark_position" <?php if ($row->built_in_watermark_position == "bottom-right") echo 'checked="checked"'; ?> onchange="preview_built_in_watermark()"></td>
|
1760 |
+
</tr>
|
1761 |
+
</tbody>
|
1762 |
+
</table>
|
1763 |
+
<p class="description"><?php _e('Select the position of the watermark.', WDS()->prefix); ?></p>
|
1764 |
+
</span>
|
1765 |
+
</div>
|
1766 |
+
</div>
|
1767 |
+
</div>
|
1768 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1769 |
+
<div class="wd-box-section">
|
1770 |
+
<div class="wd-box-content">
|
1771 |
+
<span class="wd-group">
|
1772 |
+
<input class="button button-secondary" type="button" onclick="spider_set_input_value('task', 'set_watermark'); wds_spider_ajax_save('sliders_form', event);" value="<?php _e('Set Watermark', WDS()->prefix); ?>" />
|
1773 |
+
<input class="button button-secondary" type="button" onclick="spider_set_input_value('task', 'reset_watermark'); wds_spider_ajax_save('sliders_form', event);" value="<?php _e('Reset Watermark', WDS()->prefix); ?>" />
|
1774 |
+
</span>
|
1775 |
+
<span class="wd-group">
|
1776 |
+
<span id="preview_built_in_watermark" style='display:table-cell; background-image:url("<?php echo WDS()->plugin_url . '/images/watermark_preview.jpg'?>"); background-size:100% 100%;width:400px;height:400px;padding-top: 4px; position:relative;'></span>
|
1777 |
+
</span>
|
1778 |
+
</span>
|
1779 |
+
</div>
|
1780 |
+
</div>
|
1781 |
+
</div>
|
1782 |
+
</div>
|
1783 |
+
</div>
|
1784 |
+
<div class="wds_nav_box wds_nav_css_box">
|
1785 |
+
<div class="wd-table">
|
1786 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1787 |
+
<div class="wd-box-section">
|
1788 |
+
<div class="wd-box-content">
|
1789 |
+
<span class="wd-group">
|
1790 |
+
<label class="wd-label" for="css"><?php _e('Css:', WDS()->prefix); ?></label>
|
1791 |
+
<p class="description"><?php _e('Write additional CSS code to apply custom styles to the slider.', WDS()->prefix); ?></p>
|
1792 |
+
<textarea id="css" name="css" rows="15" style="width: 50%;"><?php echo htmlspecialchars($row->css); ?></textarea>
|
1793 |
+
</span>
|
1794 |
+
</div>
|
1795 |
+
</div>
|
1796 |
+
</div>
|
1797 |
+
</div>
|
1798 |
+
</div>
|
1799 |
+
<div class="wds_nav_box wds_nav_callbacks_box">
|
1800 |
+
<div class="wd-table">
|
1801 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1802 |
+
<div class="wd-box-section">
|
1803 |
+
<div class="wd-box-content">
|
1804 |
+
<span class="wd-group callback_label_options">
|
1805 |
+
<label class="wd-label" for="css"><?php _e('Add new callback:', WDS()->prefix); ?></label>
|
1806 |
+
<div style="vertical-align: middle;">
|
1807 |
+
<select class="select_icon select_icon_320" name="callback_list" id="callback_list">
|
1808 |
+
<?php
|
1809 |
+
$callback_items = json_decode(htmlspecialchars_decode($row->javascript), TRUE);
|
1810 |
+
foreach ($slider_callbacks as $key => $slider_callback) {
|
1811 |
+
?>
|
1812 |
+
<option value="<?php echo $key; ?>" <?php echo (($row->javascript == $key) ? 'selected="selected"' : ''); ?> <?php echo (isset($callback_items[$key]))? "style='display:none'" : ""; ?>><?php echo $slider_callback; ?></option>
|
1813 |
+
<?php
|
1814 |
+
}
|
1815 |
+
?>
|
1816 |
+
</select>
|
1817 |
+
<button type="button" id="add_callback" class="action_buttons add_callback" onclick="add_new_callback(jQuery(this).closest('span'),jQuery(this).closest('span').find('select'));"></button>
|
1818 |
+
<p class="description"></p>
|
1819 |
+
</div>
|
1820 |
+
</span>
|
1821 |
+
<span class="wd-group">
|
1822 |
+
<?php
|
1823 |
+
if (is_array($callback_items) && count($callback_items)) {
|
1824 |
+
foreach ($callback_items as $key => $callback_item) {
|
1825 |
+
?>
|
1826 |
+
<div class="callbeck-item">
|
1827 |
+
<span class="wd-label"><?php echo $slider_callbacks[$key]; ?></span>
|
1828 |
+
<textarea class="callbeck-textarea" name="<?php echo $key; ?>"><?php echo $callback_item; ?></textarea>
|
1829 |
+
<button type="button" id="remove_callback" class="action_buttons remove_callback" onclick="remove_callback_item(this);"><?php _e('Remove', WDS()->prefix); ?></button>
|
1830 |
+
</div>
|
1831 |
+
<?php
|
1832 |
+
}
|
1833 |
+
}
|
1834 |
+
?>
|
1835 |
+
</span>
|
1836 |
+
</div>
|
1837 |
+
</div>
|
1838 |
+
</div>
|
1839 |
+
</div>
|
1840 |
+
</div>
|
1841 |
+
</div>
|
1842 |
+
</div>
|
1843 |
+
<!--------------Slides tab----------->
|
1844 |
+
<div class="wds_box wds_slides_box meta-box-sortables">
|
1845 |
+
<div class="clear"></div>
|
1846 |
+
<div class="bgcolor wds_tabs wbs_subtab aui-sortable">
|
1847 |
+
<h2 class="titles wd-slides-title"><?php _e('Slides', WDS()->prefix); ?></h2>
|
1848 |
+
<?php
|
1849 |
+
$slides_name = array();
|
1850 |
+
foreach ( $slides_row as $key => $slide_row ) {
|
1851 |
+
$slides_name[$slide_row->id] = $slide_row->title;
|
1852 |
+
?>
|
1853 |
+
<div id="wds_subtab_wrap<?php echo $slide_row->id; ?>" class="wds_subtab_wrap connectedSortable">
|
1854 |
+
<div id="wbs_subtab<?php echo $slide_row->id; ?>" class="tab_link <?php echo (((($id == 0 || !$sub_tab_type) || (strpos($sub_tab_type, 'pr') !== FALSE)) && $key == 0) || ('slide' . $slide_row->id == $sub_tab_type)) ? 'wds_sub_active' : ''; ?>">
|
1855 |
+
<div style='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->thumb_url ?>");background-position: center' class="tab_image" id="wds_tab_image<?php echo $slide_row->id; ?>" data-id="<?php echo $slide_row->id; ?>">
|
1856 |
+
<div class="tab_buttons">
|
1857 |
+
<div class="handle_wrap">
|
1858 |
+
<div class="handle" title="<?php _e('Drag to re-order', WDS()->prefix); ?>"></div>
|
1859 |
+
</div>
|
1860 |
+
<div class="wds_tab_title_wrap">
|
1861 |
+
<input type="text" id="title<?php echo $slide_row->id; ?>" name="title<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->title; ?>" class="wds_tab_title" tab_type="slide<?php echo $slide_row->id; ?>" data-id="<?php echo $slide_row->id; ?>" onchange="wds_set_slide_title('<?php echo $slide_row->id; ?>');" />
|
1862 |
+
</div>
|
1863 |
+
<input type="hidden" name="order<?php echo $slide_row->id; ?>" id="order<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->order; ?>" />
|
1864 |
+
</div>
|
1865 |
+
<div class="overlay" >
|
1866 |
+
<div id="hover_buttons">
|
1867 |
+
<span class="wds_change_thumbnail" onclick="wds_media_uploader_add_slide(event, '<?php echo $slide_row->id; ?>', false); return false;" title="<?php _e('Edit Image', WDS()->prefix); ?>" value="<?php _e('Edit Image', WDS()->prefix); ?>"></span>
|
1868 |
+
<span class="wds_slide_dublicate" title="<?php _e('Duplicate Slide', WDS()->prefix); ?>" onclick="wds_duplicate_slide('<?php echo $slide_row->id; ?>');"></span>
|
1869 |
+
<span class="wds_tab_remove" title="<?php _e('Remove Slide', WDS()->prefix); ?>" onclick="wds_remove_slide('<?php echo $slide_row->id; ?>')"></span>
|
1870 |
+
<input type="hidden" name="order<?php echo $slide_row->id; ?>" id="order<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->order; ?>" />
|
1871 |
+
<span class="wds_clear"></span>
|
1872 |
+
</div>
|
1873 |
+
</div>
|
1874 |
+
</div>
|
1875 |
+
</div>
|
1876 |
+
</div>
|
1877 |
+
<?php
|
1878 |
+
}
|
1879 |
+
?>
|
1880 |
+
<div class="wds_subtab_wrap new_tab_image">
|
1881 |
+
<div class="new_tab_link" onclick="wds_media_uploader_add_slide(event)" title="<?php _e('Add Slide(s)', WDS()->prefix); ?>"><p id="add_slide_text"><?php _e('Add Slide(s)', WDS()->prefix); ?></p></div>
|
1882 |
+
</div>
|
1883 |
+
<div class="wds_clear"></div>
|
1884 |
+
</div>
|
1885 |
+
<table>
|
1886 |
+
<?php
|
1887 |
+
echo $this->wds_textLayerTemplates( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families );
|
1888 |
+
echo $this->wds_imageLayerTemplates( $query_url, $spider_uploader, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles );
|
1889 |
+
echo $this->wds_videoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles );
|
1890 |
+
echo $this->wds_upvideoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles );
|
1891 |
+
echo $this->wds_hotspotLayerTemplate( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $hotp_text_positions );
|
1892 |
+
echo $this->wds_socialLayerTemplate( $social_buttons, $layer_effects_in, $layer_effects_out );
|
1893 |
+
?>
|
1894 |
+
</table>
|
1895 |
+
<?php
|
1896 |
+
foreach ($slides_row as $key => $slide_row) {
|
1897 |
+
$type_video = false;
|
1898 |
+
if( $slide_row->type == 'video' || $slide_row->type == 'EMBED_OEMBED_YOUTUBE_VIDEO'|| $slide_row->type == 'EMBED_OEMBED_VIMEO_VIDEO' ) {
|
1899 |
+
$type_video = true;
|
1900 |
+
}
|
1901 |
+
$fillmode = 'fill';
|
1902 |
+
if ( !empty($row->bg_fit) ) {
|
1903 |
+
if ( $row->bg_fit == 'cover') {
|
1904 |
+
$fillmode = 'fill';
|
1905 |
+
}
|
1906 |
+
if ( $row->bg_fit == '100% 100%') {
|
1907 |
+
$fillmode = 'stretch';
|
1908 |
+
}
|
1909 |
+
if ( $row->bg_fit == 'contain') {
|
1910 |
+
$fillmode = 'fit';
|
1911 |
+
}
|
1912 |
+
}
|
1913 |
+
$slide_row->fillmode = empty($slide_row->fillmode) ? $fillmode : $slide_row->fillmode;
|
1914 |
+
?>
|
1915 |
+
<div class="wds_box <?php echo (((($id == 0 || !$sub_tab_type) || (strpos($sub_tab_type, 'pr') !== FALSE)) && $key == 0) || ('slide' . $slide_row->id == $sub_tab_type)) ? 'wds_sub_active' : ''; ?> wds_slide<?php echo $slide_row->id; ?>">
|
1916 |
+
<input type="hidden" name="type<?php echo $slide_row->id; ?>" id="type<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->type; ?>" />
|
1917 |
+
<input type="hidden" name="wds_video_type<?php echo $slide_row->id; ?>" id="wds_video_type<?php echo $slide_row->id; ?>" />
|
1918 |
+
<table class="ui-sortable<?php echo $slide_row->id; ?>">
|
1919 |
+
<tbody>
|
1920 |
+
<tr>
|
1921 |
+
<td>
|
1922 |
+
<div class="postbox closed">
|
1923 |
+
<button class="button-link handlediv" type="button" aria-expanded="true">
|
1924 |
+
<span class="screen-reader-text"><?php _e('Toggle panel:', WDS()->prefix); ?></span>
|
1925 |
+
<span class="toggle-indicator" aria-hidden="true"></span>
|
1926 |
+
</button>
|
1927 |
+
<h2 class="hndle">
|
1928 |
+
<span><?php _e('Slide options', WDS()->prefix); ?></span>
|
1929 |
+
</h2>
|
1930 |
+
<div class="inside">
|
1931 |
+
<div class="wd-table">
|
1932 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
1933 |
+
<div class="wd-box-section">
|
1934 |
+
<div class="wd-box-content">
|
1935 |
+
<div class="wd-group">
|
1936 |
+
<label class="wd-label" for="fillmode<?php echo $slide_row->id; ?>"><?php _e('Fillmode', WDS()->prefix); ?></label>
|
1937 |
+
<div id="wds_fillmode_option-<?php echo $slide_row->id; ?>" class="wds_fillmode_option">
|
1938 |
+
<div style="width: 210px; position: relative;">
|
1939 |
+
<div class="spider_choose_option" onclick="wds_choose_option(this)">
|
1940 |
+
<div class="spider_option_main_title"><?php echo !empty($slide_row->fillmode) ? $slide_row->fillmode : __('Fill', WDS()->prefix); ?></div>
|
1941 |
+
<div class="spider_sel_option_ic"><i class="fa fa-angle-down fa-lg"></i></div>
|
1942 |
+
</div>
|
1943 |
+
<div class="spider_options_cont <?php echo ($type_video) ? 'type_video' :'';?>">
|
1944 |
+
<?php foreach ($slider_fillmode_option as $key_option => $option) { ?>
|
1945 |
+
<div class="spider_option_cont <?php echo ((!empty($slide_row->fillmode) && $slide_row->fillmode == $key_option) ? 'selected' : ''); ?>" value="<?php echo $key_option;?>" onclick="wds_change_fillmode_type(this,<?php echo $slide_row->id; ?>)">
|
1946 |
+
<div id="wds_fillmode_option_title-<?php echo $slide_row->id; ?>"class="spider_option_cont_title" data-title="<?php echo $key_option; ?>"><?php echo $option; ?></div>
|
1947 |
+
<div id="wds_fillmode_option_img-<?php echo $slide_row->id; ?>" class="spider_option_cont_img">
|
1948 |
+
<img src="<?php echo WDS()->plugin_url . '/images/fillmode/' . $key_option . '.png'; ?>" />
|
1949 |
+
</div>
|
1950 |
+
</div>
|
1951 |
+
<?php } ?>
|
1952 |
+
</div>
|
1953 |
+
</div>
|
1954 |
+
</div>
|
1955 |
+
<div id="wds_fillmode_preview-<?php echo $slide_row->id; ?>" class="wds_fillmode_preview <?php echo ( empty($slide_row->fillmode) ? 'hide' :'' );?>">
|
1956 |
+
<img src="<?php echo WDS()->plugin_url . '/images/fillmode/' . $slide_row->fillmode. '.png'; ?>">
|
1957 |
+
<input type="hidden" name="fillmode<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->fillmode; ?>">
|
1958 |
+
</div>
|
1959 |
+
<div class="clear"></div>
|
1960 |
+
<p class="description"><?php _e('Change the appearance of the slide background.', WDS()->prefix); ?></p>
|
1961 |
+
</div>
|
1962 |
+
<div class="wd-group">
|
1963 |
+
<label class="wd-label"><?php _e('Published', WDS()->prefix); ?></label>
|
1964 |
+
<input type="radio" id="published<?php echo $slide_row->id; ?>1" name="published<?php echo $slide_row->id; ?>" <?php echo (($slide_row->published) ? 'checked="checked"' : ''); ?> value="1" />
|
1965 |
+
<label <?php echo (($slide_row->published) ? 'class="selected_color"' : ''); ?> for="published<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1966 |
+
<input type="radio" id="published<?php echo $slide_row->id; ?>0" name="published<?php echo $slide_row->id; ?>" <?php echo (($slide_row->published) ? '' : 'checked="checked"'); ?> value="0" />
|
1967 |
+
<label <?php echo (($slide_row->published) ? '' : 'class="selected_color"'); ?> for="published<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1968 |
+
<p class="description"></p>
|
1969 |
+
</div>
|
1970 |
+
</div>
|
1971 |
+
</div>
|
1972 |
+
</div>
|
1973 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
1974 |
+
<div class="wd-box-section">
|
1975 |
+
<div class="wd-box-content">
|
1976 |
+
<div class="wd-group" id="controls<?php echo $slide_row->id; ?>" <?php echo $slide_row->type == 'video' ? '' : 'style="display: none;"'; ?>>
|
1977 |
+
<label class="wd-label"><?php _e('Controls', WDS()->prefix); ?></label>
|
1978 |
+
<input type="radio" onClick="wds_enable_disable('', 'autoplay<?php echo $slide_row->id; ?>', 'controls<?php echo $slide_row->id; ?>1')" id="controls<?php echo $slide_row->id; ?>1" name="controls<?php echo $slide_row->id; ?>" <?php echo (($slide_row->link == '1' || empty($slide_row->link) ) ? 'checked="checked"' : ''); ?> value="1" />
|
1979 |
+
<label <?php echo ($slide_row->link == '1' || empty($slide_row->link) ) ? 'class="selected_color"' : ''; ?> for="controls<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1980 |
+
<input type="radio" onClick="wds_enable_disable('none', 'autoplay<?php echo $slide_row->id; ?>', 'controls<?php echo $slide_row->id; ?>0')" id="controls<?php echo $slide_row->id; ?>0" name="controls<?php echo $slide_row->id; ?>" <?php echo (($slide_row->link == "0") ? 'checked="checked"' : '' ); ?> value="0" />
|
1981 |
+
<label <?php echo (($slide_row->link == "0") ? 'class="selected_color"' : '' ); ?> for="controls<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1982 |
+
<p class="description"></p>
|
1983 |
+
</div>
|
1984 |
+
<div class="wd-group" id="autoplay<?php echo $slide_row->id; ?>" <?php echo (($slide_row->type == 'video' && $slide_row->link == '1') || $slide_row->type == 'EMBED_OEMBED_YOUTUBE_VIDEO'|| $slide_row->type == 'EMBED_OEMBED_VIMEO_VIDEO') ? '' : 'style="display: none;"'; ?>>
|
1985 |
+
<label class="wd-label"><?php _e('Autoplay', WDS()->prefix); ?></label>
|
1986 |
+
<input type="radio" id="autoplay<?php echo $slide_row->id; ?>1" name="wds_slide_autoplay<?php echo $slide_row->id; ?>" <?php echo (($slide_row->target_attr_slide) ? 'checked="checked"' : ''); ?> value="1" />
|
1987 |
+
<label <?php echo (($slide_row->target_attr_slide) ? 'class="selected_color"' : ''); ?> for="autoplay<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1988 |
+
<input type="radio" id="autoplay<?php echo $slide_row->id; ?>0" name="wds_slide_autoplay<?php echo $slide_row->id; ?>" <?php echo (($slide_row->target_attr_slide) ? '' : 'checked="checked"'); ?> value="0" />
|
1989 |
+
<label <?php echo (($slide_row->target_attr_slide) ? '' : 'class="selected_color"'); ?> for="autoplay<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1990 |
+
<p class="description"> <b><?php _e('Important! ', WDS()->prefix); ?></b><?php _e('Some browsers only support autoplay in case videos are muted. Therefore, Slider WD will automatically mute them on these browsers to trigger video autoplay.', WDS()->prefix); ?></p>
|
1991 |
+
</div>
|
1992 |
+
<div class="wd-group" id="youtube_rel_video<?php echo $slide_row->id; ?>" <?php echo $slide_row->type == 'EMBED_OEMBED_YOUTUBE_VIDEO' ? '' : 'style="display: none;"'; ?>>
|
1993 |
+
<label class="wd-label"><?php _e('Youtube related video', WDS()->prefix); ?></label>
|
1994 |
+
<input type="radio" id="youtube_rel_video<?php echo $slide_row->id; ?>1" name="youtube_rel_video<?php echo $slide_row->id; ?>" <?php echo (($slide_row->youtube_rel_video) ? 'checked="checked"' : ''); ?> value="1" />
|
1995 |
+
<label <?php echo (($slide_row->youtube_rel_video) ? 'class="selected_color"' : ''); ?> for="youtube_rel_video<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
1996 |
+
<input type="radio" id="youtube_rel_video<?php echo $slide_row->id; ?>0" name="youtube_rel_video<?php echo $slide_row->id; ?>" <?php echo (($slide_row->youtube_rel_video) ? '' : 'checked="checked"'); ?> value="0" />
|
1997 |
+
<label <?php echo (($slide_row->youtube_rel_video) ? '' : 'class="selected_color"'); ?> for="youtube_rel_video<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
1998 |
+
<p class="description"></p>
|
1999 |
+
</div>
|
2000 |
+
<div class="wd-group" id="video_loop<?php echo $slide_row->id; ?>" <?php echo ($slide_row->type == 'video' || $slide_row->type == 'EMBED_OEMBED_VIMEO_VIDEO') ? '' : 'style="display: none;"'; ?>>
|
2001 |
+
<label class="wd-label"><?php _e('Video Loop', WDS()->prefix); ?></label>
|
2002 |
+
<input type="radio" id="video_loop<?php echo $slide_row->id; ?>1" name="video_loop<?php echo $slide_row->id; ?>" <?php echo (($slide_row->video_loop) ? 'checked="checked"' : ''); ?> value="1" />
|
2003 |
+
<label <?php echo (($slide_row->video_loop) ? 'class="selected_color"' : ''); ?> for="video_loop<?php echo $slide_row->id; ?>1"><?php _e('Yes', WDS()->prefix); ?></label>
|
2004 |
+
<input type="radio" id="video_loop<?php echo $slide_row->id; ?>0" name="video_loop<?php echo $slide_row->id; ?>" <?php echo (($slide_row->video_loop) ? '' : 'checked="checked"'); ?> value="0" />
|
2005 |
+
<label <?php echo (($slide_row->video_loop) ? '' : 'class="selected_color"'); ?> for="video_loop<?php echo $slide_row->id; ?>0"><?php _e('No', WDS()->prefix); ?></label>
|
2006 |
+
<p class="description"></p>
|
2007 |
+
</div>
|
2008 |
+
<div class="wd-group" id="trlink<?php echo $slide_row->id; ?>" <?php echo $slide_row->type == 'image' ? '' : 'style="display: none;"'; ?>>
|
2009 |
+
<label class="wd-label" for="link<?php echo $slide_row->id; ?>"><?php _e('Link the slide to', WDS()->prefix); ?></label>
|
2010 |
+
<input class="wds_external_link" id="link<?php echo $slide_row->id; ?>" type="text" value="<?php echo $slide_row->link; ?>" name="link<?php echo $slide_row->id; ?>" />
|
2011 |
+
<input id="target_attr_slide<?php echo $slide_row->id; ?>" type="checkbox" name="target_attr_slide<?php echo $slide_row->id; ?>" <?php echo (($slide_row->target_attr_slide) ? 'checked="checked"' : ''); ?> value="1" /><label for="target_attr_slide<?php echo $slide_row->id; ?>"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
2012 |
+
<p class="description"><?php _e('You can add a URL, to which the users will be redirected upon clicking on the slide. Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
2013 |
+
</div>
|
2014 |
+
<div class="wd-group">
|
2015 |
+
<?php
|
2016 |
+
if ( !$spider_uploader ) {
|
2017 |
+
?>
|
2018 |
+
<input type="button" class="button button-secondary" id="button_image_url<?php echo $slide_row->id; ?>" onclick="wds_media_uploader('<?php echo 'add_update_thumbnail__' . $slide_row->id; ?>', event, false); return false;" value="<?php _e('Edit thumbnail', WDS()->prefix); ?>" />
|
2019 |
+
<?php
|
2020 |
+
}
|
2021 |
+
else {
|
2022 |
+
?>
|
2023 |
+
<a class="button button-secondary thickbox thickbox-preview" href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_update_thumbnail', 'slide_id' => $slide_row->id, 'TB_iframe' => '1'), $query_url); ?>" title="<?php _e('Edit thumbnail', WDS()->prefix); ?>" onclick="return false;">
|
2024 |
+
<?php _e('Edit thumbnail', WDS()->prefix); ?>
|
2025 |
+
</a>
|
2026 |
+
<?php
|
2027 |
+
}
|
2028 |
+
?>
|
2029 |
+
<p class="description"><?php _e('Note, that thumbnail will be used in the filmstrip only.', WDS()->prefix); ?></p>
|
2030 |
+
</div>
|
2031 |
+
</div>
|
2032 |
+
</div>
|
2033 |
+
</div>
|
2034 |
+
</div>
|
2035 |
+
</div>
|
2036 |
+
</div>
|
2037 |
+
</td>
|
2038 |
+
</tr>
|
2039 |
+
<tr class="bgcolor">
|
2040 |
+
<td colspan="4">
|
2041 |
+
<h2 class="titles wds_slide-title-<?php echo $slide_row->id; ?>"><?php echo $slide_row->title; ?></h2>
|
2042 |
+
<div class="wds-preview-overflow">
|
2043 |
+
<div id="wds_preview_wrapper_<?php echo $slide_row->id; ?>" class="wds_preview_wrapper" style="width: <?php echo $row->width; ?>px; height: <?php echo $row->height; ?>px;">
|
2044 |
+
<div class="wds_preview">
|
2045 |
+
<div id="wds_preview_image<?php echo $slide_row->id; ?>" class="wds_preview_image<?php echo $slide_row->id; ?> wds_preview_image"
|
2046 |
+
style='
|
2047 |
+
width: inherit;
|
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') { ?>
|
2063 |
+
background-size: contain;
|
2064 |
+
background-position: center center;
|
2065 |
+
background-repeat: no-repeat;
|
2066 |
+
<?php } ?>
|
2067 |
+
<?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'stretch') { ?>
|
2068 |
+
background-size: 100% 100%;
|
2069 |
+
background-position: 100% 100%;
|
2070 |
+
background-repeat: no-repeat;
|
2071 |
+
<?php } ?>
|
2072 |
+
<?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'center') { ?>
|
2073 |
+
background-size: unset;
|
2074 |
+
background-position: center center;
|
2075 |
+
background-repeat: no-repeat;
|
2076 |
+
<?php } ?>
|
2077 |
+
<?php if( !empty($slide_row->fillmode) && $slide_row->fillmode == 'tile') { ?>
|
2078 |
+
background-size: unset;
|
2079 |
+
background-position: unset;
|
2080 |
+
background-repeat: repeat;
|
2081 |
+
<?php } ?>'>
|
2082 |
+
<?php
|
2083 |
+
if ( !empty($layers_row[$slide_row->id]) ) {
|
2084 |
+
foreach ($layers_row[$slide_row->id] as $key => $layer) {
|
2085 |
+
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2086 |
+
$fonts = (isset($layer->google_fonts) && $layer->google_fonts) ? $google_fonts : $font_families;
|
2087 |
+
$hotspot_text_display = (isset($layer->hotspot_text_display) && $layer->hotspot_text_display == 'click') ? 'click' : 'hover';
|
2088 |
+
switch ($layer->type) {
|
2089 |
+
case 'text': {
|
2090 |
+
?>
|
2091 |
+
<span id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" data-type="wds_text_parent" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
|
2092 |
+
style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . '%; ' : ''; ?><?php echo $layer->image_height ? 'height: ' . $layer->image_height . '%; ' : ''; ?>word-break: <?php echo ($layer->image_scale ? 'break-all' : 'normal'); ?>; display: inline-block; position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; color: #<?php echo $layer->color; ?>; font-size: <?php echo $layer->size; ?>px; line-height: 1.25em; font-family: <?php echo $fonts[$layer->ffamily]; ?>; font-weight: <?php echo $layer->fweight; ?>; padding: <?php echo $layer->padding; ?>; background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; text-align: <?php echo $layer->text_alignment; ?>"><?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $layer->text); ?></span>
|
2093 |
+
<?php
|
2094 |
+
break;
|
2095 |
+
}
|
2096 |
+
case 'image': {
|
2097 |
+
?>
|
2098 |
+
<img id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)" src="<?php echo $layer->image_url; ?>"
|
2099 |
+
style="opacity: <?php echo (100 - $layer->imgtransparent) / 100; ?>; filter: Alpha(opacity=<?php echo 100 - $layer->imgtransparent; ?>); position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; " />
|
2100 |
+
<?php
|
2101 |
+
break;
|
2102 |
+
}
|
2103 |
+
case 'video':
|
2104 |
+
case 'upvideo': {
|
2105 |
+
?>
|
2106 |
+
<img id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)" src="<?php echo $layer->type == 'upvideo' ? (wp_get_attachment_url(get_post_thumbnail_id($layer->image_url)) ? wp_get_attachment_url(get_post_thumbnail_id($layer->image_url)) : WDS()->plugin_url . '/images/no-video.png') : $layer->image_url ?>"
|
2107 |
+
style="max-width: <?php echo $layer->image_width; ?>px; width: <?php echo $layer->image_width; ?>px; max-height: <?php echo $layer->image_height; ?>px; height: <?php echo $layer->image_height; ?>px; position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>; border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>;" />
|
2108 |
+
<?php
|
2109 |
+
break;
|
2110 |
+
}
|
2111 |
+
case 'social': {
|
2112 |
+
?>
|
2113 |
+
<i id="<?php echo $prefix; ?>" class="wds_draggable_<?php echo $slide_row->id; ?> wds_draggable fa fa-<?php echo $layer->social_button; ?> ui-draggable" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
|
2114 |
+
style="opacity: <?php echo (100 - $layer->transparent) / 100; ?>; filter: Alpha(opacity=<?php echo 100 - $layer->transparent; ?>); position: absolute; left: <?php echo $layer->left; ?>px; top: <?php echo $layer->top; ?>px; z-index: <?php echo $layer->depth; ?>; color: #<?php echo $layer->color; ?>; font-size: <?php echo $layer->size; ?>px; line-height: <?php echo $layer->size; ?>px; padding: <?php echo $layer->padding; ?>; "></i>
|
2115 |
+
<?php
|
2116 |
+
break;
|
2117 |
+
}
|
2118 |
+
case 'hotspots': {
|
2119 |
+
?>
|
2120 |
+
<span id="<?php echo $prefix; ?>_div"
|
2121 |
+
data-text-position="<?php echo $layer->hotp_text_position; ?>"
|
2122 |
+
class="hotspot_container wds_draggable_<?php echo $slide_row->id; ?> wds_draggable ui-draggable"
|
2123 |
+
onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 1)"
|
2124 |
+
style="width: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2125 |
+
height: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2126 |
+
z-index: <?php echo $layer->depth; ?>;
|
2127 |
+
position: absolute;
|
2128 |
+
left: <?php echo $layer->left ? $layer->left : 20; ?>px;
|
2129 |
+
top: <?php echo $layer->top ? $layer->top : 20; ?>px;
|
2130 |
+
display: inline-block;">
|
2131 |
+
<span class="wds_layer_<?php echo $layer->id; ?> wds_layer"
|
2132 |
+
data-displaytype="<?php echo $hotspot_text_display; ?>"
|
2133 |
+
id="<?php echo $prefix; ?>_round"
|
2134 |
+
style="top: 0;
|
2135 |
+
left: 0;
|
2136 |
+
width: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2137 |
+
height: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2138 |
+
border-radius: <?php echo $layer->hotp_border_radius ? $layer->hotp_border_radius : '20px'; ?>;
|
2139 |
+
border: <?php echo $layer->hotp_border_width; ?>px <?php echo $layer->hotp_border_style; ?> #<?php echo $layer->hotp_border_color; ?>;
|
2140 |
+
background-color: #<?php echo $layer->hotp_fbgcolor ? $layer->hotp_fbgcolor : "ffffff"; ?>;
|
2141 |
+
z-index: <?php echo $layer->depth; ?>;
|
2142 |
+
position: absolute;
|
2143 |
+
display: block;
|
2144 |
+
opacity: 1 !important;">
|
2145 |
+
</span>
|
2146 |
+
<span class="wds_layer_<?php echo $layer->id; ?>"
|
2147 |
+
id="<?php echo $prefix; ?>_round_effect"
|
2148 |
+
wds_fsize="<?php echo $layer->size; ?>"
|
2149 |
+
style="top: 0;
|
2150 |
+
left: 0;
|
2151 |
+
width: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2152 |
+
height: <?php echo $layer->hotp_width ? $layer->hotp_width : 20; ?>px;
|
2153 |
+
border-radius: <?php echo $layer->hotp_border_radius ? $layer->hotp_border_radius : '20px'; ?>;
|
2154 |
+
border: <?php echo $layer->hotp_border_width; ?>px <?php echo $layer->hotp_border_style; ?> transparent;
|
2155 |
+
background: rgba(0, 0, 0, 0.360784);
|
2156 |
+
position: absolute;
|
2157 |
+
padding: 0;
|
2158 |
+
<?php if (isset($layer->hotspot_animation) && $layer->hotspot_animation) { ?>
|
2159 |
+
animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite ;
|
2160 |
+
-moz-animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite;
|
2161 |
+
-webkit-animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite;
|
2162 |
+
-o-animation: point-anim 1.5s ease <?php echo mt_rand(0, 300) / 100; ?>s infinite;
|
2163 |
+
<?php } ?>">
|
2164 |
+
</span>
|
2165 |
+
<span id="<?php echo $prefix; ?>"
|
2166 |
+
data-type="hotspot_text"
|
2167 |
+
class="wds_hotspot_text"
|
2168 |
+
style="<?php echo $layer->image_width ? 'width: ' . $layer->image_width . 'px; ' : 'white-space: nowrap;'; ?>
|
2169 |
+
<?php echo $layer->image_height ? 'height: ' . $layer->image_height . 'px; ' : ''; ?>
|
2170 |
+
position: absolute;
|
2171 |
+
word-break: <?php echo ($layer->image_scale ?'break-all':'normal'); ?>;
|
2172 |
+
display: none;
|
2173 |
+
z-index: <?php echo $layer->depth; ?>;
|
2174 |
+
color: #<?php echo $layer->color; ?>;
|
2175 |
+
font-size: <?php echo $layer->size; ?>px;
|
2176 |
+
line-height: 1.25em;
|
2177 |
+
font-family: <?php echo $fonts[$layer->ffamily]; ?>;
|
2178 |
+
font-weight: <?php echo $layer->fweight; ?>;
|
2179 |
+
padding: <?php echo $layer->padding; ?>;
|
2180 |
+
background-color: <?php echo WDW_S_Library::spider_hex2rgba($layer->fbgcolor, (100 - $layer->transparent) / 100); ?>;
|
2181 |
+
border: <?php echo $layer->border_width; ?>px <?php echo $layer->border_style; ?> #<?php echo $layer->border_color; ?>;
|
2182 |
+
border-radius: <?php echo $layer->border_radius; ?>; box-shadow: <?php echo $layer->shadow; ?>; text-align: <?php echo $layer->text_alignment; ?>">
|
2183 |
+
<?php echo str_replace(array("\r\n", "\r", "\n"), "<br>", $layer->text); ?>
|
2184 |
+
<span id="<?php echo $prefix; ?>_before" class="hotspot_text_before"></span>
|
2185 |
+
</span>
|
2186 |
+
</span>
|
2187 |
+
<?php
|
2188 |
+
break;
|
2189 |
+
}
|
2190 |
+
default:
|
2191 |
+
break;
|
2192 |
+
}
|
2193 |
+
}
|
2194 |
+
}
|
2195 |
+
?>
|
2196 |
+
</div>
|
2197 |
+
</div>
|
2198 |
+
</div>
|
2199 |
+
</div>
|
2200 |
+
<input type="hidden" id="image_url<?php echo $slide_row->id; ?>" name="image_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->image_url; ?>" />
|
2201 |
+
<input type="hidden" id="thumb_url<?php echo $slide_row->id; ?>" name="thumb_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->thumb_url; ?>" />
|
2202 |
+
<input type="hidden" id="post_id<?php echo $slide_row->id; ?>" name="post_id<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->thumb_url; ?>" />
|
2203 |
+
<input type="hidden" id="video_duration<?php echo $slide_row->id; ?>" name="video_duration<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->video_duration; ?>" />
|
2204 |
+
<input type="hidden" id="att_width<?php echo $slide_row->id; ?>" name="att_width<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->att_width; ?>" />
|
2205 |
+
<input type="hidden" id="att_height<?php echo $slide_row->id; ?>" name="att_height<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->att_height; ?>" />
|
2206 |
+
</td>
|
2207 |
+
</tr>
|
2208 |
+
<tr class="bgcolor">
|
2209 |
+
<td colspan="4">
|
2210 |
+
<h2 class="titles"><?php _e('Layers', WDS()->prefix); ?></h2>
|
2211 |
+
<div id="layer_add_buttons">
|
2212 |
+
<div class="layer_add_buttons_wrap">
|
2213 |
+
<button class="action_buttons add_text_layer button-small<?php echo !$fv ? "" : " wds_free_button"; ?>" onclick="<?php echo $fv ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('text', '" . $slide_row->id . "')"; ?>; return false;"><?php _e('Add Text Layer', WDS()->prefix); ?></button>
|
2214 |
+
</div>
|
2215 |
+
<?php
|
2216 |
+
if (!$spider_uploader) {
|
2217 |
+
?>
|
2218 |
+
<div class="layer_add_buttons_wrap">
|
2219 |
+
<button class="action_buttons add_image_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('image', '" . $slide_row->id . "', '')"; ?>; return false;"><?php _e('Add Image Layer', WDS()->prefix); ?></button>
|
2220 |
+
</div>
|
2221 |
+
<?php
|
2222 |
+
}
|
2223 |
+
else {
|
2224 |
+
?>
|
2225 |
+
<div class="layer_add_buttons_wrap">
|
2226 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_layer', 'slide_id' => $slide_row->id, 'TB_iframe' => '1'), $query_url); ?>" class="action_buttons add_image_layer button-small thickbox thickbox-preview<?php echo !$fv ? "" : " wds_free_button"; ?>" title="<?php _e('Add Image layer', WDS()->prefix); ?>" onclick="return false;">
|
2227 |
+
<?php _e('Add Image layer', WDS()->prefix); ?>
|
2228 |
+
</a>
|
2229 |
+
</div>
|
2230 |
+
<?php
|
2231 |
+
}
|
2232 |
+
?>
|
2233 |
+
<div class="layer_add_buttons_wrap">
|
2234 |
+
<input type="button" class="action_buttons add_video_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" id="button_video_url<?php echo $slide_row->id; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('upvideo', '" . $slide_row->id . "')"; ?>; return false;" value="<?php _e('Add Video Layer', WDS()->prefix); ?>" />
|
2235 |
+
</div>
|
2236 |
+
<div class="layer_add_buttons_wrap">
|
2237 |
+
<input type="button" class="action_buttons add_embed_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_video('" . $slide_row->id . "', 'video_layer')"; ?>" value="<?php _e('Embed Media Layer', WDS()->prefix); ?>" />
|
2238 |
+
</div>
|
2239 |
+
<div class="layer_add_buttons_wrap">
|
2240 |
+
<button class="action_buttons add_social_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('social', '" . $slide_row->id . "')"; ?>; return false;"><?php _e('Social Button Layer', WDS()->prefix); ?></button>
|
2241 |
+
</div>
|
2242 |
+
<div class="layer_add_buttons_wrap">
|
2243 |
+
<button class="action_buttons add_hotspot_layer button-small<?php echo !WDS()->is_free ? "" : " wds_free_button"; ?>" onclick="<?php echo WDS()->is_free ? "alert('". addslashes(__('This functionality is disabled in free version.', WDS()->prefix)) ."')" : "wds_add_layer('hotspots', '" . $slide_row->id . "')"; ?>; return false;" ><?php _e('Add Hotspot Layer', WDS()->prefix); ?></button>
|
2244 |
+
</div>
|
2245 |
+
<div class="clear"></div>
|
2246 |
+
</div>
|
2247 |
+
</td>
|
2248 |
+
</tr>
|
2249 |
+
</tbody>
|
2250 |
+
<?php
|
2251 |
+
$layer_ids_string = '';
|
2252 |
+
if ( !empty($layers_row[$slide_row->id]) ) {
|
2253 |
+
foreach ($layers_row[$slide_row->id] as $key => $layer) {
|
2254 |
+
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2255 |
+
?>
|
2256 |
+
<tbody class="layer_table_count" id="<?php echo $prefix; ?>_tbody">
|
2257 |
+
<tr class="wds_layer_head_tr">
|
2258 |
+
<td class="wds_layer_head" colspan="4">
|
2259 |
+
<div class="wds_layer_left">
|
2260 |
+
<div class="layer_handle handle connectedSortable" title="Drag to re-order"></div>
|
2261 |
+
<span class="wds_layer_label" onclick="wds_showhide_layer('<?php echo $prefix; ?>_tbody', 0)"><input id="<?php echo $prefix; ?>_title" name="<?php echo $prefix; ?>_title" type="text" class="wds_layer_title" value="<?php echo $layer->title; ?>" title="<?php _e('Layer title', WDS()->prefix); ?>" /></span>
|
2262 |
+
</div>
|
2263 |
+
<div class="wds_layer_right">
|
2264 |
+
<span class="wds_layer_remove" onclick="wds_delete_layer('<?php echo $slide_row->id; ?>', '<?php echo $layer->id; ?>'); " title="Delete layer"></span>
|
2265 |
+
<span class="wds_layer_dublicate" onclick="wds_add_layer('<?php echo $layer->type; ?>', '<?php echo $slide_row->id; ?>', '', 1, 0); wds_duplicate_layer('<?php echo $layer->type; ?>', '<?php echo $slide_row->id; ?>', '<?php echo $layer->id; ?>'); " title="<?php _e('Duplicate layer', WDS()->prefix); ?>"></span>
|
2266 |
+
<input id="<?php echo $prefix; ?>_depth" class="wds_layer_depth spider_int_input" type="text" onchange="change_zindex(this,'<?php echo $prefix; ?>'); " onkeypress="return spider_check_isnum(event); " value="<?php echo $layer->depth; ?>" prefix="<?php echo $prefix; ?>" name="<?php echo $prefix; ?>_depth" title="z-index" />
|
2267 |
+
</div>
|
2268 |
+
<div class="wds_clear"></div>
|
2269 |
+
</td>
|
2270 |
+
</tr>
|
2271 |
+
<?php
|
2272 |
+
switch ($layer->type) {
|
2273 |
+
/*--------text layer----------*/
|
2274 |
+
case 'text': {
|
2275 |
+
echo $this->wds_textLayerTemplates( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $slide_row->id, $prefix, $layer );
|
2276 |
+
break;
|
2277 |
+
}
|
2278 |
+
/*--------image layer----------*/
|
2279 |
+
case 'image': {
|
2280 |
+
echo $this->wds_imageLayerTemplates( $query_url, $spider_uploader, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $slide_row->id, $prefix, $layer );
|
2281 |
+
break;
|
2282 |
+
}
|
2283 |
+
/*--------video layer----------*/
|
2284 |
+
case 'video': {
|
2285 |
+
echo $this->wds_videoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $slide_row->id, $prefix, $layer );
|
2286 |
+
break;
|
2287 |
+
}
|
2288 |
+
case 'upvideo': {
|
2289 |
+
echo $this->wds_upvideoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $slide_row->id, $prefix, $layer );
|
2290 |
+
break;
|
2291 |
+
}
|
2292 |
+
/*--------social button layer----------*/
|
2293 |
+
case 'social': {
|
2294 |
+
echo $this->wds_socialLayerTemplate( $social_buttons, $layer_effects_in, $layer_effects_out, $slide_row->id, $prefix, $layer );
|
2295 |
+
break;
|
2296 |
+
}
|
2297 |
+
/*--------Hotspot layer----------*/
|
2298 |
+
case 'hotspots': {
|
2299 |
+
echo $this->wds_hotspotLayerTemplate( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $hotp_text_positions, $slide_row->id, $prefix, $layer );
|
2300 |
+
break;
|
2301 |
+
}
|
2302 |
+
default:
|
2303 |
+
break;
|
2304 |
+
}
|
2305 |
+
?>
|
2306 |
+
</tbody>
|
2307 |
+
<?php
|
2308 |
+
$layer_ids_string .= $layer->id . ',';
|
2309 |
+
}
|
2310 |
+
}
|
2311 |
+
?>
|
2312 |
+
</table>
|
2313 |
+
<input id="slide<?php echo $slide_row->id; ?>_layer_ids_string" name="slide<?php echo $slide_row->id; ?>_layer_ids_string" type="hidden" value="<?php echo $layer_ids_string; ?>" />
|
2314 |
+
<input id="slide<?php echo $slide_row->id; ?>_del_layer_ids_string" name="slide<?php echo $slide_row->id; ?>_del_layer_ids_string" type="hidden" value="" />
|
2315 |
+
</div>
|
2316 |
+
<script>
|
2317 |
+
jQuery(document).ready(function() {
|
2318 |
+
image_for_next_prev_butt('<?php echo $row->rl_butt_img_or_not; ?>');
|
2319 |
+
image_for_bull_butt('<?php echo $row->bull_butt_img_or_not; ?>');
|
2320 |
+
image_for_play_pause_butt('<?php echo $row->play_paus_butt_img_or_not; ?>');
|
2321 |
+
showhide_for_carousel_fildes('<?php echo $row->carousel; ?>');
|
2322 |
+
wds_whr('width');
|
2323 |
+
wds_drag_layer('<?php echo $slide_row->id; ?>');
|
2324 |
+
wds_layer_weights('<?php echo $slide_row->id; ?>');
|
2325 |
+
<?php
|
2326 |
+
if ( !empty($layers_row[$slide_row->id]) ) {
|
2327 |
+
foreach ($layers_row[$slide_row->id] as $key => $layer) {
|
2328 |
+
if ($layer->type == 'image') {
|
2329 |
+
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2330 |
+
?>
|
2331 |
+
wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>');
|
2332 |
+
<?php
|
2333 |
+
}
|
2334 |
+
if ($layer->type == 'text') {
|
2335 |
+
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2336 |
+
?>
|
2337 |
+
jQuery('#<?php echo $prefix; ?>').hover(
|
2338 |
+
function() {
|
2339 |
+
jQuery(this).css({
|
2340 |
+
color: '#' + jQuery('#<?php echo $prefix; ?>_hover_color_text').val()
|
2341 |
+
});
|
2342 |
+
},
|
2343 |
+
function() {
|
2344 |
+
jQuery(this).css({
|
2345 |
+
color: '#' + jQuery('#<?php echo $prefix; ?>_color').val()
|
2346 |
+
});
|
2347 |
+
}
|
2348 |
+
);
|
2349 |
+
<?php
|
2350 |
+
}
|
2351 |
+
if ($layer->type == 'social') {
|
2352 |
+
$prefix = 'slide' . $slide_row->id . '_layer' . $layer->id;
|
2353 |
+
?>
|
2354 |
+
jQuery('#<?php echo $prefix; ?>').hover(
|
2355 |
+
function() {
|
2356 |
+
jQuery(this).css({
|
2357 |
+
color: '#' + jQuery('#<?php echo $prefix; ?>_hover_color').val()
|
2358 |
+
});
|
2359 |
+
},
|
2360 |
+
function() {
|
2361 |
+
jQuery(this).css({
|
2362 |
+
color: '#' + jQuery('#<?php echo $prefix; ?>_color').val()
|
2363 |
+
});
|
2364 |
+
}
|
2365 |
+
);
|
2366 |
+
<?php
|
2367 |
+
}
|
2368 |
+
}
|
2369 |
+
}
|
2370 |
+
?>
|
2371 |
+
});
|
2372 |
+
</script>
|
2373 |
+
<?php
|
2374 |
+
$slide_ids_string .= $slide_row->id . ',';
|
2375 |
+
}
|
2376 |
+
?>
|
2377 |
+
<script>
|
2378 |
+
jQuery(document).ready(function() {
|
2379 |
+
wds_slider_fillmode_option = <?php echo json_encode($slider_fillmode_option); ?>
|
2380 |
+
});
|
2381 |
+
</script>
|
2382 |
+
</div>
|
2383 |
+
<div class="wds_box wds_howto_box meta-box-sortables">
|
2384 |
+
<div class="clear"></div>
|
2385 |
+
<div class="bgcolor wds_tabs aui-sortable">
|
2386 |
+
<h2 class="titles wd-slides-title"><?php _e('How to use', WDS()->prefix); ?></h2>
|
2387 |
+
<div class="wds_howto_container">
|
2388 |
+
<div class="wds_howto_content">
|
2389 |
+
<h2><?php _e('Shortcode', WDS()->prefix); ?></h2>
|
2390 |
+
<h4><?php _e('Copy and paste this shortcode into your posts or pages:', WDS()->prefix); ?></h4>
|
2391 |
+
<input type="text" class="wds_howto_shortcode" value='[wds id="<?php echo $row->id; ?>"]' onclick="spider_select_value(this)" size="11" readonly="readonly" />
|
2392 |
+
</div>
|
2393 |
+
<div class="wds_howto_content">
|
2394 |
+
<h2><?php _e('Page or Post editor', WDS()->prefix); ?></h2>
|
2395 |
+
<h4><?php _e('Insert it into an existing post with the button:', WDS()->prefix); ?></h4>
|
2396 |
+
<img src="<?php echo WDS()->plugin_url . '/images/sliderwdpng/wp-publish.png'; ?>" alt="<?php _e('Post editor', WDS()->prefix); ?>" />
|
2397 |
+
</div>
|
2398 |
+
<div class="wds_howto_content">
|
2399 |
+
<h2><?php _e('PHP code', WDS()->prefix); ?></h2>
|
2400 |
+
<h4><?php _e('Copy and paste the PHP code into your template file:', WDS()->prefix); ?></h4>
|
2401 |
+
<input type="text" class="wds_howto_phpcode" value="<?php wd_slider(<?php echo $row->id; ?>); ?>" onclick="spider_select_value(this)" size="17" readonly="readonly" />
|
2402 |
+
</div>
|
2403 |
+
</div>
|
2404 |
+
</div>
|
2405 |
+
</div>
|
2406 |
+
</div>
|
2407 |
+
<div class="wds_task_cont">
|
2408 |
+
<input id="task" name="task" type="hidden" value="" />
|
2409 |
+
<input id="current_id" name="current_id" type="hidden" value="<?php echo $row->id; ?>" />
|
2410 |
+
<input id="save_as_copy" name="save_as_copy" type="hidden" value="" />
|
2411 |
+
<input id="slide_ids_string" name="slide_ids_string" type="hidden" value="<?php echo $slide_ids_string; ?>" />
|
2412 |
+
<input id="del_slide_ids_string" name="del_slide_ids_string" type="hidden" value="" />
|
2413 |
+
<input id="nav_tab" name="nav_tab" type="hidden" value="<?php echo WDW_S_Library::get('nav_tab', 'global'); ?>" />
|
2414 |
+
<input id="tab" name="tab" type="hidden" value="<?php echo WDW_S_Library::get('tab', 'slides'); ?>" />
|
2415 |
+
<input id="sub_tab" name="sub_tab" type="hidden" value="<?php echo $sub_tab_type; ?>" />
|
2416 |
+
<script>
|
2417 |
+
var spider_uploader_ = <?php echo $spider_uploader; ?>;
|
2418 |
+
</script>
|
2419 |
+
</div>
|
2420 |
+
<script>
|
2421 |
+
var fv = '<?php echo $fv; ?>';
|
2422 |
+
var ajax_url = "<?php echo wp_nonce_url(admin_url('admin-ajax.php'), '', 'nonce_wd'); ?>";
|
2423 |
+
var uploader_href = '<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_update_slide', 'slide_id' => 'slideID', 'layer_id' => 'layerID', 'TB_iframe' => '1'), $query_url); ?>';
|
2424 |
+
var WD_S_URL = '<?php echo WDS()->plugin_url; ?>';
|
2425 |
+
jQuery(document).ready(function() {
|
2426 |
+
wds_onload();
|
2427 |
+
});
|
2428 |
+
jQuery("#sliders_form").on("click", "a", function(e) {
|
2429 |
+
e.preventDefault();
|
2430 |
+
});
|
2431 |
+
jQuery(".wds_tab_title").keyup(function (e) {
|
2432 |
+
var code = e.which;
|
2433 |
+
if (code == 13) {
|
2434 |
+
jQuery(".wds_sub_active .wds_tab_title").blur();
|
2435 |
+
jQuery(".wds_tab_title_wrap").removeClass("wds_sub_active");
|
2436 |
+
}
|
2437 |
+
});
|
2438 |
+
var plugin_dir = '<?php echo WDS()->plugin_url . "/images/sliderwdpng/"; ?>';
|
2439 |
+
</script>
|
2440 |
+
<div class="opacity_add_video wds_opacity_video wds_opacity_export opacity_wp_editor"
|
2441 |
+
onclick="jQuery('.opacity_add_video').hide();
|
2442 |
+
jQuery('.opacity_add_image_url').hide();
|
2443 |
+
jQuery('.wds_exports').hide();
|
2444 |
+
jQuery('.wds_editor').hide();">
|
2445 |
+
</div>
|
2446 |
+
<div class="wds_exports">
|
2447 |
+
<input type="checkbox" name="imagesexport" id="imagesexport" value="<?php _e('Images export', WDS()->prefix); ?>" checked="checked" />
|
2448 |
+
<label for="imagesexport"><?php _e('Check the box to export the images included within sliders', WDS()->prefix); ?></label>
|
2449 |
+
<input class="button-secondary" type="button" id="wds_export_btn" data-href="<?php echo add_query_arg(array('action' => 'WDSExport'), admin_url('admin-ajax.php')); ?>" onclick="spider_set_input_value('task', 'export_on'); wds_spider_ajax_save('sliders_form', event); jQuery('.wds_exports').hide(); jQuery('.wds_opacity_export').hide();" value="<?php _e('Export', WDS()->prefix); ?>" />
|
2450 |
+
<input type="button" class="button-secondary" onclick="jQuery('.wds_exports').hide(); jQuery('.wds_opacity_export').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
2451 |
+
</div>
|
2452 |
+
<div id="add_embed" class="opacity_add_video wds_add_video">
|
2453 |
+
<input type="text" id="embed_url" name="embed_url" value="" />
|
2454 |
+
<input class="button button-primary" type="button" onclick="if (wds_get_embed_info(jQuery('#embed_url').val())) {jQuery('.opacity_add_video').hide();} jQuery('#embed_url').val(''); return false;" value="<?php _e('Add', WDS()->prefix); ?>" />
|
2455 |
+
<input class="button" type="button" onclick="jQuery('.opacity_add_video').hide(); jQuery('#embed_url').val(''); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
2456 |
+
<div class="spider_description">
|
2457 |
+
<?php _e('Enter YouTube, Vimeo, Instagram, Flickr or Dailymotion URL here.', WDS()->prefix); ?>
|
2458 |
+
</div>
|
2459 |
+
<div class="spider_description">
|
2460 |
+
<p><?php _e('<b>Youtube</b> URL example:', WDS()->prefix); ?> <i>https://www.youtube.com/watch?v=xebpM_-GwG0</i></p>
|
2461 |
+
<p><?php _e('<b>Vimeo</b> URL example:', WDS()->prefix); ?> <i>https://vimeo.com/69726973</i></p>
|
2462 |
+
<p><?php _e('<b>Instagram</b> URL example:', WDS()->prefix); ?> <i>https://instagram.com/p/4o65J9QNDm</i>.<br /><?php _e('Add', WDS()->prefix); ?> "<i style="text-decoration:underline;"><?php _e('post', WDS()->prefix); ?></i>" <?php _e('to the end of URL if you want to embed the whole Instagram post, not only its content.', WDS()->prefix); ?></p>
|
2463 |
+
<p><?php _e('<b>Flickr</b> URL example:', WDS()->prefix); ?> <i>https://www.flickr.com/photos/powerpig/18780957662/in/photostream/</i></p>
|
2464 |
+
<p><?php _e('<b>Dailymotion</b> URL example:', WDS()->prefix); ?> <i>http://www.dailymotion.com/video/x2w0jzl_cortoons-tv-tropty-episodio-2_fun</i></p>
|
2465 |
+
</div>
|
2466 |
+
</div>
|
2467 |
+
<div class="wds_editor">
|
2468 |
+
<div class="wds_editor_insert_btn">
|
2469 |
+
<input type="button" class="button button-primary" onclick="wds_insert_html()" value="<?php _e('Insert', WDS()->prefix); ?>" />
|
2470 |
+
<input type="button" class="button button-secondary" onclick="jQuery('.opacity_wp_editor').hide();jQuery('.wds_editor').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
2471 |
+
</div>
|
2472 |
+
<?php
|
2473 |
+
wp_editor('', 'template_text', array('teeny' => TRUE, 'textarea_name' => 'template_text', 'media_buttons' => FALSE, 'textarea_rows' => 5,'quicktags' => FALSE));
|
2474 |
+
?>
|
2475 |
+
<input type="hidden" id="current_prefix" value="" />
|
2476 |
+
</div>
|
2477 |
+
</form>
|
2478 |
+
<?php
|
2479 |
+
}
|
2480 |
+
|
2481 |
+
/**
|
2482 |
+
* Image layer template
|
2483 |
+
*/
|
2484 |
+
function wds_imageLayerTemplates( $query_url, $spider_uploader, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $id=false, $prefix=false, $layer=false ) {
|
2485 |
+
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
2486 |
+
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
2487 |
+
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
2488 |
+
if( $layer == "" ) {
|
2489 |
+
$new_layer = array(
|
2490 |
+
'static_layer' => '0',
|
2491 |
+
'id' => 'pr_%%LayerId%%',
|
2492 |
+
'image_url' => '',
|
2493 |
+
'image_width' => '',
|
2494 |
+
'image_height' => '',
|
2495 |
+
'image_scale' => 'slide' . $id . '_layerpr_%%LayerId%%_image_scale',
|
2496 |
+
'alt' => '',
|
2497 |
+
'link' => '',
|
2498 |
+
'target_attr_layer' => 0,
|
2499 |
+
'left' => '0',
|
2500 |
+
'top' => '0',
|
2501 |
+
'layer_callback_list' => $layer_callbacks,
|
2502 |
+
'link_to_slide' => '',
|
2503 |
+
'imgtransparent' => 0,
|
2504 |
+
'published' => 1,
|
2505 |
+
'start' => 1000,
|
2506 |
+
'layer_effect_in' => 'none',
|
2507 |
+
'duration_eff_in' => 1000,
|
2508 |
+
'infinite_in' => 1,
|
2509 |
+
'end' => 3000,
|
2510 |
+
'layer_effect_out' => 'none',
|
2511 |
+
'duration_eff_out' => 1000,
|
2512 |
+
'infinite_out' => 1,
|
2513 |
+
'border_width' => 2,
|
2514 |
+
'border_style' => $border_styles,
|
2515 |
+
'border_color' => 'FFFFFF',
|
2516 |
+
'border_radius' => '2px',
|
2517 |
+
'shadow' => '',
|
2518 |
+
'add_class' => '',
|
2519 |
+
);
|
2520 |
+
} else {
|
2521 |
+
$new_layer = array(
|
2522 |
+
'static_layer' => $layer->static_layer,
|
2523 |
+
'id' => $layer->id,
|
2524 |
+
'image_url' => $layer->image_url,
|
2525 |
+
'image_width' => $layer->image_width,
|
2526 |
+
'image_height' => $layer->image_height,
|
2527 |
+
'image_scale' => $layer->image_scale,
|
2528 |
+
'alt' => $layer->alt,
|
2529 |
+
'link' => $layer->link,
|
2530 |
+
'target_attr_layer' => $layer->target_attr_layer,
|
2531 |
+
'left' => $layer->left,
|
2532 |
+
'top' => $layer->top,
|
2533 |
+
'layer_callback_list' => $layer->layer_callback_list,
|
2534 |
+
'link_to_slide' => $layer->link_to_slide,
|
2535 |
+
'imgtransparent' => $layer->imgtransparent,
|
2536 |
+
'published' => $layer->published,
|
2537 |
+
'start' => $layer->start,
|
2538 |
+
'layer_effect_in' => $layer->layer_effect_in,
|
2539 |
+
'duration_eff_in' => $layer->duration_eff_in,
|
2540 |
+
'infinite_in' => $layer->infinite_in,
|
2541 |
+
'end' => $layer->end,
|
2542 |
+
'layer_effect_out' => $layer->layer_effect_out,
|
2543 |
+
'duration_eff_out' => $layer->duration_eff_out,
|
2544 |
+
'infinite_out' => $layer->infinite_out,
|
2545 |
+
'border_width' => $layer->border_width,
|
2546 |
+
'border_style' => $layer->border_style,
|
2547 |
+
'border_color' => $layer->border_color,
|
2548 |
+
'border_radius' => $layer->border_radius,
|
2549 |
+
'shadow' => $layer->shadow,
|
2550 |
+
'add_class' => $layer->add_class,
|
2551 |
+
);
|
2552 |
+
}
|
2553 |
+
ob_start();
|
2554 |
+
?>
|
2555 |
+
<tr style="display:none" class="wds_layer_tr wds_imageLayer wds_layer_content">
|
2556 |
+
<td colspan="3">
|
2557 |
+
<div class="wd-table">
|
2558 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
2559 |
+
<div class="wd-box-section">
|
2560 |
+
<div class="wd-box-content">
|
2561 |
+
<span class="wd-group">
|
2562 |
+
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
2563 |
+
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
2564 |
+
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
2565 |
+
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?>/>
|
2566 |
+
<label <?php echo ((!$new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
2567 |
+
<p class="description"></p>
|
2568 |
+
</span>
|
2569 |
+
<span class="wd-group">
|
2570 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
2571 |
+
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
2572 |
+
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
2573 |
+
</span>
|
2574 |
+
<span class="wd-group">
|
2575 |
+
<label class="wd-label" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
2576 |
+
<input type="hidden" name="<?php echo $prefix; ?>_image_url" id="<?php echo $prefix; ?>_image_url" value="<?php echo $new_layer['image_url']; ?>" />
|
2577 |
+
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
2578 |
+
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
2579 |
+
<input id="<?php echo $prefix; ?>_image_scale" type="checkbox" onchange="wds_scale(this, '<?php echo $prefix; ?>')" name="<?php echo $prefix; ?>_image_scale" <?php echo (($new_layer['image_scale']) ? 'checked="checked"' : ''); ?> /><label for="<?php echo $prefix; ?>_image_scale"><?php _e('Scale', WDS()->prefix); ?></label>
|
2580 |
+
<?php
|
2581 |
+
if ( !$spider_uploader ) {
|
2582 |
+
?>
|
2583 |
+
<input type="button" class="button button-secondary" id="button_image_url<?php echo $id; ?>" onclick="wds_add_layer('image', '<?php echo $id; ?>', '<?php echo $new_layer['id']; ?>', '', '', 1); return false;" value="<?php _e('Edit Image', WDS()->prefix); ?>" />
|
2584 |
+
<?php
|
2585 |
+
} else {
|
2586 |
+
?>
|
2587 |
+
<a href="<?php echo add_query_arg(array('callback' => 'wds_add_image', 'image_for' => 'add_update_layer', 'slide_id' => $id, 'layer_id' => $new_layer['id'], 'TB_iframe' => '1'), $query_url); ?>" class="button button-secondary thickbox thickbox-preview" title="<?php _e('Edit Image', WDS()->prefix); ?>" onclick="return false;">
|
2588 |
+
<?php _e('Edit Image', WDS()->prefix); ?>
|
2589 |
+
</a>
|
2590 |
+
<?php
|
2591 |
+
}
|
2592 |
+
?>
|
2593 |
+
<p class="description"><?php _e('Set width and height of the image.', WDS()->prefix); ?></p>
|
2594 |
+
</span>
|
2595 |
+
<span class="wd-group">
|
2596 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_alt" title=""><?php _e('Alt:', WDS()->prefix); ?></label>
|
2597 |
+
<input id="<?php echo $prefix; ?>_alt" type="text" class="wds_link" value="<?php echo $new_layer['alt']; ?>" name="<?php echo $prefix; ?>_alt" />
|
2598 |
+
<p class="description"><?php _e('Set the value of alt HTML attribute for this image layer.', WDS()->prefix); ?></p>
|
2599 |
+
</span>
|
2600 |
+
<span class="wd-group">
|
2601 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_link" title=""><?php _e('Link:', WDS()->prefix); ?></label>
|
2602 |
+
<input id="<?php echo $prefix; ?>_link" class="wds_link" type="text" value="<?php echo $new_layer['link']; ?>" name="<?php echo $prefix; ?>_link" />
|
2603 |
+
<input id="<?php echo $prefix; ?>_target_attr_layer" type="checkbox" name="<?php echo $prefix; ?>_target_attr_layer" <?php echo (($new_layer['target_attr_layer']) ? 'checked="checked"' : ''); ?> value="1" /><label for="<?php echo $prefix; ?>_target_attr_layer"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
2604 |
+
<p class="description"><?php _e('Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
2605 |
+
</span>
|
2606 |
+
<span class="wd-group">
|
2607 |
+
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
2608 |
+
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
2609 |
+
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
2610 |
+
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
2611 |
+
</span>
|
2612 |
+
<span class="wd-group">
|
2613 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_imgtransparent" title=""><?php _e('Transparency:', WDS()->prefix); ?></label>
|
2614 |
+
<input id="<?php echo $prefix; ?>_imgtransparent" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({opacity: (100 - jQuery(this).val()) / 100, filter: 'Alpha(opacity=' + 100 - jQuery(this).val() + ')'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['imgtransparent']; ?>" name="<?php echo $prefix; ?>_imgtransparent"> %
|
2615 |
+
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
2616 |
+
</span>
|
2617 |
+
<span class="wd-group">
|
2618 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_callback_list"><?php _e('Add click action:', WDS()->prefix); ?></label>
|
2619 |
+
<select class="select_icon select_icon_320" style="width: 120px;" id="<?php echo $prefix; ?>_layer_callback_list" name="<?php echo $prefix; ?>_layer_callback_list" onchange="wds_show_slides_name('<?php echo $prefix; ?>', jQuery(this).val());">
|
2620 |
+
<?php
|
2621 |
+
foreach ($layer_callbacks as $key => $layer_callback_list) {
|
2622 |
+
?>
|
2623 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['layer_callback_list'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $layer_callback_list; ?></option>
|
2624 |
+
<?php
|
2625 |
+
}
|
2626 |
+
?>
|
2627 |
+
</select>
|
2628 |
+
<p class="description"></p>
|
2629 |
+
</span>
|
2630 |
+
<span class="wd-group">
|
2631 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_link_to_slide" class="link_to_slide" style="<?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>"><?php _e('Slides Name:', WDS()->prefix); ?></label>
|
2632 |
+
<select class="select_icon select_icon_320" style="width: 120px; <?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>" id="<?php echo $prefix; ?>_link_to_slide" name="<?php echo $prefix; ?>_link_to_slide">
|
2633 |
+
<?php
|
2634 |
+
foreach ($slides_name as $key => $slide_name) {
|
2635 |
+
?>
|
2636 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['link_to_slide'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $slide_name; ?></option>
|
2637 |
+
<?php
|
2638 |
+
}
|
2639 |
+
?>
|
2640 |
+
</select>
|
2641 |
+
<p class="description"></p>
|
2642 |
+
</span>
|
2643 |
+
</div>
|
2644 |
+
</div>
|
2645 |
+
</div>
|
2646 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
2647 |
+
<div class="wd-box-section">
|
2648 |
+
<div class="wd-box-content">
|
2649 |
+
<span class="wd-group">
|
2650 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
2651 |
+
<span style="display: inline-block;">
|
2652 |
+
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
2653 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
2654 |
+
</span>
|
2655 |
+
<span style="display: inline-block;">
|
2656 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
2657 |
+
<?php
|
2658 |
+
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
2659 |
+
?>
|
2660 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
2661 |
+
<?php
|
2662 |
+
}
|
2663 |
+
?>
|
2664 |
+
</select>
|
2665 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
2666 |
+
</span>
|
2667 |
+
<span style="display: inline-block;">
|
2668 |
+
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
2669 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
2670 |
+
</span>
|
2671 |
+
<span style="display: inline-block;">
|
2672 |
+
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="<?php _e('0 for play infinte times', WDS()->prefix); ?>" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
2673 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
2674 |
+
</span>
|
2675 |
+
</span>
|
2676 |
+
<span class="wd-group">
|
2677 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
2678 |
+
<span style="display: inline-block;">
|
2679 |
+
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
2680 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
2681 |
+
</span>
|
2682 |
+
<span style="display: inline-block;">
|
2683 |
+
<select class="select_icon select_icon_320 wds_link" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
2684 |
+
<?php
|
2685 |
+
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
2686 |
+
?>
|
2687 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
2688 |
+
<?php
|
2689 |
+
}
|
2690 |
+
?>
|
2691 |
+
</select>
|
2692 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
2693 |
+
</span>
|
2694 |
+
<span style="display: inline-block;">
|
2695 |
+
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
2696 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
2697 |
+
</span>
|
2698 |
+
<span style="display: inline-block;">
|
2699 |
+
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
2700 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
2701 |
+
</span>
|
2702 |
+
</span>
|
2703 |
+
<span class="wd-group">
|
2704 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
2705 |
+
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
2706 |
+
<select class="select_icon" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
2707 |
+
<?php
|
2708 |
+
foreach ($border_styles as $key => $border_style) {
|
2709 |
+
?>
|
2710 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
2711 |
+
<?php
|
2712 |
+
}
|
2713 |
+
?>
|
2714 |
+
</select>
|
2715 |
+
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
2716 |
+
<p class="description"></p>
|
2717 |
+
</span>
|
2718 |
+
<span class="wd-group">
|
2719 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
2720 |
+
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
2721 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
2722 |
+
</span>
|
2723 |
+
<span class="wd-group">
|
2724 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_shadow"><?php _e('Shadow:', WDS()->prefix); ?></label>
|
2725 |
+
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
2726 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
2727 |
+
</span>
|
2728 |
+
<span class="wd-group">
|
2729 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_add_class"><?php _e('Add class:', WDS()->prefix); ?></label>
|
2730 |
+
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
2731 |
+
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
2732 |
+
</span>
|
2733 |
+
</div>
|
2734 |
+
</div>
|
2735 |
+
</div>
|
2736 |
+
</div>
|
2737 |
+
</td>
|
2738 |
+
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="image">
|
2739 |
+
</tr>
|
2740 |
+
<?php
|
2741 |
+
return ob_get_clean();
|
2742 |
+
}
|
2743 |
+
|
2744 |
+
/**
|
2745 |
+
* Text layer template
|
2746 |
+
*/
|
2747 |
+
function wds_textLayerTemplates( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $id=false, $prefix=false, $layer=false ) {
|
2748 |
+
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
2749 |
+
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
2750 |
+
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
2751 |
+
if( $layer == "" ) {
|
2752 |
+
$new_layer = array(
|
2753 |
+
'text' => 'Sample Text',
|
2754 |
+
'static_layer' => '0',
|
2755 |
+
'id' => $id,
|
2756 |
+
'image_width' => '',
|
2757 |
+
'image_height' => '',
|
2758 |
+
'image_scale' => '1',
|
2759 |
+
'size' => '18',
|
2760 |
+
'min_size' => '11',
|
2761 |
+
'color' => 'FFFFFF',
|
2762 |
+
'hover_color_text' => 'FFFFFF',
|
2763 |
+
'align' => '0',
|
2764 |
+
'left' => '0',
|
2765 |
+
'top' => '0',
|
2766 |
+
//'text_position' => '0',
|
2767 |
+
'google_fonts' => $google_fonts,
|
2768 |
+
'ffamily' => $font_families,
|
2769 |
+
'fweight' => '1',
|
2770 |
+
'link' => '',
|
2771 |
+
'target_attr_layer' => 0,
|
2772 |
+
'layer_callback_list' => $layer_callbacks,
|
2773 |
+
'published' => 1,
|
2774 |
+
'start' => 1000,
|
2775 |
+
'layer_effect_in' => 'none',
|
2776 |
+
'duration_eff_in' => 1000,
|
2777 |
+
'infinite_in' => 1,
|
2778 |
+
'end' => 3000,
|
2779 |
+
'layer_effect_out' => 'none',
|
2780 |
+
'duration_eff_out' => 1000,
|
2781 |
+
'infinite_out' => 1,
|
2782 |
+
'padding' => '5px',
|
2783 |
+
'fbgcolor' => '000000',
|
2784 |
+
'transparent' => 50,
|
2785 |
+
'border_width' => 2,
|
2786 |
+
'border_style' => $border_styles,
|
2787 |
+
'border_radius' => '2px',
|
2788 |
+
'border_color' => 'BBBBBB',
|
2789 |
+
'shadow' => '',
|
2790 |
+
'add_class' => '',
|
2791 |
+
'text_alignment' => 'left',
|
2792 |
+
'link_to_slide' => '',
|
2793 |
+
);
|
2794 |
+
} else {
|
2795 |
+
$new_layer = array(
|
2796 |
+
'text' => $layer->text,
|
2797 |
+
'static_layer' => $layer->static_layer,
|
2798 |
+
'id' => $layer->id,
|
2799 |
+
'image_width' => $layer->image_width,
|
2800 |
+
'image_height' => $layer->image_height,
|
2801 |
+
'image_scale' => $layer->image_scale,
|
2802 |
+
'size' => $layer->size,
|
2803 |
+
'min_size' => $layer->min_size,
|
2804 |
+
'color' => $layer->color,
|
2805 |
+
'hover_color_text' => $layer->hover_color_text,
|
2806 |
+
'align' => $layer->align_layer,
|
2807 |
+
'left' => $layer->left,
|
2808 |
+
'top' => $layer->top,
|
2809 |
+
//'text_position' => $layer->text_position,
|
2810 |
+
'google_fonts' => $layer->google_fonts,
|
2811 |
+
'ffamily' => $layer->ffamily,
|
2812 |
+
'fweight' => $layer->fweight,
|
2813 |
+
'link' => $layer->link,
|
2814 |
+
'target_attr_layer' => $layer->target_attr_layer,
|
2815 |
+
'layer_callback_list' => $layer->layer_callback_list,
|
2816 |
+
'published' => $layer->published,
|
2817 |
+
'start' => $layer->start,
|
2818 |
+
'layer_effect_in' => $layer->layer_effect_in,
|
2819 |
+
'duration_eff_in' => $layer->duration_eff_in,
|
2820 |
+
'infinite_in' => $layer->infinite_in,
|
2821 |
+
'end' => $layer->end,
|
2822 |
+
'layer_effect_out' => $layer->layer_effect_out,
|
2823 |
+
'duration_eff_out' => $layer->duration_eff_out,
|
2824 |
+
'infinite_out' => $layer->infinite_out,
|
2825 |
+
'padding' => $layer->padding,
|
2826 |
+
'fbgcolor' => $layer->fbgcolor,
|
2827 |
+
'transparent' => $layer->transparent,
|
2828 |
+
'border_width' => $layer->border_width,
|
2829 |
+
'border_style' => $layer->border_style,
|
2830 |
+
'border_radius' => $layer->border_radius,
|
2831 |
+
'border_color' => $layer->border_color,
|
2832 |
+
'shadow' => $layer->shadow,
|
2833 |
+
'add_class' => $layer->add_class,
|
2834 |
+
'text_alignment' => $layer->text_alignment,
|
2835 |
+
'link_to_slide' => $layer->link_to_slide,
|
2836 |
+
|
2837 |
+
);
|
2838 |
+
}
|
2839 |
+
ob_start();
|
2840 |
+
?>
|
2841 |
+
<tr style="display:none" class="wds_layer_content wds_textLayer">
|
2842 |
+
<td colspan="2">
|
2843 |
+
<div class="wd-table">
|
2844 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
2845 |
+
<div class="wd-box-section">
|
2846 |
+
<div class="wd-box-content">
|
2847 |
+
<span class="wd-group">
|
2848 |
+
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
2849 |
+
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
2850 |
+
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
2851 |
+
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
2852 |
+
<label <?php echo (($new_layer['published']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
2853 |
+
<p class="description"></p>
|
2854 |
+
</span>
|
2855 |
+
|
2856 |
+
<span class="wd-group">
|
2857 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_text"><?php _e('Text:', WDS()->prefix); ?></label>
|
2858 |
+
<textarea id="<?php echo $prefix; ?>_text" class='wds_textarea' name="<?php echo $prefix; ?>_text" onkeyup="wds_new_line('<?php echo $prefix; ?>');"><?php echo $new_layer['text']; ?></textarea>
|
2859 |
+
<input type="button" class="wds_editor_btn button button-secondary" onclick="wds_show_wp_editor('<?php echo $prefix; ?>')" value="<?php _e('Editor', WDS()->prefix); ?>" />
|
2860 |
+
<p class="description"></p>
|
2861 |
+
</span>
|
2862 |
+
<?php
|
2863 |
+
/*
|
2864 |
+
Todo will use this code in other version
|
2865 |
+
<span class="wd-group">
|
2866 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_text_position"><?php _e('Text position:', WDS()->prefix); ?></label>
|
2867 |
+
<input id="<?php echo $prefix; ?>_text_position0" class="wds_text_positio" type="radio" name="<?php echo $prefix;?>_text_position" value="0" onchange="wds_change_text_position('<?php echo $new_layer['id'] ?>','<?php echo $prefix; ?>_text_position0')" <?php echo ( isset($new_layer['text_position']) && $new_layer['text_position'] == 0) ? 'checked="checked"' :''?> />
|
2868 |
+
<label for="<?php echo $prefix; ?>_text_position0"><?php _e('Inside', WDS()->prefix);?></label>
|
2869 |
+
<input id="<?php echo $prefix; ?>_text_position1" class="wds_text_positio" type="radio" name="<?php echo $prefix;?>_text_position" value="1" onchange="wds_change_text_position('<?php echo $new_layer['id'] ?>','<?php echo $prefix; ?>_text_position1')" <?php echo ( isset($new_layer['text_position']) && $new_layer['text_position'] == 1) ? 'checked="checked"' :''?> />
|
2870 |
+
<label for="<?php echo $prefix; ?>_text_position1"><?php _e('Top', WDS()->prefix);?></label>
|
2871 |
+
<input id="<?php echo $prefix; ?>_text_position2" class="wds_text_positio" type="radio" name="<?php echo $prefix;?>_text_position" value="2" onchange="wds_change_text_position('<?php echo $new_layer['id'] ?>','<?php echo $prefix; ?>_text_position2')" <?php echo ( isset($new_layer['text_position']) && $new_layer['text_position'] == 2) ? 'checked="checked"' :''?> />
|
2872 |
+
<label for="<?php echo $prefix; ?>_text_position2"><?php _e('Bottom', WDS()->prefix);?></label>
|
2873 |
+
</span>
|
2874 |
+
*/
|
2875 |
+
?>
|
2876 |
+
<span class="wd-group">
|
2877 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
2878 |
+
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
2879 |
+
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); _e('Leave blank to keep the initial width and height.', WDS()->prefix); ?></p>
|
2880 |
+
</span>
|
2881 |
+
<span class="wd-group">
|
2882 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_image_width"><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
2883 |
+
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onchange="wds_text_width(this, '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
2884 |
+
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onchange="wds_text_height(this, '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> %
|
2885 |
+
<input id="<?php echo $prefix; ?>_image_scale" type="checkbox" onchange="wds_break_word(this, '<?php echo $prefix; ?>')" name="<?php echo $prefix; ?>_image_scale" <?php echo (($new_layer['image_scale']) ? 'checked="checked"' : ''); ?> /><label for="<?php echo $prefix; ?>_image_scale"><?php _e('Break-word', WDS()->prefix); ?></label>
|
2886 |
+
<p class="description"><?php _e('Leave blank to keep the initial width and height. ', WDS()->prefix); ?><?php _e('Break-word may break lines from between any two letters, if their width is larger than dimensions.', WDS()->prefix); ?></p>
|
2887 |
+
</span>
|
2888 |
+
<span class="wd-group">
|
2889 |
+
<label class="wd-label"><?php _e('Position:', WDS()->prefix); ?></label>
|
2890 |
+
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" <?php echo ($new_layer['align']) ? 'disabled="disabled"' : ''; ?> onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
2891 |
+
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
2892 |
+
<input id="<?php echo $prefix; ?>_align_layer" type="checkbox" name="<?php echo $prefix; ?>_align_layer" <?php echo checked(1, $new_layer['align'] ); ?> value="1" onchange="wds_position_left_disabled('<?php echo $prefix; ?>')" /><label for="<?php echo $prefix; ?>_align_layer"><?php _e('Fixed step (left, center, right)', WDS()->prefix); ?></label>
|
2893 |
+
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position. ', WDS()->prefix); ?><?php _e('Fixed step places the layer on one of three positions (left, center, or right), based on its Y position.', WDS()->prefix); ?></p>
|
2894 |
+
</span>
|
2895 |
+
<span class="wd-group">
|
2896 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Size:', WDS()->prefix); ?></label>
|
2897 |
+
<span style="display: inline-block">
|
2898 |
+
<input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['size']; ?>" name="<?php echo $prefix; ?>_size" /> px
|
2899 |
+
</span>
|
2900 |
+
<p class="description"><?php _e('Sets the font size of the text.', WDS()->prefix); ?></p>
|
2901 |
+
</span>
|
2902 |
+
<span class="wd-group">
|
2903 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Minimum font size:', WDS()->prefix); ?></label>
|
2904 |
+
<span style="display: inline-block;">
|
2905 |
+
<input id="<?php echo $prefix; ?>_min_size" class="spider_int_input" type="text" onchange="wds_min_size_validation('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['min_size']; ?>" name="<?php echo $prefix; ?>_min_size" /> px
|
2906 |
+
</span>
|
2907 |
+
<p class="description"><?php _e('Text layer font size shrinks on small screens. Choose the minimum font size, which the text should have.', WDS()->prefix); ?></p>
|
2908 |
+
</span>
|
2909 |
+
<span class="wd-group">
|
2910 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
2911 |
+
<input id="<?php echo $prefix; ?>_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({color: '#' + jQuery(this).val()})" value="<?php echo $new_layer['color']; ?>" name="<?php echo $prefix; ?>_color" />
|
2912 |
+
<p class="description"></p>
|
2913 |
+
</span>
|
2914 |
+
<span class="wd-group">
|
2915 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_hover_color_text"><?php _e('Hover Color:', WDS()->prefix); ?></label>
|
2916 |
+
<input id="<?php echo $prefix; ?>_hover_color_text" class="color" type="text" value="<?php echo $new_layer['hover_color_text']; ?>" name="<?php echo $prefix; ?>_hover_color_text" />
|
2917 |
+
<p class="description"></p>
|
2918 |
+
</span>
|
2919 |
+
<span class="wd-group">
|
2920 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_ffamily"><?php _e('Font family:', WDS()->prefix); ?></label>
|
2921 |
+
<select class="select_icon select_icon_320" style="width: 200px;" id="<?php echo $prefix; ?>_ffamily" onchange="wds_change_fonts('<?php echo $prefix; ?>', 1)" name="<?php echo $prefix; ?>_ffamily">
|
2922 |
+
<?php
|
2923 |
+
$fonts = (isset($new_layer['google_fonts']) && $new_layer['google_fonts']) ? $google_fonts : $font_families;
|
2924 |
+
foreach ($fonts as $key => $font_family) {
|
2925 |
+
?>
|
2926 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['ffamily'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
|
2927 |
+
<?php
|
2928 |
+
}
|
2929 |
+
?>
|
2930 |
+
</select>
|
2931 |
+
<input id="<?php echo $prefix; ?>_google_fonts1" type="radio" name="<?php echo $prefix; ?>_google_fonts" value="1" <?php echo (($new_layer['google_fonts']) ? 'checked="checked"' : ''); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
2932 |
+
<label for="<?php echo $prefix; ?>_google_fonts1"><?php _e('Google fonts', WDS()->prefix); ?></label>
|
2933 |
+
<input id="<?php echo $prefix; ?>_google_fonts0" type="radio" name="<?php echo $prefix;?>_google_fonts" value="0" <?php echo (($new_layer['google_fonts']) ? '' : 'checked="checked"'); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
2934 |
+
<label for="<?php echo $prefix; ?>_google_fonts0"><?php _e('Default', WDS()->prefix); ?></label>
|
2935 |
+
<p class="description"></p>
|
2936 |
+
</span>
|
2937 |
+
<span class="wd-group">
|
2938 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_fweight"><?php _e('Font weight:', WDS()->prefix); ?></label>
|
2939 |
+
<select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_fweight" onchange="jQuery('#<?php echo $prefix; ?>').css({fontWeight: jQuery(this).val()})" name="<?php echo $prefix; ?>_fweight">
|
2940 |
+
<?php
|
2941 |
+
foreach ($font_weights as $key => $fweight) {
|
2942 |
+
?>
|
2943 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['fweight'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $fweight; ?></option>
|
2944 |
+
<?php
|
2945 |
+
}
|
2946 |
+
?>
|
2947 |
+
</select>
|
2948 |
+
<p class="description"></p>
|
2949 |
+
</span>
|
2950 |
+
<span class="wd-group">
|
2951 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_link" title=""><?php _e('Link:', WDS()->prefix); ?></label>
|
2952 |
+
<input class="wds_link" id="<?php echo $prefix; ?>_link" type="text" style="width: 200px;" value="<?php echo $new_layer['link']; ?>" name="<?php echo $prefix; ?>_link" />
|
2953 |
+
<input id="<?php echo $prefix; ?>_target_attr_layer" type="checkbox" name="<?php echo $prefix; ?>_target_attr_layer" <?php echo (($new_layer["target_attr_layer"]) ? 'checked="checked"' : ''); ?> value="1" /><label for="<?php echo $prefix; ?>_target_attr_layer"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
2954 |
+
<p class="description"><?php _e('Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
2955 |
+
</span>
|
2956 |
+
<span class="wd-group">
|
2957 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_callback_list"><?php _e('Add click action:', WDS()->prefix); ?></label>
|
2958 |
+
<select class="select_icon select_icon_320" style="width: 120px;" id="<?php echo $prefix; ?>_layer_callback_list" name="<?php echo $prefix; ?>_layer_callback_list" onchange="wds_show_slides_name('<?php echo $prefix; ?>', jQuery(this).val())">
|
2959 |
+
<?php
|
2960 |
+
foreach ($layer_callbacks as $key => $layer_callback_list) {
|
2961 |
+
?>
|
2962 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['layer_callback_list'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $layer_callback_list; ?></option>
|
2963 |
+
<?php
|
2964 |
+
}
|
2965 |
+
?>
|
2966 |
+
</select>
|
2967 |
+
<p class="description"></p>
|
2968 |
+
</span>
|
2969 |
+
<span class="wd-group">
|
2970 |
+
<label class="wd-label link_to_slide" for="<?php echo $prefix; ?>_link_to_slide" style="<?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>"><?php _e('Slides Name:', WDS()->prefix); ?></label>
|
2971 |
+
<select class="select_icon select_icon_320" style="width: 120px; <?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>" id="<?php echo $prefix; ?>_link_to_slide" name="<?php echo $prefix; ?>_link_to_slide">
|
2972 |
+
<?php
|
2973 |
+
foreach ($slides_name as $key => $slide_name) {
|
2974 |
+
?>
|
2975 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['link_to_slide'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $slide_name; ?></option>
|
2976 |
+
<?php
|
2977 |
+
}
|
2978 |
+
?>
|
2979 |
+
</select>
|
2980 |
+
<p class="description"></p>
|
2981 |
+
</span>
|
2982 |
+
</div>
|
2983 |
+
</div>
|
2984 |
+
</div>
|
2985 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
2986 |
+
<div class="wd-box-section">
|
2987 |
+
<div class="wd-box-content">
|
2988 |
+
<span class="wd-group">
|
2989 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
2990 |
+
<span style="display: inline-block;">
|
2991 |
+
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
2992 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
2993 |
+
</span>
|
2994 |
+
<span style="display: inline-block;">
|
2995 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
2996 |
+
<?php
|
2997 |
+
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
2998 |
+
?>
|
2999 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3000 |
+
<?php
|
3001 |
+
}
|
3002 |
+
?>
|
3003 |
+
</select>
|
3004 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3005 |
+
</span>
|
3006 |
+
<span style="display: inline-block;">
|
3007 |
+
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
3008 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3009 |
+
</span>
|
3010 |
+
<span style="display: inline-block;">
|
3011 |
+
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3012 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3013 |
+
</span>
|
3014 |
+
</span>
|
3015 |
+
<span class="wd-group">
|
3016 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3017 |
+
<span style="display: inline-block;">
|
3018 |
+
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3019 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3020 |
+
</span>
|
3021 |
+
<span style="display: inline-block;">
|
3022 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3023 |
+
<?php
|
3024 |
+
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3025 |
+
?>
|
3026 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3027 |
+
<?php
|
3028 |
+
}
|
3029 |
+
?>
|
3030 |
+
</select>
|
3031 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3032 |
+
</span>
|
3033 |
+
<span style="display: inline-block;">
|
3034 |
+
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out">ms
|
3035 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3036 |
+
</span>
|
3037 |
+
<span style="display: inline-block;">
|
3038 |
+
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3039 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3040 |
+
</span>
|
3041 |
+
</span>
|
3042 |
+
<span class="wd-group">
|
3043 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_padding" title=""><?php _e('Padding:', WDS()->prefix); ?></label>
|
3044 |
+
<input placeholder="5px 10px 10px" id="<?php echo $prefix; ?>_padding" class="spider_char_input" type="text" onchange="document.getElementById('<?php echo $prefix; ?>').style.padding=jQuery(this).val();" value="<?php echo $new_layer['padding']; ?>" name="<?php echo $prefix; ?>_padding">
|
3045 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3046 |
+
</span>
|
3047 |
+
<span class="wd-group">
|
3048 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_fbgcolor"><?php _e('Background Color:', WDS()->prefix); ?></label>
|
3049 |
+
<input id="<?php echo $prefix; ?>_fbgcolor" class="color" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" value="<?php echo $new_layer['fbgcolor']; ?>" name="<?php echo $prefix; ?>_fbgcolor" />
|
3050 |
+
<p class="description"></p>
|
3051 |
+
</span>
|
3052 |
+
<span class="wd-group">
|
3053 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_transparent" title=""><?php _e('Transparency:', WDS()->prefix); ?></label>
|
3054 |
+
<input id="<?php echo $prefix; ?>_transparent" class="spider_int_input" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['transparent']; ?>" name="<?php echo $prefix; ?>_transparent"> %
|
3055 |
+
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
3056 |
+
</span>
|
3057 |
+
<span class="wd-group">
|
3058 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3059 |
+
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3060 |
+
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
3061 |
+
<?php
|
3062 |
+
foreach ($border_styles as $key => $border_style) {
|
3063 |
+
?>
|
3064 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3065 |
+
<?php
|
3066 |
+
}
|
3067 |
+
?>
|
3068 |
+
</select>
|
3069 |
+
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color">
|
3070 |
+
</span>
|
3071 |
+
<span class="wd-group">
|
3072 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
3073 |
+
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3074 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3075 |
+
</span>
|
3076 |
+
<span class="wd-group">
|
3077 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3078 |
+
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3079 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3080 |
+
</span>
|
3081 |
+
<span class="wd-group">
|
3082 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_add_class" title=""><?php _e('Add class:', WDS()->prefix); ?></label>
|
3083 |
+
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3084 |
+
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3085 |
+
</span>
|
3086 |
+
<span class="wd-group">
|
3087 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_text_alignment"><?php _e('Text alignment:', WDS()->prefix); ?></label>
|
3088 |
+
<select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_text_alignment" onchange="jQuery('#<?php echo $prefix; ?>').css({textAlign: jQuery(this).val()})" name="<?php echo $prefix; ?>_text_alignment">
|
3089 |
+
<?php
|
3090 |
+
foreach ($text_alignments as $key => $text_alignment) {
|
3091 |
+
?>
|
3092 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['text_alignment'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $text_alignment; ?></option>
|
3093 |
+
<?php
|
3094 |
+
}
|
3095 |
+
?>
|
3096 |
+
</select>
|
3097 |
+
<p class="description"></p>
|
3098 |
+
</span>
|
3099 |
+
</div>
|
3100 |
+
</div>
|
3101 |
+
</div>
|
3102 |
+
</div>
|
3103 |
+
</td>
|
3104 |
+
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="text">
|
3105 |
+
</tr>
|
3106 |
+
<?php
|
3107 |
+
return ob_get_clean();
|
3108 |
+
}
|
3109 |
+
|
3110 |
+
/**
|
3111 |
+
* Video embed layer template
|
3112 |
+
*/
|
3113 |
+
function wds_videoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $id=false, $prefix=false, $layer=false ) {
|
3114 |
+
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
3115 |
+
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
3116 |
+
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
3117 |
+
if( $layer == "" ) {
|
3118 |
+
$new_layer = array(
|
3119 |
+
'tt' => true,
|
3120 |
+
'videoType' => 'video',
|
3121 |
+
'youtube_rel_layer_video' => '0',
|
3122 |
+
'text' => 'Sample Text',
|
3123 |
+
'static_layer' => '0',
|
3124 |
+
'id' => 'pr_1',
|
3125 |
+
'attr_width' => '300',
|
3126 |
+
'attr_height' => '300',
|
3127 |
+
'image_width' => '300',
|
3128 |
+
'image_height' => '300',
|
3129 |
+
'image_scale' => 'slide' . $id . '_layerpr_1_image_scale',
|
3130 |
+
'color' => 'FFFFFF',
|
3131 |
+
'left' => '0',
|
3132 |
+
'top' => '0',
|
3133 |
+
'link' => '',
|
3134 |
+
'target_attr_layer' => 0,
|
3135 |
+
'published' => 1,
|
3136 |
+
'start' => 1000,
|
3137 |
+
'layer_effect_in' => 'none',
|
3138 |
+
'duration_eff_in' => 1000,
|
3139 |
+
'infinite_in' => 1,
|
3140 |
+
'end' => 3000,
|
3141 |
+
'layer_effect_out' => 'none',
|
3142 |
+
'duration_eff_out' => 1000,
|
3143 |
+
'infinite_out' => 1,
|
3144 |
+
'border_width' => 2,
|
3145 |
+
'border_style' => $border_styles,
|
3146 |
+
'border_radius' => '2px',
|
3147 |
+
'border_color' => 'BBBBBB',
|
3148 |
+
'shadow' => '',
|
3149 |
+
'add_class' => '',
|
3150 |
+
'layer_video_loop' => '',
|
3151 |
+
'image_url' => '',
|
3152 |
+
'alt' => '',
|
3153 |
+
);
|
3154 |
+
}
|
3155 |
+
else {
|
3156 |
+
$new_layer = array(
|
3157 |
+
'videoType' => $layer->type,
|
3158 |
+
'youtube_rel_layer_video' => $layer->youtube_rel_layer_video,
|
3159 |
+
'text' => $layer->text,
|
3160 |
+
'static_layer' => $layer->static_layer,
|
3161 |
+
'id' => $id,
|
3162 |
+
'attr_width' => $layer->attr_width,
|
3163 |
+
'attr_height' => $layer->attr_height,
|
3164 |
+
'image_width' => $layer->image_width,
|
3165 |
+
'image_height' => $layer->image_height,
|
3166 |
+
'image_scale' => $layer->image_scale,
|
3167 |
+
'color' => $layer->color,
|
3168 |
+
'left' => $layer->left,
|
3169 |
+
'top' => $layer->top,
|
3170 |
+
'link' => $layer->link,
|
3171 |
+
'target_attr_layer' => $layer->target_attr_layer,
|
3172 |
+
'published' => $layer->published,
|
3173 |
+
'start' => $layer->start,
|
3174 |
+
'layer_effect_in' => $layer->layer_effect_in,
|
3175 |
+
'duration_eff_in' => $layer->duration_eff_in,
|
3176 |
+
'infinite_in' => $layer->infinite_in,
|
3177 |
+
'end' => $layer->end,
|
3178 |
+
'layer_effect_out' => $layer->layer_effect_out,
|
3179 |
+
'duration_eff_out' => $layer->duration_eff_out,
|
3180 |
+
'infinite_out' => $layer->infinite_out,
|
3181 |
+
'border_width' => $layer->border_width,
|
3182 |
+
'border_style' => $layer->border_style,
|
3183 |
+
'border_radius' => $layer->border_radius,
|
3184 |
+
'border_color' => $layer->border_color,
|
3185 |
+
'shadow' => $layer->shadow,
|
3186 |
+
'add_class' => $layer->add_class,
|
3187 |
+
'layer_video_loop' => $layer->layer_video_loop,
|
3188 |
+
'image_url' => $layer->image_url,
|
3189 |
+
'alt' => $layer->alt,
|
3190 |
+
);
|
3191 |
+
}
|
3192 |
+
ob_start();
|
3193 |
+
?>
|
3194 |
+
<tr style="display:none" class="wds_layer_tr wds_videoLayer wds_layer_content">
|
3195 |
+
<td colspan="3">
|
3196 |
+
<div class="wd-table">
|
3197 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
3198 |
+
<div class="wd-box-section">
|
3199 |
+
<div class="wd-box-content">
|
3200 |
+
<span class="wd-group">
|
3201 |
+
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
3202 |
+
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
3203 |
+
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3204 |
+
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
3205 |
+
<label <?php echo ((!$new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
3206 |
+
<p class="description"></p>
|
3207 |
+
</span>
|
3208 |
+
<span class="wd-group">
|
3209 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
3210 |
+
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
3211 |
+
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
3212 |
+
</span>
|
3213 |
+
<span class="wd-group">
|
3214 |
+
<label class="wd-label" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
3215 |
+
<input type="hidden" id="<?php echo $prefix; ?>_attr_width" name="<?php echo $prefix; ?>_attr_width" value="<?php echo $new_layer['attr_width']; ?>"/>
|
3216 |
+
<input type="hidden" id="<?php echo $prefix; ?>_attr_height" name="<?php echo $prefix; ?>_attr_height" value="<?php echo $new_layer['attr_height']; ?>"/>
|
3217 |
+
<input type="hidden" id="<?php echo $prefix; ?>_layer_post_id" name="<?php echo $prefix; ?>_layer_post_id" value="<?php echo $new_layer['image_url']; ?>" />
|
3218 |
+
<input type="hidden" name="<?php echo $prefix; ?>_alt" id="<?php echo $prefix; ?>_alt" value="<?php echo $new_layer['alt']; ?>"/>
|
3219 |
+
<input type="hidden" name="<?php echo $prefix; ?>_link" id="<?php echo $prefix; ?>_link" value="<?php echo $new_layer['link']; ?>"/>
|
3220 |
+
<input type="hidden" name="<?php echo $prefix; ?>_image_url" id="<?php echo $prefix; ?>_image_url" value="<?php echo $new_layer['image_url']; ?>" />
|
3221 |
+
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
3222 |
+
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
3223 |
+
<p class="description"><?php _e('Set width and height of the video.', WDS()->prefix); ?></p>
|
3224 |
+
</span>
|
3225 |
+
<span class="wd-group">
|
3226 |
+
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
3227 |
+
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
3228 |
+
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
3229 |
+
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
3230 |
+
</span>
|
3231 |
+
<span class="wd-group">
|
3232 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3233 |
+
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3234 |
+
<select class="select_icon" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
3235 |
+
<?php
|
3236 |
+
foreach ($border_styles as $key => $border_style) {
|
3237 |
+
?>
|
3238 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3239 |
+
<?php
|
3240 |
+
}
|
3241 |
+
?>
|
3242 |
+
</select>
|
3243 |
+
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
3244 |
+
<p class="description"></p>
|
3245 |
+
</span>
|
3246 |
+
<span class="wd-group <?php echo $prefix; ?>_autoplay_td" <?php echo ($new_layer['target_attr_layer'] == "0" && $new_layer['videoType'] == 'upvideo') ? 'style="visibility:hidden"' : ''; ?>>
|
3247 |
+
<label class="wd-label"><?php _e('Autoplay:', WDS()->prefix); ?></label>
|
3248 |
+
<input id="<?php echo $prefix; ?>_image_scale1" type="radio" name="<?php echo $prefix; ?>_image_scale" value="on" <?php echo (($new_layer['image_scale'] == "on") ? 'checked="checked"' : ''); ?> />
|
3249 |
+
<label <?php echo (($new_layer['image_scale'] == "on") ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_image_scale1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3250 |
+
<input id="<?php echo $prefix; ?>_image_scale0" type="radio" name="<?php echo $prefix; ?>_image_scale" value="off" <?php echo (($new_layer['image_scale'] == "on") ? '' : 'checked="checked"'); ?> />
|
3251 |
+
<label <?php echo (($new_layer['image_scale'] == "on") ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_image_scale0"><?php _e('No', WDS()->prefix); ?></label>
|
3252 |
+
<p class="description"></p>
|
3253 |
+
</span>
|
3254 |
+
<span class="wd-group" <?php echo ($new_layer['alt'] != 'EMBED_OEMBED_YOUTUBE_VIDEO') ? 'style="visibility:hidden"' : ''; ?>>
|
3255 |
+
<label class="wd-label"><?php _e('Disable youtube related video:', WDS()->prefix); ?></label>
|
3256 |
+
<input id="<?php echo $prefix; ?>_youtube_rel_layer_video1" type="radio" name="<?php echo $prefix; ?>_youtube_rel_layer_video" value="0" <?php echo ((!$new_layer['youtube_rel_layer_video']) ? 'checked="checked"' : ''); ?> />
|
3257 |
+
<label <?php echo ((!$new_layer['youtube_rel_layer_video']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_youtube_rel_layer_video1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3258 |
+
<input id="<?php echo $prefix; ?>_youtube_rel_layer_video0" type="radio" name="<?php echo $prefix; ?>_youtube_rel_layer_video" value="1" <?php echo ((!$new_layer['youtube_rel_layer_video']) ? '' : 'checked="checked"'); ?> />
|
3259 |
+
<label <?php echo (($new_layer['youtube_rel_layer_video']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_youtube_rel_layer_video0"><?php _e('No', WDS()->prefix); ?></label>
|
3260 |
+
<p class="description"></p>
|
3261 |
+
</span>
|
3262 |
+
</div>
|
3263 |
+
</div>
|
3264 |
+
</div>
|
3265 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
3266 |
+
<div class="wd-box-section">
|
3267 |
+
<div class="wd-box-content">
|
3268 |
+
<span class="wd-group">
|
3269 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
3270 |
+
<span style="display: inline-block;">
|
3271 |
+
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
3272 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3273 |
+
</span>
|
3274 |
+
<span style="display: inline-block;">
|
3275 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3276 |
+
<?php
|
3277 |
+
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
3278 |
+
?>
|
3279 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3280 |
+
<?php
|
3281 |
+
}
|
3282 |
+
?>
|
3283 |
+
</select>
|
3284 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3285 |
+
</span>
|
3286 |
+
<span style="display: inline-block;">
|
3287 |
+
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
3288 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3289 |
+
</span>
|
3290 |
+
<span style="display: inline-block;">
|
3291 |
+
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3292 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3293 |
+
</span>
|
3294 |
+
</span>
|
3295 |
+
<span class="wd-group">
|
3296 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3297 |
+
<span style="display: inline-block;">
|
3298 |
+
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3299 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3300 |
+
</span>
|
3301 |
+
<span style="display: inline-block;">
|
3302 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3303 |
+
<?php
|
3304 |
+
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3305 |
+
?>
|
3306 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3307 |
+
<?php
|
3308 |
+
}
|
3309 |
+
?>
|
3310 |
+
</select>
|
3311 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3312 |
+
</span>
|
3313 |
+
<span style="display: inline-block;">
|
3314 |
+
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
3315 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3316 |
+
</span>
|
3317 |
+
<span style="display: inline-block;">
|
3318 |
+
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3319 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3320 |
+
</span>
|
3321 |
+
</span>
|
3322 |
+
<span class="wd-group">
|
3323 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
3324 |
+
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3325 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3326 |
+
</span>
|
3327 |
+
<span class="wd-group">
|
3328 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3329 |
+
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3330 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3331 |
+
</span>
|
3332 |
+
<span class="wd-group">
|
3333 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_add_class"><?php _e('Add class:', WDS()->prefix); ?></label>
|
3334 |
+
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3335 |
+
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3336 |
+
</span>
|
3337 |
+
</div>
|
3338 |
+
</div>
|
3339 |
+
</div>
|
3340 |
+
</div>
|
3341 |
+
</td>
|
3342 |
+
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="<?php echo $new_layer['videoType']?>">
|
3343 |
+
</tr>
|
3344 |
+
<?php
|
3345 |
+
return ob_get_clean();
|
3346 |
+
}
|
3347 |
+
|
3348 |
+
/**
|
3349 |
+
* Video upload layer template
|
3350 |
+
*/
|
3351 |
+
function wds_upvideoLayerTemplate( $layer_effects_in, $layer_effects_out, $border_styles, $id=false, $prefix=false, $layer=false ) {
|
3352 |
+
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
3353 |
+
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
3354 |
+
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
3355 |
+
if( $layer == "" ) {
|
3356 |
+
$new_layer = array(
|
3357 |
+
'videoType' => 'upvideo',
|
3358 |
+
'youtube_rel_layer_video' => '1',
|
3359 |
+
'text' => 'Sample Text',
|
3360 |
+
'static_layer' => '0',
|
3361 |
+
'id' => 'pr_1',
|
3362 |
+
'attr_width' => '300',
|
3363 |
+
'attr_height' => '300',
|
3364 |
+
'image_width' => '300',
|
3365 |
+
'image_height' => '300',
|
3366 |
+
'image_scale' => 'on',
|
3367 |
+
'color' => 'FFFFFF',
|
3368 |
+
'left' => '0',
|
3369 |
+
'top' => '0',
|
3370 |
+
'link' => '',
|
3371 |
+
'target_attr_layer' => 0,
|
3372 |
+
'published' => 1,
|
3373 |
+
'start' => 1000,
|
3374 |
+
'layer_effect_in' => 'none',
|
3375 |
+
'duration_eff_in' => 1000,
|
3376 |
+
'infinite_in' => 1,
|
3377 |
+
'end' => 3000,
|
3378 |
+
'layer_effect_out' => 'none',
|
3379 |
+
'duration_eff_out' => 1000,
|
3380 |
+
'infinite_out' => 1,
|
3381 |
+
'border_color' => 'FFFFFF',
|
3382 |
+
'border_width' => 2,
|
3383 |
+
'border_style' => $border_styles,
|
3384 |
+
'border_radius' => '2px',
|
3385 |
+
'shadow' => '',
|
3386 |
+
'add_class' => '',
|
3387 |
+
'layer_video_loop' => '',
|
3388 |
+
'image_url' => '',
|
3389 |
+
'alt' => '',
|
3390 |
+
);
|
3391 |
+
}
|
3392 |
+
else {
|
3393 |
+
$new_layer = array(
|
3394 |
+
'videoType' => $layer->type,
|
3395 |
+
'youtube_rel_layer_video' => $layer->youtube_rel_layer_video,
|
3396 |
+
'text' => $layer->text,
|
3397 |
+
'static_layer' => $layer->static_layer,
|
3398 |
+
'id' => $id,
|
3399 |
+
'attr_width' => $layer->attr_width,
|
3400 |
+
'attr_height' => $layer->attr_height,
|
3401 |
+
'image_width' => $layer->image_width,
|
3402 |
+
'image_height' => $layer->image_height,
|
3403 |
+
'image_scale' => $layer->image_scale,
|
3404 |
+
'color' => $layer->color,
|
3405 |
+
'left' => $layer->left,
|
3406 |
+
'top' => $layer->top,
|
3407 |
+
'link' => $layer->link,
|
3408 |
+
'target_attr_layer' => $layer->target_attr_layer,
|
3409 |
+
'published' => $layer->published,
|
3410 |
+
'start' => $layer->start,
|
3411 |
+
'layer_effect_in' => $layer->layer_effect_in,
|
3412 |
+
'duration_eff_in' => $layer->duration_eff_in,
|
3413 |
+
'infinite_in' => $layer->infinite_in,
|
3414 |
+
'end' => $layer->end,
|
3415 |
+
'layer_effect_out' => $layer->layer_effect_out,
|
3416 |
+
'duration_eff_out' => $layer->duration_eff_out,
|
3417 |
+
'infinite_out' => $layer->infinite_out,
|
3418 |
+
'border_color' => $layer->border_color,
|
3419 |
+
'border_width' => $layer->border_width,
|
3420 |
+
'border_style' => $layer->border_style,
|
3421 |
+
'border_radius' => $layer->border_radius,
|
3422 |
+
'shadow' => $layer->shadow,
|
3423 |
+
'add_class' => $layer->add_class,
|
3424 |
+
'layer_video_loop' => $layer->layer_video_loop,
|
3425 |
+
'image_url' => $layer->image_url,
|
3426 |
+
'alt' => $layer->alt,
|
3427 |
+
|
3428 |
+
);
|
3429 |
+
}
|
3430 |
+
ob_start();
|
3431 |
+
?>
|
3432 |
+
<tr style="display:none" class="wds_layer_tr wds_upvideoLayer wds_layer_content">
|
3433 |
+
<td colspan="3">
|
3434 |
+
<div class="wd-table">
|
3435 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
3436 |
+
<div class="wd-box-section">
|
3437 |
+
<div class="wd-box-content">
|
3438 |
+
<span class="wd-group">
|
3439 |
+
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
3440 |
+
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
3441 |
+
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3442 |
+
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
3443 |
+
<label <?php echo ((!$new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
3444 |
+
<p class="description"></p>
|
3445 |
+
</span>
|
3446 |
+
<span class="wd-group">
|
3447 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
3448 |
+
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
3449 |
+
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
3450 |
+
</span>
|
3451 |
+
<span class="wd-group">
|
3452 |
+
<label class="wd-label" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
3453 |
+
<input type="hidden" id="<?php echo $prefix; ?>_attr_width" name="<?php echo $prefix; ?>_attr_width" value="<?php echo $new_layer['attr_width']; ?>"/>
|
3454 |
+
<input type="hidden" id="<?php echo $prefix; ?>_attr_height" name="<?php echo $prefix; ?>_attr_height" value="<?php echo $new_layer['attr_height']; ?>"/>
|
3455 |
+
<input type="hidden" id="<?php echo $prefix; ?>_layer_post_id" name="<?php echo $prefix; ?>_layer_post_id" value="<?php echo $new_layer['image_url']; ?>" />
|
3456 |
+
<input type="hidden" name="<?php echo $prefix; ?>_alt" id="<?php echo $prefix; ?>_alt" value="<?php echo $new_layer['alt']; ?>"/>
|
3457 |
+
<input type="hidden" name="<?php echo $prefix; ?>_link" id="<?php echo $prefix; ?>_link" value="<?php echo $new_layer['link']; ?>"/>
|
3458 |
+
<input type="hidden" name="<?php echo $prefix; ?>_image_url" id="<?php echo $prefix; ?>_image_url" value="<?php echo $new_layer['image_url']; ?>" />
|
3459 |
+
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
3460 |
+
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onkeyup="wds_scale('#<?php echo $prefix; ?>_image_scale', '<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
3461 |
+
<p class="description"><?php _e('Set width and height of the video.', WDS()->prefix); ?></p>
|
3462 |
+
</span>
|
3463 |
+
<span class="wd-group">
|
3464 |
+
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
3465 |
+
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
3466 |
+
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
3467 |
+
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
3468 |
+
</span>
|
3469 |
+
<span class="wd-group">
|
3470 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3471 |
+
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3472 |
+
<select class="select_icon" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px !important;" name="<?php echo $prefix; ?>_border_style">
|
3473 |
+
<?php
|
3474 |
+
foreach ($border_styles as $key => $border_style) {
|
3475 |
+
?>
|
3476 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3477 |
+
<?php
|
3478 |
+
}
|
3479 |
+
?>
|
3480 |
+
</select>
|
3481 |
+
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
3482 |
+
<p class="description"></p>
|
3483 |
+
</span>
|
3484 |
+
<span class="wd-group">
|
3485 |
+
<label class="wd-label"><?php _e('Video Loop:', WDS()->prefix); ?></label>
|
3486 |
+
<input id="<?php echo $prefix; ?>_layer_video_loop1" type="radio" name="<?php echo $prefix; ?>_layer_video_loop" value="1" <?php echo (($new_layer['layer_video_loop']) ? 'checked="checked"' : ''); ?> />
|
3487 |
+
<label <?php echo (($new_layer['layer_video_loop']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_layer_video_loop1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3488 |
+
<input id="<?php echo $prefix; ?>_layer_video_loop0" type="radio" name="<?php echo $prefix; ?>_layer_video_loop" value="0" <?php echo (($new_layer['layer_video_loop']) ? '' : 'checked="checked"'); ?> />
|
3489 |
+
<label <?php echo ((!$new_layer['layer_video_loop']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_layer_video_loop0"><?php _e('No', WDS()->prefix); ?></label>
|
3490 |
+
<p class="description"></p>
|
3491 |
+
</span>
|
3492 |
+
<span class="wd-group">
|
3493 |
+
<label class="wd-label"><?php _e('Controls:', WDS()->prefix); ?></label>
|
3494 |
+
<input id="<?php echo $prefix; ?>_target_attr_layer1" type="radio" onClick="wds_enable_disable_autoplay('visible', '<?php echo $prefix; ?>_autoplay_td', '<?php echo $prefix; ?>_target_attr_layer1')" name="<?php echo $prefix; ?>_controls" value="1" <?php echo (($new_layer['target_attr_layer'] == "1") ? 'checked="checked"' : ''); ?> />
|
3495 |
+
<label <?php echo (($new_layer['target_attr_layer'] == "1") ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_target_attr_layer1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3496 |
+
<input id="<?php echo $prefix; ?>_target_attr_layer0" type="radio" onClick="wds_enable_disable_autoplay('hidden', '<?php echo $prefix; ?>_autoplay_td', '<?php echo $prefix; ?>_target_attr_layer0')" name="<?php echo $prefix; ?>_controls" value="0" <?php echo (($new_layer['target_attr_layer'] == "1") ? '' : 'checked="checked"'); ?> />
|
3497 |
+
<label <?php echo (($new_layer['target_attr_layer'] == "1") ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_target_attr_layer0"><?php _e('No', WDS()->prefix); ?></label>
|
3498 |
+
<p class="description"></p>
|
3499 |
+
</span>
|
3500 |
+
<span class="wd-group <?php echo $prefix; ?>_autoplay_td" <?php echo ($new_layer['target_attr_layer'] == "0" && $new_layer['videoType'] == 'upvideo') ? 'style="visibility:hidden"' : ''; ?>>
|
3501 |
+
<label class="wd-label"><?php _e('Autoplay:', WDS()->prefix); ?></label>
|
3502 |
+
<input id="<?php echo $prefix; ?>_image_scale1" type="radio" name="<?php echo $prefix; ?>_image_scale" value="on" <?php echo (($new_layer['image_scale'] == "on") ? 'checked="checked"' : ''); ?> />
|
3503 |
+
<label <?php echo (($new_layer['image_scale'] == "on") ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_image_scale1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3504 |
+
<input id="<?php echo $prefix; ?>_image_scale0" type="radio" name="<?php echo $prefix; ?>_image_scale" value="off" <?php echo (($new_layer['image_scale'] == "on") ? '' : 'checked="checked"'); ?> />
|
3505 |
+
<label <?php echo (($new_layer['image_scale'] == "on") ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_image_scale0"><?php _e('No', WDS()->prefix); ?></label>
|
3506 |
+
<p class="description"></p>
|
3507 |
+
</span>
|
3508 |
+
</div>
|
3509 |
+
</div>
|
3510 |
+
</div>
|
3511 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
3512 |
+
<div class="wd-box-section">
|
3513 |
+
<div class="wd-box-content">
|
3514 |
+
<span class="wd-group">
|
3515 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
3516 |
+
<span style="display: inline-block;">
|
3517 |
+
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
3518 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3519 |
+
</span>
|
3520 |
+
<span style="display: inline-block;">
|
3521 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3522 |
+
<?php
|
3523 |
+
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
3524 |
+
?>
|
3525 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3526 |
+
<?php
|
3527 |
+
}
|
3528 |
+
?>
|
3529 |
+
</select>
|
3530 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3531 |
+
</span>
|
3532 |
+
<span style="display: inline-block;">
|
3533 |
+
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
3534 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3535 |
+
</span>
|
3536 |
+
<span style="display: inline-block;">
|
3537 |
+
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3538 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3539 |
+
</span>
|
3540 |
+
</span>
|
3541 |
+
<span class="wd-group">
|
3542 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3543 |
+
<span style="display: inline-block;">
|
3544 |
+
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3545 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3546 |
+
</span>
|
3547 |
+
<span style="display: inline-block;">
|
3548 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3549 |
+
<?php
|
3550 |
+
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3551 |
+
?>
|
3552 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3553 |
+
<?php
|
3554 |
+
}
|
3555 |
+
?>
|
3556 |
+
</select>
|
3557 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3558 |
+
</span>
|
3559 |
+
<span style="display: inline-block;">
|
3560 |
+
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
3561 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3562 |
+
</span>
|
3563 |
+
<span style="display: inline-block;">
|
3564 |
+
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3565 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3566 |
+
</span>
|
3567 |
+
</span>
|
3568 |
+
<span class="wd-group">
|
3569 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius" title=""><?php _e('Radius:', WDS()->prefix); ?></label>
|
3570 |
+
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3571 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3572 |
+
</span>
|
3573 |
+
<span class="wd-group">
|
3574 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3575 |
+
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3576 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3577 |
+
</span>
|
3578 |
+
<span class="wd-group">
|
3579 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_add_class" title=""><?php _e('Add class:', WDS()->prefix); ?></label>
|
3580 |
+
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3581 |
+
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3582 |
+
</span>
|
3583 |
+
</div>
|
3584 |
+
</div>
|
3585 |
+
</div>
|
3586 |
+
</div>
|
3587 |
+
</td>
|
3588 |
+
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="<?php echo $new_layer['videoType']?>">
|
3589 |
+
</tr>
|
3590 |
+
<?php
|
3591 |
+
return ob_get_clean();
|
3592 |
+
}
|
3593 |
+
|
3594 |
+
/**
|
3595 |
+
* Hotspot layer template
|
3596 |
+
*/
|
3597 |
+
function wds_hotspotLayerTemplate( $font_weights, $layer_callbacks, $slides_name, $layer_effects_in, $layer_effects_out, $border_styles, $text_alignments, $google_fonts, $font_families, $hotp_text_positions, $id=false, $prefix=false, $layer=false ) {
|
3598 |
+
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
3599 |
+
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
3600 |
+
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
3601 |
+
if( $layer == "" ) {
|
3602 |
+
$new_layer = array(
|
3603 |
+
'text' => 'Sample Text',
|
3604 |
+
'static_layer' => '0',
|
3605 |
+
'image_width' => '',
|
3606 |
+
'image_height' => '',
|
3607 |
+
'image_scale' => 'slide' . $id . '_layerpr_1_image_scale',
|
3608 |
+
'size' => '18',
|
3609 |
+
'min_size' => '11',
|
3610 |
+
'left' => 20,
|
3611 |
+
'top' => 20,
|
3612 |
+
'google_fonts' => $google_fonts,
|
3613 |
+
'ffamily' => $font_families,
|
3614 |
+
'fweight' => '1',
|
3615 |
+
'link' => '',
|
3616 |
+
'target_attr_layer' => 1,
|
3617 |
+
'layer_callback_list' => $layer_callbacks,
|
3618 |
+
'published' => 1,
|
3619 |
+
'start' => 1000,
|
3620 |
+
'layer_effect_in' => 'none',
|
3621 |
+
'duration_eff_in' => 1000,
|
3622 |
+
'infinite_in' => 1,
|
3623 |
+
'end' => 3000,
|
3624 |
+
'layer_effect_out' => 'none',
|
3625 |
+
'duration_eff_out' => 1000,
|
3626 |
+
'infinite_out' => 1,
|
3627 |
+
'padding' => '5px',
|
3628 |
+
'fbgcolor' => '000000',
|
3629 |
+
'color' => 'FFFFFF',
|
3630 |
+
'transparent' => 50,
|
3631 |
+
'border_width' => 2,
|
3632 |
+
'border_style' => $border_styles,
|
3633 |
+
'border_color' => 'BBBBBB',
|
3634 |
+
'hotp_border_radius' => '25px',
|
3635 |
+
'border_radius' => '2px',
|
3636 |
+
'shadow' => '',
|
3637 |
+
'add_class' => '',
|
3638 |
+
'text_alignment' => $text_alignments,
|
3639 |
+
'hotspot_text_display' => 'hover',
|
3640 |
+
'hotspot_animation' => '1',
|
3641 |
+
'hotp_width' => 20,
|
3642 |
+
'hotp_text_position' => 'right',
|
3643 |
+
'hotp_border_width' => 2,
|
3644 |
+
'hotp_border_style' => $border_styles,
|
3645 |
+
'hotp_border_color' => 'BBBBBB',
|
3646 |
+
'hotp_fbgcolor' => 'FFFFFF',
|
3647 |
+
'link_to_slide' => '',
|
3648 |
+
);
|
3649 |
+
} else {
|
3650 |
+
$new_layer = array(
|
3651 |
+
'text' => $layer->text,
|
3652 |
+
'static_layer' => $layer->static_layer,
|
3653 |
+
'image_width' => $layer->image_width,
|
3654 |
+
'image_height' => $layer->image_height,
|
3655 |
+
'image_scale' => $layer->image_scale,
|
3656 |
+
'size' => $layer->size,
|
3657 |
+
'min_size' => $layer->min_size,
|
3658 |
+
'left' => $layer->left,
|
3659 |
+
'top' => $layer->top,
|
3660 |
+
'google_fonts' => $layer->google_fonts,
|
3661 |
+
'ffamily' => $layer->ffamily,
|
3662 |
+
'fweight' => $layer->fweight,
|
3663 |
+
'link' => $layer->link,
|
3664 |
+
'target_attr_layer' => $layer->target_attr_layer,
|
3665 |
+
'layer_callback_list' => $layer->layer_callback_list,
|
3666 |
+
'published' => $layer->published,
|
3667 |
+
'start' => $layer->start,
|
3668 |
+
'layer_effect_in' => $layer->layer_effect_in,
|
3669 |
+
'duration_eff_in' => $layer->duration_eff_in,
|
3670 |
+
'infinite_in' => $layer->infinite_in,
|
3671 |
+
'end' => $layer->end,
|
3672 |
+
'layer_effect_out' => $layer->layer_effect_out,
|
3673 |
+
'duration_eff_out' => $layer->duration_eff_out,
|
3674 |
+
'infinite_out' => $layer->infinite_out,
|
3675 |
+
'padding' => $layer->padding,
|
3676 |
+
'fbgcolor' => $layer->fbgcolor,
|
3677 |
+
'color' => $layer->color,
|
3678 |
+
'transparent' => $layer->transparent,
|
3679 |
+
'border_width' => $layer->border_width,
|
3680 |
+
'border_style' => $layer->border_style,
|
3681 |
+
'border_color' => $layer->border_color,
|
3682 |
+
'hotp_border_radius' => $layer->hotp_border_radius,
|
3683 |
+
'border_radius' => $layer->border_radius,
|
3684 |
+
'shadow' => $layer->shadow,
|
3685 |
+
'add_class' => $layer->add_class,
|
3686 |
+
'text_alignment' => $layer->text_alignment,
|
3687 |
+
'hotspot_text_display' => $layer->hotspot_text_display,
|
3688 |
+
'hotspot_animation' => $layer->hotspot_animation,
|
3689 |
+
'hotp_width' => $layer->hotp_width,
|
3690 |
+
'hotp_text_position' => $layer->hotp_text_position,
|
3691 |
+
'hotp_border_width' => $layer->hotp_border_width,
|
3692 |
+
'hotp_border_style' => $layer->hotp_border_style,
|
3693 |
+
'hotp_border_color' => $layer->hotp_border_color,
|
3694 |
+
'hotp_fbgcolor' => $layer->hotp_fbgcolor,
|
3695 |
+
'link_to_slide' => $layer->link_to_slide,
|
3696 |
+
);
|
3697 |
+
}
|
3698 |
+
ob_start();
|
3699 |
+
?>
|
3700 |
+
<tr class="wds_layer_tr wds_hotspotLayer wds_layer_content" style="display: none;">
|
3701 |
+
<td colspan=3>
|
3702 |
+
<div class="wd-table">
|
3703 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
3704 |
+
<div class="wd-box-section">
|
3705 |
+
<div class="wd-box-content">
|
3706 |
+
<span class="wd-group">
|
3707 |
+
<label class="wd-label"><?php _e('Published:', WDS()->prefix); ?></label>
|
3708 |
+
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
3709 |
+
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3710 |
+
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?> />
|
3711 |
+
<label <?php echo (($new_layer['published']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix); ?></label>
|
3712 |
+
<p class="description"></p>
|
3713 |
+
</span>
|
3714 |
+
<span class="wd-group">
|
3715 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_text"><?php _e('Text:', WDS()->prefix); ?></label>
|
3716 |
+
<textarea id="<?php echo $prefix; ?>_text" class="wds_textarea" name="<?php echo $prefix; ?>_text" onkeyup="wds_new_line('<?php echo $prefix; ?>');"><?php echo $new_layer['text']; ?></textarea>
|
3717 |
+
<p class="description"></p>
|
3718 |
+
</span>
|
3719 |
+
<span class="wd-group">
|
3720 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix); ?></label>
|
3721 |
+
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
3722 |
+
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix); ?></p>
|
3723 |
+
</span>
|
3724 |
+
<span class="wd-group">
|
3725 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_image_width" title=""><?php _e('Dimensions:', WDS()->prefix); ?></label>
|
3726 |
+
<input id="<?php echo $prefix; ?>_image_width" class="spider_int_input" type="text" onchange="wds_hotspot_text_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_width']; ?>" name="<?php echo $prefix; ?>_image_width" /> x
|
3727 |
+
<input id="<?php echo $prefix; ?>_image_height" class="spider_int_input" type="text" onchange="wds_hotspot_text_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['image_height']; ?>" name="<?php echo $prefix; ?>_image_height" /> px
|
3728 |
+
<input id="<?php echo $prefix; ?>_image_scale" type="checkbox" onchange="wds_break_word(this, '<?php echo $prefix; ?>')" name="<?php echo $prefix; ?>_image_scale" <?php echo (($new_layer['image_scale']) ? 'checked="checked"' : ''); ?> /><label for="<?php echo $prefix; ?>_image_scale"><?php _e('Break-word', WDS()->prefix); ?></label>
|
3729 |
+
<p class="description"><?php _e('Leave blank to keep the initial width and height. ', WDS()->prefix); ?><?php _e('Break-word may break lines from between any two letters, if their width is larger than dimensions.', WDS()->prefix); ?></p>
|
3730 |
+
</span>
|
3731 |
+
<span class="wd-group">
|
3732 |
+
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix); ?></label>
|
3733 |
+
X <input id="<?php echo $prefix; ?>_div_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>_div').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
3734 |
+
Y <input id="<?php echo $prefix; ?>_div_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>_div').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
3735 |
+
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix); ?></p>
|
3736 |
+
</span>
|
3737 |
+
<span class="wd-group">
|
3738 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_link" title=""><?php _e('Link:', WDS()->prefix); ?></label>
|
3739 |
+
<input id="<?php echo $prefix; ?>_link" type="text" size="39" class="wds_link" value="<?php echo $new_layer['link']; ?>" name="<?php echo $prefix; ?>_link" />
|
3740 |
+
<input id="<?php echo $prefix; ?>_target_attr_layer" type="checkbox" name="<?php echo $prefix; ?>_target_attr_layer" <?php echo (($new_layer['target_attr_layer']) ? 'checked="checked"' : ''); ?> value="1" /><label for="<?php echo $prefix; ?>_target_attr_layer"><?php _e('Open in a new window', WDS()->prefix); ?></label>
|
3741 |
+
<p class="description"><?php _e('Use http:// and https:// for external links.', WDS()->prefix); ?></p>
|
3742 |
+
</span>
|
3743 |
+
<span class="wd-group">
|
3744 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_htextposition"><?php _e('Hotspot text position:', WDS()->prefix); ?></label>
|
3745 |
+
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_htextposition" name="<?php echo $prefix; ?>_htextposition" onchange="jQuery('#<?php echo $prefix; ?>_div').attr('data-text-position', jQuery(this).val()); wds_hotspot_position('<?php echo $prefix; ?>')">
|
3746 |
+
<?php
|
3747 |
+
foreach ($hotp_text_positions as $key => $hotp_text_position) {
|
3748 |
+
?>
|
3749 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['hotp_text_position'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $hotp_text_position; ?></option>
|
3750 |
+
<?php
|
3751 |
+
}
|
3752 |
+
?>
|
3753 |
+
</select>
|
3754 |
+
<p class="description"></p>
|
3755 |
+
</span>
|
3756 |
+
<span class="wd-group">
|
3757 |
+
<label class="wd-label" title=""><?php _e('Show Hotspot text:', WDS()->prefix); ?></label>
|
3758 |
+
<input type="radio" name="<?php echo $prefix; ?>_hotspot_text_display" id="<?php echo $prefix; ?>_hotspot_text_display_1" value="hover" <?php if ($new_layer['hotspot_text_display'] == 'hover') echo 'checked="checked"'; ?> /><label <?php echo $new_layer['hotspot_text_display'] == 'hover' ? 'class="selected_color"' : ''; ?> for="<?php echo $prefix; ?>_hotspot_text_display_1"><?php _e('On hover', WDS()->prefix); ?></label>
|
3759 |
+
<input type="radio" name="<?php echo $prefix; ?>_hotspot_text_display" id="<?php echo $prefix; ?>_hotspot_text_display_0" value="click" <?php if ($new_layer['hotspot_text_display'] == 'click' ) echo 'checked="checked"'; ?> /><label <?php echo $new_layer['hotspot_text_display'] == 'click' ? 'class="selected_color"' : ''; ?> for="<?php echo $prefix; ?>_hotspot_text_display_0"><?php _e('On click', WDS()->prefix); ?></label>
|
3760 |
+
<p class="description"><?php _e('Select between the option of always displaying the navigation buttons or only when hovered.', WDS()->prefix); ?></p>
|
3761 |
+
</span>
|
3762 |
+
<span class="wd-group">
|
3763 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_link"><?php _e('Hotspot Width:', WDS()->prefix); ?></label>
|
3764 |
+
<input id="<?php echo $prefix; ?>_hotp_width" class="spider_int_input" type="text" onchange="wds_hotspot_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['hotp_width']; ?>" name="<?php echo $prefix; ?>_hotp_width" /> px
|
3765 |
+
</span>
|
3766 |
+
<span class="wd-group">
|
3767 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_hotp_fbgcolor"><?php _e('Hotspot Background Color:', WDS()->prefix); ?></label>
|
3768 |
+
<input id="<?php echo $prefix; ?>_hotp_fbgcolor" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>_round').css({backgroundColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['hotp_fbgcolor']; ?>" name="<?php echo $prefix; ?>_hotp_fbgcolor" />
|
3769 |
+
<p class="description"></p>
|
3770 |
+
</span>
|
3771 |
+
<span class="wd-group">
|
3772 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_hotp_border_width"><?php _e('Hotspot Border:', WDS()->prefix); ?></label>
|
3773 |
+
<input id="<?php echo $prefix; ?>_round_hotp_border_width" class="spider_int_input" type="text" onchange="wds_hotpborder_width('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['hotp_border_width']; ?>" name="<?php echo $prefix; ?>_hotp_border_width"> px
|
3774 |
+
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_round_hotp_border_style" onchange="wds_hotpborder_width('<?php echo $prefix; ?>')" style="width: 80px;" name="<?php echo $prefix; ?>_hotp_border_style">
|
3775 |
+
<?php
|
3776 |
+
foreach ($border_styles as $key => $hotp_border_style) {
|
3777 |
+
?>
|
3778 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['hotp_border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $hotp_border_style; ?></option>
|
3779 |
+
<?php
|
3780 |
+
}
|
3781 |
+
?>
|
3782 |
+
</select>
|
3783 |
+
<input id="<?php echo $prefix; ?>_hotp_border_color" class="color" type="text" onchange="wds_hotpborder_width('<?php echo $prefix; ?>')" value="<?php echo $new_layer['hotp_border_color']; ?>" name="<?php echo $prefix; ?>_hotp_border_color" />
|
3784 |
+
<p class="description"></p>
|
3785 |
+
</span>
|
3786 |
+
<span class="wd-group">
|
3787 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_hotp_border_radius" title=""><?php _e('Hotspot Radius:', WDS()->prefix); ?></label>
|
3788 |
+
<input placeholder="4px" id="<?php echo $prefix; ?>_hotp_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>_round').css({borderRadius: jQuery(this).val()});jQuery('#<?php echo $prefix; ?>_round_effect').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['hotp_border_radius']; ?>" name="<?php echo $prefix; ?>_hotp_border_radius">
|
3789 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3790 |
+
</span>
|
3791 |
+
<span class="wd-group">
|
3792 |
+
<label class="wd-label"><?php _e('Hotspot Animation:', WDS()->prefix); ?></label>
|
3793 |
+
<input id="<?php echo $prefix; ?>_hotspot_animation1" type="radio" name="<?php echo $prefix; ?>_hotspot_animation" value="1" <?php echo (($new_layer['hotspot_animation']) ? 'checked="checked"' : ''); ?> />
|
3794 |
+
<label <?php echo (($new_layer['hotspot_animation']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_hotspot_animation1"><?php _e('Yes', WDS()->prefix); ?></label>
|
3795 |
+
<input id="<?php echo $prefix; ?>_hotspot_animation0" type="radio" name="<?php echo $prefix; ?>_hotspot_animation" value="0" <?php echo (($new_layer['hotspot_animation']) ? '' : 'checked="checked"'); ?> />
|
3796 |
+
<label <?php echo (($new_layer['hotspot_animation']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_hotspot_animation0"><?php _e('No', WDS()->prefix); ?></label>
|
3797 |
+
<p class="description"></p>
|
3798 |
+
</span>
|
3799 |
+
<span class="wd-group">
|
3800 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_callback_list"><?php _e('Add click action:', WDS()->prefix); ?></label>
|
3801 |
+
<select class="select_icon select_icon_320" style="width: 120px;" id="<?php echo $prefix; ?>_layer_callback_list" name="<?php echo $prefix; ?>_layer_callback_list" onchange="wds_show_slides_name('<?php echo $prefix; ?>', jQuery(this).val())">
|
3802 |
+
<?php
|
3803 |
+
foreach ($layer_callbacks as $key => $layer_callback_list) {
|
3804 |
+
?>
|
3805 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['layer_callback_list'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $layer_callback_list; ?></option>
|
3806 |
+
<?php
|
3807 |
+
}
|
3808 |
+
?>
|
3809 |
+
</select>
|
3810 |
+
<p class="description"></p>
|
3811 |
+
</span>
|
3812 |
+
<span class="wd-group">
|
3813 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_link_to_slide" class="link_to_slide" style="<?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>"><?php _e('Slides Name:', WDS()->prefix); ?></label>
|
3814 |
+
<select class="select_icon select_icon_320" style="width: 120px; <?php if ($new_layer['layer_callback_list'] != 'SlideLink') echo 'display:none;'; ?>" id="<?php echo $prefix; ?>_link_to_slide" name="<?php echo $prefix; ?>_link_to_slide">
|
3815 |
+
<?php
|
3816 |
+
foreach ($slides_name as $key => $slide_name) {
|
3817 |
+
?>
|
3818 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['link_to_slide'] == $key ) ? 'selected="selected"' : ''); ?>><?php echo $slide_name; ?></option>
|
3819 |
+
<?php
|
3820 |
+
}
|
3821 |
+
?>
|
3822 |
+
</select>
|
3823 |
+
<p class="description"></p>
|
3824 |
+
</span>
|
3825 |
+
</div>
|
3826 |
+
</div>
|
3827 |
+
</div>
|
3828 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
3829 |
+
<div class="wd-box-section">
|
3830 |
+
<div class="wd-box-content">
|
3831 |
+
<span class="wd-group">
|
3832 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix); ?></label>
|
3833 |
+
<span style="display: inline-block;">
|
3834 |
+
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
3835 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3836 |
+
</span>
|
3837 |
+
<span style="display: inline-block;">
|
3838 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3839 |
+
<?php
|
3840 |
+
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
3841 |
+
?>
|
3842 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
3843 |
+
<?php
|
3844 |
+
}
|
3845 |
+
?>
|
3846 |
+
</select>
|
3847 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3848 |
+
</span>
|
3849 |
+
<span style="display: inline-block;">
|
3850 |
+
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" />ms
|
3851 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3852 |
+
</span>
|
3853 |
+
<span style="display: inline-block;">
|
3854 |
+
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3855 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3856 |
+
</span>
|
3857 |
+
</span>
|
3858 |
+
<span class="wd-group">
|
3859 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix); ?></label>
|
3860 |
+
<span style="display: inline-block;">
|
3861 |
+
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
3862 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
3863 |
+
</span>
|
3864 |
+
<span style="display: inline-block;">
|
3865 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
3866 |
+
<?php
|
3867 |
+
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
3868 |
+
?>
|
3869 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
3870 |
+
<?php
|
3871 |
+
}
|
3872 |
+
?>
|
3873 |
+
</select>
|
3874 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
3875 |
+
</span>
|
3876 |
+
<span style="display: inline-block;">
|
3877 |
+
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out"> ms
|
3878 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
3879 |
+
</span>
|
3880 |
+
<span style="display: inline-block;">
|
3881 |
+
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
3882 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
3883 |
+
</span>
|
3884 |
+
</span>
|
3885 |
+
<span class="wd-group">
|
3886 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_padding" title=""><?php _e('Padding:', WDS()->prefix); ?></label>
|
3887 |
+
<input placeholder="5px 10px 10px" id="<?php echo $prefix; ?>_padding" class="spider_char_input" type="text" onchange="document.getElementById('<?php echo $prefix; ?>').style.padding=jQuery(this).val();" value="<?php echo $new_layer['padding']; ?>" name="<?php echo $prefix; ?>_padding">
|
3888 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3889 |
+
</span>
|
3890 |
+
<span class="wd-group">
|
3891 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Size:', WDS()->prefix); ?> </label>
|
3892 |
+
<span style="display: inline-block">
|
3893 |
+
<input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['size']; ?>" name="<?php echo $prefix; ?>_size" /> px
|
3894 |
+
</span>
|
3895 |
+
<p class="description"><?php _e('Sets the font size of the text.', WDS()->prefix); ?></p>
|
3896 |
+
</span>
|
3897 |
+
<span class="wd-group">
|
3898 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Minimum font size:', WDS()->prefix); ?> </label>
|
3899 |
+
<span style="display: inline-block;">
|
3900 |
+
<input id="<?php echo $prefix; ?>_min_size" class="spider_int_input" type="text" onchange="wds_min_size_validation('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['min_size']; ?>" name="<?php echo $prefix; ?>_min_size" /> px
|
3901 |
+
</span>
|
3902 |
+
<p class="description"><?php _e('Text layer font size shrinks on small screens. Choose the minimum font size, which the text should have.', WDS()->prefix); ?></p>
|
3903 |
+
</span>
|
3904 |
+
|
3905 |
+
<span class="wd-group">
|
3906 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_color"><?php _e('Color:', WDS()->prefix); ?></label>
|
3907 |
+
<input id="<?php echo $prefix; ?>_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({color: '#' + jQuery(this).val()})" value="<?php echo $new_layer['color']; ?>" name="<?php echo $prefix; ?>_color" />
|
3908 |
+
<p class="description"></p>
|
3909 |
+
</span>
|
3910 |
+
<span class="wd-group">
|
3911 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_ffamily"><?php _e('Font family:', WDS()->prefix); ?></label>
|
3912 |
+
<select class="select_icon select_icon_320" style="width: 180px;" id="<?php echo $prefix; ?>_ffamily" onchange="wds_change_fonts('<?php echo $prefix; ?>', 1)" name="<?php echo $prefix; ?>_ffamily">
|
3913 |
+
<?php
|
3914 |
+
$fonts = (isset($new_layer['google_fonts']) && $new_layer['google_fonts']) ? $google_fonts : $font_families;
|
3915 |
+
foreach ($fonts as $key => $font_family) {
|
3916 |
+
?>
|
3917 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['ffamily'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
|
3918 |
+
<?php
|
3919 |
+
}
|
3920 |
+
?>
|
3921 |
+
</select>
|
3922 |
+
<input id="<?php echo $prefix; ?>_google_fonts1" type="radio" name="<?php echo $prefix; ?>_google_fonts" value="1" <?php echo (($new_layer['google_fonts']) ? 'checked="checked"' : ''); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
3923 |
+
<label for="<?php echo $prefix; ?>_google_fonts1">Google fonts</label>
|
3924 |
+
<input id="<?php echo $prefix; ?>_google_fonts0" type="radio" name="<?php echo $prefix; ?>_google_fonts" value="0" <?php echo (($new_layer['google_fonts']) ? '' : 'checked="checked"'); ?> onchange="wds_change_fonts('<?php echo $prefix; ?>')" />
|
3925 |
+
<label for="<?php echo $prefix; ?>_google_fonts0"><?php _e('Default', WDS()->prefix); ?></label>
|
3926 |
+
<p class="description"></p>
|
3927 |
+
</span>
|
3928 |
+
<span class="wd-group">
|
3929 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_fweight"><?php _e('Font weight:', WDS()->prefix); ?></label>
|
3930 |
+
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_fweight" onchange="jQuery('#<?php echo $prefix; ?>').css({fontWeight: jQuery(this).val()})" name="<?php echo $prefix; ?>_fweight">
|
3931 |
+
<?php
|
3932 |
+
foreach ($font_weights as $key => $fweight) {
|
3933 |
+
?>
|
3934 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['fweight'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $fweight; ?></option>
|
3935 |
+
<?php
|
3936 |
+
}
|
3937 |
+
?>
|
3938 |
+
</select>
|
3939 |
+
<p class="description"></p>
|
3940 |
+
</span>
|
3941 |
+
<span class="wd-group">
|
3942 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_fbgcolor"><?php _e('Background Color:', WDS()->prefix); ?></label>
|
3943 |
+
<input id="<?php echo $prefix; ?>_fbgcolor" class="color" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" value="<?php echo $new_layer['fbgcolor']; ?>" name="<?php echo $prefix; ?>_fbgcolor" />
|
3944 |
+
<p class="description"></p>
|
3945 |
+
</span>
|
3946 |
+
<span class="wd-group">
|
3947 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_transparent" title=""><?php _e('Transparency:', WDS()->prefix); ?></label>
|
3948 |
+
<input id="<?php echo $prefix; ?>_transparent" class="spider_int_input" type="text" onchange="wde_change_text_bg_color('<?php echo $prefix; ?>')" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['transparent']; ?>" name="<?php echo $prefix; ?>_transparent"> %
|
3949 |
+
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix); ?></p>
|
3950 |
+
</span>
|
3951 |
+
<span class="wd-group">
|
3952 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_width"><?php _e('Border:', WDS()->prefix); ?></label>
|
3953 |
+
<input id="<?php echo $prefix; ?>_border_width" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderWidth: jQuery(this).val()})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['border_width']; ?>" name="<?php echo $prefix; ?>_border_width"> px
|
3954 |
+
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_border_style" onchange="jQuery('#<?php echo $prefix; ?>').css({borderStyle: jQuery(this).val()})" style="width: 80px;" name="<?php echo $prefix; ?>_border_style">
|
3955 |
+
<?php
|
3956 |
+
foreach ($border_styles as $key => $border_style) {
|
3957 |
+
?>
|
3958 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['border_style'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $border_style; ?></option>
|
3959 |
+
<?php
|
3960 |
+
}
|
3961 |
+
?>
|
3962 |
+
</select>
|
3963 |
+
<input id="<?php echo $prefix; ?>_border_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderColor: '#' + jQuery(this).val()})" value="<?php echo $new_layer['border_color']; ?>" name="<?php echo $prefix; ?>_border_color" />
|
3964 |
+
<p class="description"></p>
|
3965 |
+
</span>
|
3966 |
+
<span class="wd-group">
|
3967 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_border_radius"><?php _e('Radius:', WDS()->prefix); ?></label>
|
3968 |
+
<input placeholder="4px" id="<?php echo $prefix; ?>_border_radius" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({borderRadius: jQuery(this).val()})" value="<?php echo $new_layer['border_radius']; ?>" name="<?php echo $prefix; ?>_border_radius">
|
3969 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3970 |
+
</span>
|
3971 |
+
<span class="wd-group">
|
3972 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_shadow" title=""><?php _e('Shadow:', WDS()->prefix); ?></label>
|
3973 |
+
<input placeholder="10px 10px 5px #888888" id="<?php echo $prefix; ?>_shadow" class="spider_char_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({boxShadow: jQuery(this).val()})" value="<?php echo $new_layer['shadow']; ?>" name="<?php echo $prefix; ?>_shadow" />
|
3974 |
+
<p class="description"><?php _e('Use CSS type values.', WDS()->prefix); ?></p>
|
3975 |
+
</span>
|
3976 |
+
<span class="wd-group">
|
3977 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_add_class"><?php _e('Add class:', WDS()->prefix); ?></label>
|
3978 |
+
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
3979 |
+
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix); ?></p>
|
3980 |
+
</span>
|
3981 |
+
<span class="wd-group">
|
3982 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_text_alignment"><?php _e('Text alignment:', WDS()->prefix); ?></label>
|
3983 |
+
<select class="select_icon select_icon_320" style="width:70px" id="<?php echo $prefix; ?>_text_alignment" onchange="jQuery('#<?php echo $prefix; ?>').css({textAlign: jQuery(this).val()})" name="<?php echo $prefix; ?>_text_alignment">
|
3984 |
+
<?php
|
3985 |
+
foreach ($text_alignments as $key => $text_alignment) {
|
3986 |
+
?>
|
3987 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['text_alignment'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $text_alignment; ?></option>
|
3988 |
+
<?php
|
3989 |
+
}
|
3990 |
+
?>
|
3991 |
+
</select>
|
3992 |
+
<p class="description"></p>
|
3993 |
+
</span>
|
3994 |
+
</div>
|
3995 |
+
</div>
|
3996 |
+
</div>
|
3997 |
+
</div>
|
3998 |
+
</td>
|
3999 |
+
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="hotspots">
|
4000 |
+
</tr>
|
4001 |
+
<?php
|
4002 |
+
return ob_get_clean();
|
4003 |
+
}
|
4004 |
+
|
4005 |
+
/**
|
4006 |
+
* Social layer template
|
4007 |
+
*/
|
4008 |
+
function wds_socialLayerTemplate( $social_buttons, $layer_effects_in, $layer_effects_out, $id=false, $prefix=false, $layer=false ) {
|
4009 |
+
$free_layer_effects = array('none', 'bounce', 'tada', 'bounceInDown', 'bounceOutUp', 'fadeInLeft', 'fadeOutRight');
|
4010 |
+
$id = ( $id == "" ) ? '%%slideID%%' : $id;
|
4011 |
+
$prefix = (isset($prefix) && $prefix != "") ? $prefix : 'slide'.$id.'_layerpr_%%LayerId%%';
|
4012 |
+
if( $layer == "" ) {
|
4013 |
+
$new_layer = array(
|
4014 |
+
'static_layer' => '0',
|
4015 |
+
'left' => '0',
|
4016 |
+
'top' => '0',
|
4017 |
+
'social_button' => $social_buttons,
|
4018 |
+
'size' => 18,
|
4019 |
+
'transparent' => 0,
|
4020 |
+
'published' => 1,
|
4021 |
+
'start' => 1000,
|
4022 |
+
'layer_effect_in' => 'none',
|
4023 |
+
'duration_eff_in' => 1000,
|
4024 |
+
'infinite_in' => 1,
|
4025 |
+
'end' => 1000,
|
4026 |
+
'layer_effect_out' => 'none',
|
4027 |
+
'duration_eff_out' => 1000,
|
4028 |
+
'infinite_out' => 1,
|
4029 |
+
'color' => 'FFFFFF',
|
4030 |
+
'hover_color' => 'FFFFFF',
|
4031 |
+
'add_class' => '',
|
4032 |
+
);
|
4033 |
+
} else {
|
4034 |
+
$new_layer = array(
|
4035 |
+
'static_layer' => $layer->static_layer,
|
4036 |
+
'left' => $layer->left,
|
4037 |
+
'top' => $layer->top,
|
4038 |
+
'social_button' => $layer->social_button,
|
4039 |
+
'size' => $layer->size,
|
4040 |
+
'transparent' => $layer->transparent,
|
4041 |
+
'published' => $layer->published,
|
4042 |
+
'start' => $layer->start,
|
4043 |
+
'layer_effect_in' => $layer->layer_effect_in,
|
4044 |
+
'duration_eff_in' => $layer->duration_eff_in,
|
4045 |
+
'infinite_in' => $layer->infinite_in,
|
4046 |
+
'end' => $layer->end,
|
4047 |
+
'layer_effect_out' => $layer->layer_effect_out,
|
4048 |
+
'duration_eff_out' => $layer->duration_eff_out,
|
4049 |
+
'infinite_out' => $layer->infinite_out,
|
4050 |
+
'color' => $layer->color,
|
4051 |
+
'hover_color' => $layer->hover_color,
|
4052 |
+
'add_class' => $layer->add_class,
|
4053 |
+
);
|
4054 |
+
}
|
4055 |
+
|
4056 |
+
ob_start();
|
4057 |
+
?>
|
4058 |
+
<tr class="wds_layer_tr wds_socialLayer wds_layer_content" style="display: none;">
|
4059 |
+
<td colspan="3">
|
4060 |
+
<div class="wd-table">
|
4061 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
4062 |
+
<div class="wd-box-section">
|
4063 |
+
<div class="wd-box-content">
|
4064 |
+
<span class="wd-group">
|
4065 |
+
<label class="wd-label"><?php _e('Published:', WDS()->prefix);?></label>
|
4066 |
+
<input id="<?php echo $prefix; ?>_published1" type="radio" name="<?php echo $prefix; ?>_published" value="1" <?php echo (($new_layer['published']) ? 'checked="checked"' : ''); ?> />
|
4067 |
+
<label <?php echo (($new_layer['published']) ? 'class="selected_color"' : ''); ?> for="<?php echo $prefix; ?>_published1"><?php _e('Yes', WDS()->prefix);?></label>
|
4068 |
+
<input id="<?php echo $prefix; ?>_published0" type="radio" name="<?php echo $prefix; ?>_published" value="0" <?php echo (($new_layer['published']) ? '' : 'checked="checked"'); ?>/>
|
4069 |
+
<label <?php echo (($new_layer['published']) ? '' : 'class="selected_color"'); ?> for="<?php echo $prefix; ?>_published0"><?php _e('No', WDS()->prefix);?></label>
|
4070 |
+
<p class="description"></p>
|
4071 |
+
</span>
|
4072 |
+
<span class="wd-group">
|
4073 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_static_layer"><?php _e('Static layer:', WDS()->prefix);?> </label>
|
4074 |
+
<input id="<?php echo $prefix; ?>_static_layer" type="checkbox" name="<?php echo $prefix; ?>_static_layer" <?php echo checked(1, $new_layer['static_layer']); ?> value="1" />
|
4075 |
+
<p class="description"><?php _e('The layer will be visible on all slides.', WDS()->prefix);?></p>
|
4076 |
+
</span>
|
4077 |
+
<span class="wd-group">
|
4078 |
+
<label class="wd-label" title=""><?php _e('Position:', WDS()->prefix);?></label>
|
4079 |
+
X <input id="<?php echo $prefix; ?>_left" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({left: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['left']; ?>" name="<?php echo $prefix; ?>_left" />
|
4080 |
+
Y <input id="<?php echo $prefix; ?>_top" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({top: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['top']; ?>" name="<?php echo $prefix; ?>_top" />
|
4081 |
+
<p class="description"><?php _e('In addition, you can drag the layer and drop it to the desired position.', WDS()->prefix);?></p>
|
4082 |
+
</span>
|
4083 |
+
<span class="wd-group">
|
4084 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_social_button"><?php _e('Social button:', WDS()->prefix);?></label>
|
4085 |
+
<select class="select_icon select_icon_320" id="<?php echo $prefix; ?>_social_button" onchange="jQuery('#<?php echo $prefix; ?>').attr('class', 'wds_draggable_<?php echo $id; ?> wds_draggable fa fa-' + jQuery(this).val())" name="<?php echo $prefix; ?>_social_button" style="width:150px;">
|
4086 |
+
<?php
|
4087 |
+
foreach ($social_buttons as $key => $social_button) {
|
4088 |
+
?>
|
4089 |
+
<option value="<?php echo $key; ?>" <?php echo (($new_layer['social_button'] == $key) ? 'selected="selected"' : ''); ?>><?php echo $social_button; ?></option>
|
4090 |
+
<?php
|
4091 |
+
}
|
4092 |
+
?>
|
4093 |
+
</select>
|
4094 |
+
<p class="description"></p>
|
4095 |
+
</span>
|
4096 |
+
<span class="wd-group">
|
4097 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_size"><?php _e('Size:', WDS()->prefix);?></label>
|
4098 |
+
<input id="<?php echo $prefix; ?>_size" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({fontSize: jQuery(this).val() + 'px', lineHeight: jQuery(this).val() + 'px'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['size']; ?>" name="<?php echo $prefix; ?>_size" /> px
|
4099 |
+
<p class="description"></p>
|
4100 |
+
</span>
|
4101 |
+
<span class="wd-group">
|
4102 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_transparent" title=""><?php _e('Transparency:', WDS()->prefix);?></label>
|
4103 |
+
<input id="<?php echo $prefix; ?>_transparent" class="spider_int_input" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({opacity: (100 - jQuery(this).val()) / 100, filter: 'Alpha(opacity=' + 100 - jQuery(this).val() + ')'})" onkeypress="return spider_check_isnum(event)" value="<?php echo $new_layer['transparent']; ?>" name="<?php echo $prefix; ?>_transparent" /> %
|
4104 |
+
<p class="description"><?php _e('Value must be between 0 and 100.', WDS()->prefix);?></p>
|
4105 |
+
</span>
|
4106 |
+
</div>
|
4107 |
+
</div>
|
4108 |
+
</div>
|
4109 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
4110 |
+
<div class="wd-box-section">
|
4111 |
+
<div class="wd-box-content">
|
4112 |
+
<span class="wd-group">
|
4113 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_in"><?php _e('Effect In:', WDS()->prefix);?></label>
|
4114 |
+
<span style="display: inline-block;">
|
4115 |
+
<input id="<?php echo $prefix; ?>_start" class="spider_int_input" type="text" value="<?php echo $new_layer['start']; ?>" name="<?php echo $prefix; ?>_start" /> ms
|
4116 |
+
<p class="description"><?php _e('Start', WDS()->prefix);?></p>
|
4117 |
+
</span>
|
4118 |
+
<span style="display: inline-block;">
|
4119 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_in" id="<?php echo $prefix; ?>_layer_effect_in" style="width:150px;" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
4120 |
+
<?php
|
4121 |
+
foreach ($layer_effects_in as $key => $layer_effect_in) {
|
4122 |
+
?>
|
4123 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_in'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_in; ?></option>
|
4124 |
+
<?php
|
4125 |
+
}
|
4126 |
+
?>
|
4127 |
+
</select>
|
4128 |
+
<p class="description"><?php _e('Effect', WDS()->prefix);?></p>
|
4129 |
+
</span>
|
4130 |
+
<span style="display: inline-block;">
|
4131 |
+
<input id="<?php echo $prefix; ?>_duration_eff_in" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_in').val());" value="<?php echo $new_layer['duration_eff_in']; ?>" name="<?php echo $prefix; ?>_duration_eff_in" /> ms
|
4132 |
+
<p class="description"><?php _e('Duration', WDS()->prefix);?></p>
|
4133 |
+
</span>
|
4134 |
+
<span style="display: inline-block;">
|
4135 |
+
<input id="<?php echo $prefix; ?>_infinite_in" type="text" name="<?php echo $prefix; ?>_infinite_in" value="<?php echo $new_layer['infinite_in']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_in'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_in('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
4136 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix);?></p>
|
4137 |
+
</span>
|
4138 |
+
</span>
|
4139 |
+
<span class="wd-group">
|
4140 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_layer_effect_out"><?php _e('Effect Out:', WDS()->prefix);?></label>
|
4141 |
+
<span style="display: inline-block;">
|
4142 |
+
<input id="<?php echo $prefix; ?>_end" class="spider_int_input" type="text" value="<?php echo $new_layer['end']; ?>" name="<?php echo $prefix; ?>_end"> ms
|
4143 |
+
<p class="description"><?php _e('Start', WDS()->prefix);?></p>
|
4144 |
+
</span>
|
4145 |
+
<span style="display: inline-block;">
|
4146 |
+
<select class="select_icon select_icon_320" name="<?php echo $prefix; ?>_layer_effect_out" id="<?php echo $prefix; ?>_layer_effect_out" style="width:150px;" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());">
|
4147 |
+
<?php
|
4148 |
+
foreach ($layer_effects_out as $key => $layer_effect_out) {
|
4149 |
+
?>
|
4150 |
+
<option <?php echo (WDS()->is_free && !in_array($key, $free_layer_effects)) ? 'disabled="disabled" title="' . __('This effect is disabled in free version.', WDS()->prefix) . '"' : ''; ?> value="<?php echo $key; ?>" <?php if ($new_layer['layer_effect_out'] == $key) echo 'selected="selected"'; ?>><?php echo $layer_effect_out; ?></option>
|
4151 |
+
<?php
|
4152 |
+
}
|
4153 |
+
?>
|
4154 |
+
</select>
|
4155 |
+
<p class="description"><?php _e('Effect', WDS()->prefix);?></p>
|
4156 |
+
</span>
|
4157 |
+
<span style="display: inline-block;">
|
4158 |
+
<input id="<?php echo $prefix; ?>_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 1); wds_trans_end('<?php echo $prefix; ?>', jQuery('#<?php echo $prefix; ?>_layer_effect_out').val());" value="<?php echo $new_layer['duration_eff_out']; ?>" name="<?php echo $prefix; ?>_duration_eff_out">ms
|
4159 |
+
<p class="description"><?php _e('Duration', WDS()->prefix);?></p>
|
4160 |
+
</span>
|
4161 |
+
<span style="display: inline-block;">
|
4162 |
+
<input id="<?php echo $prefix; ?>_infinite_out" type="text" name="<?php echo $prefix; ?>_infinite_out" value="<?php echo $new_layer['infinite_out']; ?>" class="spider_int_input" title="0 for play infinte times" <?php echo ($new_layer['layer_effect_out'] == 'none') ? 'disabled="disabled"' : ''; ?> onchange="wds_trans_effect_out('<?php echo $id; ?>', '<?php echo $prefix; ?>', 0); wds_trans_end('<?php echo $prefix; ?>', jQuery(this).val());" />
|
4163 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix);?></p>
|
4164 |
+
</span>
|
4165 |
+
</span>
|
4166 |
+
<span class="wd-group">
|
4167 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_color"><?php _e('Color:', WDS()->prefix);?></label>
|
4168 |
+
<input id="<?php echo $prefix; ?>_color" class="color" type="text" onchange="jQuery('#<?php echo $prefix; ?>').css({color: '#' + jQuery(this).val()})" value="<?php echo $new_layer['color']; ?>" name="<?php echo $prefix; ?>_color" />
|
4169 |
+
<p class="description"></p>
|
4170 |
+
</span>
|
4171 |
+
<span class="wd-group">
|
4172 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_hover_color"><?php _e('Hover Color:', WDS()->prefix);?></label>
|
4173 |
+
<input id="<?php echo $prefix; ?>_hover_color" class="color" type="text" value="<?php echo $new_layer['hover_color']; ?>" name="<?php echo $prefix; ?>_hover_color" />
|
4174 |
+
<p class="description"></p>
|
4175 |
+
</span>
|
4176 |
+
<span class="wd-group">
|
4177 |
+
<label class="wd-label" for="<?php echo $prefix; ?>_add_class" title=""><?php _e('Add class:', WDS()->prefix);?></label>
|
4178 |
+
<input id="<?php echo $prefix; ?>_add_class" class="spider_char_input" type="text" value="<?php echo $new_layer['add_class']; ?>" name="<?php echo $prefix; ?>_add_class" />
|
4179 |
+
<p class="description"><?php _e('Use this option to add a unique class to this layer.', WDS()->prefix);?></p>
|
4180 |
+
</span>
|
4181 |
+
</div>
|
4182 |
+
</div>
|
4183 |
+
</div>
|
4184 |
+
</div>
|
4185 |
+
</td>
|
4186 |
+
<input type="hidden" name="<?php echo $prefix; ?>_type" id="<?php echo $prefix; ?>_type" value="social">
|
4187 |
+
</tr>
|
4188 |
+
<?php
|
4189 |
+
return ob_get_clean();
|
4190 |
+
}
|
4191 |
}
|
admin/views/WDSViewGoptions_wds.php
CHANGED
@@ -1,299 +1,299 @@
|
|
1 |
-
<?php
|
2 |
-
class WDSViewGoptions_wds {
|
3 |
-
|
4 |
-
private $model;
|
5 |
-
|
6 |
-
public function __construct($model) {
|
7 |
-
$this->model = $model;
|
8 |
-
}
|
9 |
-
|
10 |
-
public function display($sliders) {
|
11 |
-
$default_layer_fweights = array(
|
12 |
-
'lighter' => __('Lighter', WDS()->prefix),
|
13 |
-
'normal' => __('Normal', WDS()->prefix),
|
14 |
-
'bold' => __('Bold', WDS()->prefix),
|
15 |
-
);
|
16 |
-
$default_layer_effects_in = array(
|
17 |
-
'none' => __('None', WDS()->prefix),
|
18 |
-
'bounce' => __('Bounce', WDS()->prefix),
|
19 |
-
'flash' => __('Flash', WDS()->prefix),
|
20 |
-
'pulse' => __('Pulse', WDS()->prefix),
|
21 |
-
'rubberBand' => __('RubberBand', WDS()->prefix),
|
22 |
-
'shake' => __('Shake', WDS()->prefix),
|
23 |
-
'swing' => __('Swing', WDS()->prefix),
|
24 |
-
'tada' => __('Tada', WDS()->prefix),
|
25 |
-
'wobble' => __('Wobble', WDS()->prefix),
|
26 |
-
'hinge' => __('Hinge', WDS()->prefix),
|
27 |
-
'lightSpeedIn' => __('LightSpeedIn', WDS()->prefix),
|
28 |
-
'rollIn' => __('RollIn', WDS()->prefix),
|
29 |
-
'bounceIn' => __('BounceIn', WDS()->prefix),
|
30 |
-
'bounceInDown' => __('BounceInDown', WDS()->prefix),
|
31 |
-
'bounceInLeft' => __('BounceInLeft', WDS()->prefix),
|
32 |
-
'bounceInRight' => __('BounceInRight', WDS()->prefix),
|
33 |
-
'bounceInUp' => __('BounceInUp', WDS()->prefix),
|
34 |
-
'fadeIn' => __('FadeIn', WDS()->prefix),
|
35 |
-
'fadeInDown' => __('FadeInDown', WDS()->prefix),
|
36 |
-
'fadeInDownBig' => __('FadeInDownBig', WDS()->prefix),
|
37 |
-
'fadeInLeft' => __('FadeInLeft', WDS()->prefix),
|
38 |
-
'fadeInLeftBig' => __('FadeInLeftBig', WDS()->prefix),
|
39 |
-
'fadeInRight' => __('FadeInRight', WDS()->prefix),
|
40 |
-
'fadeInRightBig' => __('FadeInRightBig', WDS()->prefix),
|
41 |
-
'fadeInUp' => __('FadeInUp', WDS()->prefix),
|
42 |
-
'fadeInUpBig' => __('FadeInUpBig', WDS()->prefix),
|
43 |
-
'flip' => __('Flip', WDS()->prefix),
|
44 |
-
'flipInX' => __('FlipInX', WDS()->prefix),
|
45 |
-
'flipInY' => __('FlipInY', WDS()->prefix),
|
46 |
-
'rotateIn' => __('RotateIn', WDS()->prefix),
|
47 |
-
'rotateInDownLeft' => __('RotateInDownLeft', WDS()->prefix),
|
48 |
-
'rotateInDownRight' => __('RotateInDownRight', WDS()->prefix),
|
49 |
-
'rotateInUpLeft' => __('RotateInUpLeft', WDS()->prefix),
|
50 |
-
'rotateInUpRight' => __('RotateInUpRight', WDS()->prefix),
|
51 |
-
'zoomIn' => __('ZoomIn', WDS()->prefix),
|
52 |
-
'zoomInDown' => __('ZoomInDown', WDS()->prefix),
|
53 |
-
'zoomInLeft' => __('ZoomInLeft', WDS()->prefix),
|
54 |
-
'zoomInRight' => __('ZoomInRight', WDS()->prefix),
|
55 |
-
'zoomInUp' => __('ZoomInUp', WDS()->prefix),
|
56 |
-
);
|
57 |
-
$default_layer_effects_out = array(
|
58 |
-
'none' => __('None', WDS()->prefix),
|
59 |
-
'bounce' => __('Bounce', WDS()->prefix),
|
60 |
-
'flash' => __('Flash', WDS()->prefix),
|
61 |
-
'pulse' => __('Pulse', WDS()->prefix),
|
62 |
-
'rubberBand' => __('RubberBand', WDS()->prefix),
|
63 |
-
'shake' => __('Shake', WDS()->prefix),
|
64 |
-
'swing' => __('Swing', WDS()->prefix),
|
65 |
-
'tada' => __('Tada', WDS()->prefix),
|
66 |
-
'wobble' => __('Wobble', WDS()->prefix),
|
67 |
-
'hinge' => __('Hinge', WDS()->prefix),
|
68 |
-
'lightSpeedOut' => __('LightSpeedOut', WDS()->prefix),
|
69 |
-
'rollOut' => __('RollOut', WDS()->prefix),
|
70 |
-
'bounceOut' => __('BounceOut', WDS()->prefix),
|
71 |
-
'bounceOutDown' => __('BounceOutDown', WDS()->prefix),
|
72 |
-
'bounceOutLeft' => __('BounceOutLeft', WDS()->prefix),
|
73 |
-
'bounceOutRight' => __('BounceOutRight', WDS()->prefix),
|
74 |
-
'bounceOutUp' => __('BounceOutUp', WDS()->prefix),
|
75 |
-
'fadeOut' => __('FadeOut', WDS()->prefix),
|
76 |
-
'fadeOutDown' => __('FadeOutDown', WDS()->prefix),
|
77 |
-
'fadeOutDownBig' => __('FadeOutDownBig', WDS()->prefix),
|
78 |
-
'fadeOutLeft' => __('FadeOutLeft', WDS()->prefix),
|
79 |
-
'fadeOutLeftBig' => __('FadeOutLeftBig', WDS()->prefix),
|
80 |
-
'fadeOutRight' => __('FadeOutRight', WDS()->prefix),
|
81 |
-
'fadeOutRightBig' => __('FadeOutRightBig', WDS()->prefix),
|
82 |
-
'fadeOutUp' => __('FadeOutUp', WDS()->prefix),
|
83 |
-
'fadeOutUpBig' => __('FadeOutUpBig', WDS()->prefix),
|
84 |
-
'flip' => __('Flip', WDS()->prefix),
|
85 |
-
'flipOutX' => __('FlipOutX', WDS()->prefix),
|
86 |
-
'flipOutY' => __('FlipOutY', WDS()->prefix),
|
87 |
-
'rotateOut' => __('RubberBand', WDS()->prefix),
|
88 |
-
'rotateOutDownLeft' => __('RotateOutDownLeft', WDS()->prefix),
|
89 |
-
'rotateOutDownRight' => __('RotateOutDownRight', WDS()->prefix),
|
90 |
-
'rotateOutUpLeft' => __('RotateOutUpLeft', WDS()->prefix),
|
91 |
-
'rotateOutUpRight' => __('RotateOutUpRight', WDS()->prefix),
|
92 |
-
'zoomOut' => __('ZoomOut', WDS()->prefix),
|
93 |
-
'zoomOutDown' => __('ZoomOutDown', WDS()->prefix),
|
94 |
-
'zoomOutLeft' => __('ZoomOutLeft', WDS()->prefix),
|
95 |
-
'zoomOutRight' => __('ZoomOutRight', WDS()->prefix),
|
96 |
-
'zoomOutUp' => __('ZoomOutUp', WDS()->prefix),
|
97 |
-
);
|
98 |
-
$font_families = WDW_S_Library::get_font_families();
|
99 |
-
$google_fonts = WDW_S_Library::get_google_fonts();
|
100 |
-
$loading_gifs = array(
|
101 |
-
0 => __('Loading default', WDS()->prefix),
|
102 |
-
1 => __('Loading1', WDS()->prefix),
|
103 |
-
2 => __('Loading2', WDS()->prefix),
|
104 |
-
3 => __('Loading3', WDS()->prefix),
|
105 |
-
4 => __('Loading4', WDS()->prefix),
|
106 |
-
5 => __('Loading5', WDS()->prefix),
|
107 |
-
);
|
108 |
-
|
109 |
-
$wds_global_options = get_option("wds_global_options", 0);
|
110 |
-
$global_options = json_decode($wds_global_options);
|
111 |
-
if ( !$wds_global_options ) {
|
112 |
-
$global_options = (object) WDW_S_Library::global_options_defults();
|
113 |
-
$global_options->loading_gif = get_option("wds_loading_gif", 0);
|
114 |
-
$global_options->register_scripts = get_option("wds_register_scripts", 0);
|
115 |
-
}
|
116 |
-
$uninstall_href = add_query_arg( array( 'page' => 'uninstall_wds'), admin_url('admin.php') );
|
117 |
-
?>
|
118 |
-
<div class="clear"></div>
|
119 |
-
<div class="wrap">
|
120 |
-
<form id="sliders_form" class="wds_options_form" method="post" action="admin.php?page=goptions_wds" enctype="multipart/form-data">
|
121 |
-
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
122 |
-
<div class="wds-options-page-banner">
|
123 |
-
<div class="wds-options-logo"></div>
|
124 |
-
<div class="wds-options-logo-title"><?php _e('Options', WDS()->prefix); ?></div>
|
125 |
-
<div class="wds-page-actions">
|
126 |
-
<button class="button button-primary" onclick="spider_set_input_value('task', 'save');"><?php _e('Save', WDS()->prefix); ?></button>
|
127 |
-
</div>
|
128 |
-
</div>
|
129 |
-
<div class="wd-table">
|
130 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
131 |
-
<div class="wd-box-section">
|
132 |
-
<div class="wd-box-title">
|
133 |
-
<strong><?php _e('Global Options', WDS()->prefix); ?></strong>
|
134 |
-
</div>
|
135 |
-
<div class="wd-box-content">
|
136 |
-
<div class="wd-group">
|
137 |
-
<label class="wd-label"><?php _e('Enable WD Media Uploader', WDS()->prefix); ?></label>
|
138 |
-
<input type="radio" id="spider_uploader1" name="spider_uploader" <?php echo (($global_options->spider_uploader == 1)? "checked='checked'" : ""); ?> value="1" /><label <?php echo ($global_options->spider_uploader ? 'class="selected_color"' : ''); ?> for="spider_uploader1"><?php _e('Yes', WDS()->prefix); ?></label>
|
139 |
-
<input type="radio" id="spider_uploader0" name="spider_uploader" <?php echo (($global_options->spider_uploader == 0)? "checked='checked'" : ""); ?> value="0" /><label <?php echo ($global_options->spider_uploader ? '' : 'class="selected_color"'); ?> for="spider_uploader0"><?php _e('No', WDS()->prefix); ?></label>
|
140 |
-
<p class="description"><?php _e('Enabling this option lets you use custom media uploader to add images, instead of WordPress Media Library.', WDS()->prefix); ?></p>
|
141 |
-
</div>
|
142 |
-
<div class="wd-group">
|
143 |
-
<label for="loading_gif" class="wd-label"><?php _e('Loading icon', WDS()->prefix); ?></label>
|
144 |
-
<select class="select_icon select_icon_320 select_gif" name="loading_gif" id="loading_gif" onchange="wds_loading_gif(jQuery(this).val(), '<?php echo WDS()->plugin_url ?>')">
|
145 |
-
<?php foreach ($loading_gifs as $key => $loading_gif) { ?>
|
146 |
-
<option value="<?php echo $key; ?>" <?php if ($global_options->loading_gif == $key) echo 'selected="selected"'; ?>><?php echo $loading_gif; ?></option>
|
147 |
-
<?php } ?>
|
148 |
-
</select>
|
149 |
-
<span class="button wds_fieldset_img_preview" onclick="wds_loading_preview()"><?php _e('Preview', WDS()->prefix); ?></span>
|
150 |
-
<div class="wds_fieldset_img">
|
151 |
-
<img id="load_gif_img" src="<?php echo WDS()->plugin_url . '/images/loading/' . $global_options->loading_gif . '.gif'; ?>" />
|
152 |
-
</div>
|
153 |
-
</div>
|
154 |
-
<div class="wd-group">
|
155 |
-
<label class="wd-label"><?php _e('Uninstall Slider WD', WDS()->prefix); ?></label>
|
156 |
-
<a class="button" href="<?php echo $uninstall_href ?>"><?php _e('Uninstall', WDS()->prefix); ?></a>
|
157 |
-
</div>
|
158 |
-
</div>
|
159 |
-
</div>
|
160 |
-
</div>
|
161 |
-
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
162 |
-
<div class="wd-box-section">
|
163 |
-
<div class="wd-box-title">
|
164 |
-
<strong><?php _e('Default options for layers', WDS()->prefix); ?></strong>
|
165 |
-
</div>
|
166 |
-
<div class="wd-box-content<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
167 |
-
<?php
|
168 |
-
if ( WDS()->is_free ) {
|
169 |
-
echo WDW_S_Library::message_id(0, __('This functionality is disabled in free version.', WDS()->prefix), 'error');
|
170 |
-
}
|
171 |
-
?>
|
172 |
-
<div class="wd-group">
|
173 |
-
<label class="wd-label" for="default_layer_ffamily"><?php _e('Font', WDS()->prefix); ?></label>
|
174 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_google_fonts1" type="radio" name="default_layer_google_fonts" value="1" <?php echo (($global_options->default_layer_google_fonts) ? 'checked="checked"' : ''); ?> onchange="wds_change_fonts()" />
|
175 |
-
<label for="default_layer_google_fonts1"><?php _e('Google fonts', WDS()->prefix); ?></label>
|
176 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_google_fonts0" type="radio" name="default_layer_google_fonts" value="0" <?php echo (($global_options->default_layer_google_fonts) ? '' : 'checked="checked"'); ?> onchange="wds_change_fonts()" />
|
177 |
-
<label for="default_layer_google_fonts0"><?php _e('Default', WDS()->prefix); ?></label>
|
178 |
-
</div>
|
179 |
-
<div class="wd-group">
|
180 |
-
<label class="wd-label wds_default_label" for="default_layer_ffamily"><?php _e('Font family', WDS()->prefix); ?></label>
|
181 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" id="default_layer_ffamily" onchange="wds_change_fonts('', 1)" name="default_layer_ffamily">
|
182 |
-
<?php
|
183 |
-
$fonts = (isset($global_options->default_layer_google_fonts) && $global_options->default_layer_google_fonts) ? $google_fonts : $font_families;
|
184 |
-
foreach ($fonts as $key => $font_family) {
|
185 |
-
?>
|
186 |
-
<option value="<?php echo $key; ?>" <?php echo (($global_options->default_layer_ffamily == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
|
187 |
-
<?php } ?>
|
188 |
-
</select>
|
189 |
-
</div>
|
190 |
-
<div class="wd-group">
|
191 |
-
<label class="wd-label" for="possib_add_ffamily_input"><?php _e('Add font-family', WDS()->prefix); ?></label>
|
192 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="possib_add_ffamily_input" value="" class="spider_box_input"/>
|
193 |
-
<input type="hidden" id="possib_add_ffamily" name="possib_add_ffamily" value="<?php echo $global_options->possib_add_ffamily; ?>"/>
|
194 |
-
<input type="hidden" id="possib_add_ffamily_google" name="possib_add_ffamily_google" value="<?php echo $global_options->possib_add_ffamily_google; ?>"/>
|
195 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="possib_add_google_fonts" type="checkbox" name="possib_add_google_fonts" value="1"/><label for="possib_add_google_fonts"><?php _e('Add to Google fonts', WDS()->prefix); ?></label>
|
196 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="add_font_family" class="button button-primary" type="button" onclick="set_ffamily_value();spider_set_input_value('task', 'save_font_family');spider_form_submit(event, 'sliders_form')" value="<?php _e('Add font-family', WDS()->prefix); ?>"/>
|
197 |
-
<p class="description"><?php _e('The added font family will appear in the drop-down list of fonts.', WDS()->prefix); ?></p>
|
198 |
-
</div>
|
199 |
-
<div class="wd-group">
|
200 |
-
<label class="wd-label wds_default_label" for="default_layer_fweight"><?php _e('Font weight', WDS()->prefix); ?></label>
|
201 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" id="default_layer_fweight" name="default_layer_fweight">
|
202 |
-
<?php foreach ($default_layer_fweights as $key => $default_layer_fweight) { ?>
|
203 |
-
<option value="<?php echo $key; ?>" <?php echo (($global_options->default_layer_fweight == $key) ? 'selected="selected"' : ''); ?>><?php echo $default_layer_fweight; ?></option>
|
204 |
-
<?php } ?>
|
205 |
-
</select>
|
206 |
-
</div>
|
207 |
-
<div class="wd-group">
|
208 |
-
<label class="wd-label wds_default_label" for="default_layer_effect_in"><?php _e('Effect In', WDS()->prefix); ?></label>
|
209 |
-
<span style="display: inline-block;">
|
210 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_start" class="spider_int_input" type="text" value="<?php echo $global_options->default_layer_start; ?>" name="default_layer_start"/> ms
|
211 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
212 |
-
</span>
|
213 |
-
<span style="display: inline-block;">
|
214 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="default_layer_effect_in" id="default_layer_effect_in">
|
215 |
-
<?php foreach ( $default_layer_effects_in as $key => $default_layer_effect_in ) { ?>
|
216 |
-
<option value="<?php echo $key; ?>" <?php echo ( $global_options->default_layer_effect_in == $key ) ? 'selected="selected"' : '' ?>><?php echo $default_layer_effect_in; ?></option>
|
217 |
-
<?php } ?>
|
218 |
-
</select>
|
219 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
220 |
-
</span>
|
221 |
-
<span style="display: inline-block;">
|
222 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_duration_eff_in" class="spider_int_input" type="text" value="<?php echo $global_options->default_layer_duration_eff_in; ?>" name="default_layer_duration_eff_in"/>ms
|
223 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
224 |
-
</span>
|
225 |
-
<span style="display: inline-block;">
|
226 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_infinite_in" type="text" name="default_layer_infinite_in" value="<?php echo $global_options->default_layer_infinite_in; ?>" class="spider_int_input" title="<?php _e('0 for play infinte times', WDS()->prefix);?>" />
|
227 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
228 |
-
</span>
|
229 |
-
</div>
|
230 |
-
<div class="wd-group">
|
231 |
-
<label class="wd-label wds_default_label" for="default_layer_effect_out"><?php _e('Effect Out', WDS()->prefix); ?></label>
|
232 |
-
<span style="display: inline-block;">
|
233 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_end" class="spider_int_input" type="text" value="<?php echo $global_options->default_layer_end; ?>" name="default_layer_end">ms
|
234 |
-
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
235 |
-
</span>
|
236 |
-
<span style="display: inline-block;">
|
237 |
-
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="default_layer_effect_out" id="default_layer_effect_out" style="width:150px;">
|
238 |
-
<?php foreach ($default_layer_effects_out as $key => $default_layer_effect_out) { ?>
|
239 |
-
<option value="<?php echo $key; ?>" <?php echo ( $global_options->default_layer_effect_out == $key ) ? 'selected="selected"' : '' ?>><?php echo $default_layer_effect_out; ?></option>
|
240 |
-
<?php
|
241 |
-
}
|
242 |
-
?>
|
243 |
-
</select>
|
244 |
-
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
245 |
-
</span>
|
246 |
-
<span style="display: inline-block;">
|
247 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" value="<?php echo $global_options->default_layer_duration_eff_out; ?>" name="default_layer_duration_eff_out">ms
|
248 |
-
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
249 |
-
</span>
|
250 |
-
<span style="display: inline-block;">
|
251 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_infinite_out" type="text" name="default_layer_infinite_out" value="<?php echo $global_options->default_layer_infinite_out; ?>" class="spider_int_input" title="<?php _e('0 for play infinte times', WDS()->prefix); ?>" />
|
252 |
-
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
253 |
-
</span>
|
254 |
-
</div>
|
255 |
-
<div class="wd-group">
|
256 |
-
<label class="wd-label wds_default_label" for="default_layer_add_class"><?php _e('Add class', WDS()->prefix); ?></label>
|
257 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_add_class" class="spider_char_input" type="text" value="<?php echo $global_options->default_layer_add_class; ?>" name="default_layer_add_class" />
|
258 |
-
</div>
|
259 |
-
<div class="wd-group">
|
260 |
-
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="button" class="button button-primary" onclick="wds_set_one(); wds_invent_default_layer_check();" value="<?php _e('Apply to existing layers', WDS()->prefix); ?>" />
|
261 |
-
</div>
|
262 |
-
</div>
|
263 |
-
</div>
|
264 |
-
</div>
|
265 |
-
</div>
|
266 |
-
<div class="wds_opacity_set" onclick="jQuery('.wds_opacity_set').hide();jQuery('.wds_set').hide();"></div>
|
267 |
-
<div class="wds_set">
|
268 |
-
<table>
|
269 |
-
<tbody class="choose_slider_tbody">
|
270 |
-
<tr>
|
271 |
-
<td colspan="2">
|
272 |
-
<select class="select_icon select_icon_320" id="choose_slider" name="choose_slider">
|
273 |
-
<?php foreach ($
|
274 |
-
<option value="<?php echo $slider->id; ?>"><?php echo $slider->name; ?></option>
|
275 |
-
<?php } ?>
|
276 |
-
</select>
|
277 |
-
<p class="description"><?php _e('Select slider to apply.', WDS()->prefix); ?></p>
|
278 |
-
</td>
|
279 |
-
</tr>
|
280 |
-
<tr class="wds_template_class">
|
281 |
-
<td><label class="spider_label"></label></td>
|
282 |
-
<td align="right"><input class="wds_check" type="checkbox" value="1" /></td>
|
283 |
-
</tr>
|
284 |
-
<tr>
|
285 |
-
<td colspan="2" align="right">
|
286 |
-
<br>
|
287 |
-
<input type="button" class="button button-primary" onclick="spider_set_input_value('task', 'change_layer_options'); wds_checked_options(event);" value="<?php _e('Apply', WDS()->prefix); ?>" />
|
288 |
-
<input type="button" class="button" onclick="jQuery('.wds_set').hide(); jQuery('.wds_opacity_set').hide(); return false;" value="<?php _e('Cancel', WDS()->prefix); ?>" />
|
289 |
-
</td>
|
290 |
-
</tr>
|
291 |
-
<tbody>
|
292 |
-
</table>
|
293 |
-
</div>
|
294 |
-
<input id="task" name="task" type="hidden" value="" />
|
295 |
-
</form>
|
296 |
-
</div>
|
297 |
-
<?php
|
298 |
-
}
|
299 |
-
}
|
1 |
+
<?php
|
2 |
+
class WDSViewGoptions_wds {
|
3 |
+
|
4 |
+
private $model;
|
5 |
+
|
6 |
+
public function __construct($model) {
|
7 |
+
$this->model = $model;
|
8 |
+
}
|
9 |
+
|
10 |
+
public function display($sliders) {
|
11 |
+
$default_layer_fweights = array(
|
12 |
+
'lighter' => __('Lighter', WDS()->prefix),
|
13 |
+
'normal' => __('Normal', WDS()->prefix),
|
14 |
+
'bold' => __('Bold', WDS()->prefix),
|
15 |
+
);
|
16 |
+
$default_layer_effects_in = array(
|
17 |
+
'none' => __('None', WDS()->prefix),
|
18 |
+
'bounce' => __('Bounce', WDS()->prefix),
|
19 |
+
'flash' => __('Flash', WDS()->prefix),
|
20 |
+
'pulse' => __('Pulse', WDS()->prefix),
|
21 |
+
'rubberBand' => __('RubberBand', WDS()->prefix),
|
22 |
+
'shake' => __('Shake', WDS()->prefix),
|
23 |
+
'swing' => __('Swing', WDS()->prefix),
|
24 |
+
'tada' => __('Tada', WDS()->prefix),
|
25 |
+
'wobble' => __('Wobble', WDS()->prefix),
|
26 |
+
'hinge' => __('Hinge', WDS()->prefix),
|
27 |
+
'lightSpeedIn' => __('LightSpeedIn', WDS()->prefix),
|
28 |
+
'rollIn' => __('RollIn', WDS()->prefix),
|
29 |
+
'bounceIn' => __('BounceIn', WDS()->prefix),
|
30 |
+
'bounceInDown' => __('BounceInDown', WDS()->prefix),
|
31 |
+
'bounceInLeft' => __('BounceInLeft', WDS()->prefix),
|
32 |
+
'bounceInRight' => __('BounceInRight', WDS()->prefix),
|
33 |
+
'bounceInUp' => __('BounceInUp', WDS()->prefix),
|
34 |
+
'fadeIn' => __('FadeIn', WDS()->prefix),
|
35 |
+
'fadeInDown' => __('FadeInDown', WDS()->prefix),
|
36 |
+
'fadeInDownBig' => __('FadeInDownBig', WDS()->prefix),
|
37 |
+
'fadeInLeft' => __('FadeInLeft', WDS()->prefix),
|
38 |
+
'fadeInLeftBig' => __('FadeInLeftBig', WDS()->prefix),
|
39 |
+
'fadeInRight' => __('FadeInRight', WDS()->prefix),
|
40 |
+
'fadeInRightBig' => __('FadeInRightBig', WDS()->prefix),
|
41 |
+
'fadeInUp' => __('FadeInUp', WDS()->prefix),
|
42 |
+
'fadeInUpBig' => __('FadeInUpBig', WDS()->prefix),
|
43 |
+
'flip' => __('Flip', WDS()->prefix),
|
44 |
+
'flipInX' => __('FlipInX', WDS()->prefix),
|
45 |
+
'flipInY' => __('FlipInY', WDS()->prefix),
|
46 |
+
'rotateIn' => __('RotateIn', WDS()->prefix),
|
47 |
+
'rotateInDownLeft' => __('RotateInDownLeft', WDS()->prefix),
|
48 |
+
'rotateInDownRight' => __('RotateInDownRight', WDS()->prefix),
|
49 |
+
'rotateInUpLeft' => __('RotateInUpLeft', WDS()->prefix),
|
50 |
+
'rotateInUpRight' => __('RotateInUpRight', WDS()->prefix),
|
51 |
+
'zoomIn' => __('ZoomIn', WDS()->prefix),
|
52 |
+
'zoomInDown' => __('ZoomInDown', WDS()->prefix),
|
53 |
+
'zoomInLeft' => __('ZoomInLeft', WDS()->prefix),
|
54 |
+
'zoomInRight' => __('ZoomInRight', WDS()->prefix),
|
55 |
+
'zoomInUp' => __('ZoomInUp', WDS()->prefix),
|
56 |
+
);
|
57 |
+
$default_layer_effects_out = array(
|
58 |
+
'none' => __('None', WDS()->prefix),
|
59 |
+
'bounce' => __('Bounce', WDS()->prefix),
|
60 |
+
'flash' => __('Flash', WDS()->prefix),
|
61 |
+
'pulse' => __('Pulse', WDS()->prefix),
|
62 |
+
'rubberBand' => __('RubberBand', WDS()->prefix),
|
63 |
+
'shake' => __('Shake', WDS()->prefix),
|
64 |
+
'swing' => __('Swing', WDS()->prefix),
|
65 |
+
'tada' => __('Tada', WDS()->prefix),
|
66 |
+
'wobble' => __('Wobble', WDS()->prefix),
|
67 |
+
'hinge' => __('Hinge', WDS()->prefix),
|
68 |
+
'lightSpeedOut' => __('LightSpeedOut', WDS()->prefix),
|
69 |
+
'rollOut' => __('RollOut', WDS()->prefix),
|
70 |
+
'bounceOut' => __('BounceOut', WDS()->prefix),
|
71 |
+
'bounceOutDown' => __('BounceOutDown', WDS()->prefix),
|
72 |
+
'bounceOutLeft' => __('BounceOutLeft', WDS()->prefix),
|
73 |
+
'bounceOutRight' => __('BounceOutRight', WDS()->prefix),
|
74 |
+
'bounceOutUp' => __('BounceOutUp', WDS()->prefix),
|
75 |
+
'fadeOut' => __('FadeOut', WDS()->prefix),
|
76 |
+
'fadeOutDown' => __('FadeOutDown', WDS()->prefix),
|
77 |
+
'fadeOutDownBig' => __('FadeOutDownBig', WDS()->prefix),
|
78 |
+
'fadeOutLeft' => __('FadeOutLeft', WDS()->prefix),
|
79 |
+
'fadeOutLeftBig' => __('FadeOutLeftBig', WDS()->prefix),
|
80 |
+
'fadeOutRight' => __('FadeOutRight', WDS()->prefix),
|
81 |
+
'fadeOutRightBig' => __('FadeOutRightBig', WDS()->prefix),
|
82 |
+
'fadeOutUp' => __('FadeOutUp', WDS()->prefix),
|
83 |
+
'fadeOutUpBig' => __('FadeOutUpBig', WDS()->prefix),
|
84 |
+
'flip' => __('Flip', WDS()->prefix),
|
85 |
+
'flipOutX' => __('FlipOutX', WDS()->prefix),
|
86 |
+
'flipOutY' => __('FlipOutY', WDS()->prefix),
|
87 |
+
'rotateOut' => __('RubberBand', WDS()->prefix),
|
88 |
+
'rotateOutDownLeft' => __('RotateOutDownLeft', WDS()->prefix),
|
89 |
+
'rotateOutDownRight' => __('RotateOutDownRight', WDS()->prefix),
|
90 |
+
'rotateOutUpLeft' => __('RotateOutUpLeft', WDS()->prefix),
|
91 |
+
'rotateOutUpRight' => __('RotateOutUpRight', WDS()->prefix),
|
92 |
+
'zoomOut' => __('ZoomOut', WDS()->prefix),
|
93 |
+
'zoomOutDown' => __('ZoomOutDown', WDS()->prefix),
|
94 |
+
'zoomOutLeft' => __('ZoomOutLeft', WDS()->prefix),
|
95 |
+
'zoomOutRight' => __('ZoomOutRight', WDS()->prefix),
|
96 |
+
'zoomOutUp' => __('ZoomOutUp', WDS()->prefix),
|
97 |
+
);
|
98 |
+
$font_families = WDW_S_Library::get_font_families();
|
99 |
+
$google_fonts = WDW_S_Library::get_google_fonts();
|
100 |
+
$loading_gifs = array(
|
101 |
+
0 => __('Loading default', WDS()->prefix),
|
102 |
+
1 => __('Loading1', WDS()->prefix),
|
103 |
+
2 => __('Loading2', WDS()->prefix),
|
104 |
+
3 => __('Loading3', WDS()->prefix),
|
105 |
+
4 => __('Loading4', WDS()->prefix),
|
106 |
+
5 => __('Loading5', WDS()->prefix),
|
107 |
+
);
|
108 |
+
|
109 |
+
$wds_global_options = get_option("wds_global_options", 0);
|
110 |
+
$global_options = json_decode($wds_global_options);
|
111 |
+
if ( !$wds_global_options ) {
|
112 |
+
$global_options = (object) WDW_S_Library::global_options_defults();
|
113 |
+
$global_options->loading_gif = get_option("wds_loading_gif", 0);
|
114 |
+
$global_options->register_scripts = get_option("wds_register_scripts", 0);
|
115 |
+
}
|
116 |
+
$uninstall_href = add_query_arg( array( 'page' => 'uninstall_wds'), admin_url('admin.php') );
|
117 |
+
?>
|
118 |
+
<div class="clear"></div>
|
119 |
+
<div class="wrap">
|
120 |
+
<form id="sliders_form" class="wds_options_form" method="post" action="admin.php?page=goptions_wds" enctype="multipart/form-data">
|
121 |
+
<?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
|
122 |
+
<div class="wds-options-page-banner">
|
123 |
+
<div class="wds-options-logo"></div>
|
124 |
+
<div class="wds-options-logo-title"><?php _e('Options', WDS()->prefix); ?></div>
|
125 |
+
<div class="wds-page-actions">
|
126 |
+
<button class="button button-primary" onclick="spider_set_input_value('task', 'save');"><?php _e('Save', WDS()->prefix); ?></button>
|
127 |
+
</div>
|
128 |
+
</div>
|
129 |
+
<div class="wd-table">
|
130 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-left">
|
131 |
+
<div class="wd-box-section">
|
132 |
+
<div class="wd-box-title">
|
133 |
+
<strong><?php _e('Global Options', WDS()->prefix); ?></strong>
|
134 |
+
</div>
|
135 |
+
<div class="wd-box-content">
|
136 |
+
<div class="wd-group">
|
137 |
+
<label class="wd-label"><?php _e('Enable WD Media Uploader', WDS()->prefix); ?></label>
|
138 |
+
<input type="radio" id="spider_uploader1" name="spider_uploader" <?php echo (($global_options->spider_uploader == 1)? "checked='checked'" : ""); ?> value="1" /><label <?php echo ($global_options->spider_uploader ? 'class="selected_color"' : ''); ?> for="spider_uploader1"><?php _e('Yes', WDS()->prefix); ?></label>
|
139 |
+
<input type="radio" id="spider_uploader0" name="spider_uploader" <?php echo (($global_options->spider_uploader == 0)? "checked='checked'" : ""); ?> value="0" /><label <?php echo ($global_options->spider_uploader ? '' : 'class="selected_color"'); ?> for="spider_uploader0"><?php _e('No', WDS()->prefix); ?></label>
|
140 |
+
<p class="description"><?php _e('Enabling this option lets you use custom media uploader to add images, instead of WordPress Media Library.', WDS()->prefix); ?></p>
|
141 |
+
</div>
|
142 |
+
<div class="wd-group">
|
143 |
+
<label for="loading_gif" class="wd-label"><?php _e('Loading icon', WDS()->prefix); ?></label>
|
144 |
+
<select class="select_icon select_icon_320 select_gif" name="loading_gif" id="loading_gif" onchange="wds_loading_gif(jQuery(this).val(), '<?php echo WDS()->plugin_url ?>')">
|
145 |
+
<?php foreach ($loading_gifs as $key => $loading_gif) { ?>
|
146 |
+
<option value="<?php echo $key; ?>" <?php if ($global_options->loading_gif == $key) echo 'selected="selected"'; ?>><?php echo $loading_gif; ?></option>
|
147 |
+
<?php } ?>
|
148 |
+
</select>
|
149 |
+
<span class="button wds_fieldset_img_preview" onclick="wds_loading_preview()"><?php _e('Preview', WDS()->prefix); ?></span>
|
150 |
+
<div class="wds_fieldset_img">
|
151 |
+
<img id="load_gif_img" src="<?php echo WDS()->plugin_url . '/images/loading/' . $global_options->loading_gif . '.gif'; ?>" />
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
<div class="wd-group">
|
155 |
+
<label class="wd-label"><?php _e('Uninstall Slider WD', WDS()->prefix); ?></label>
|
156 |
+
<a class="button" href="<?php echo $uninstall_href ?>"><?php _e('Uninstall', WDS()->prefix); ?></a>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
<div class="wd-table-col wd-table-col-50 wd-table-col-right">
|
162 |
+
<div class="wd-box-section">
|
163 |
+
<div class="wd-box-title">
|
164 |
+
<strong><?php _e('Default options for layers', WDS()->prefix); ?></strong>
|
165 |
+
</div>
|
166 |
+
<div class="wd-box-content<?php echo (WDS()->is_free ? ' wd-free' : ''); ?>">
|
167 |
+
<?php
|
168 |
+
if ( WDS()->is_free ) {
|
169 |
+
echo WDW_S_Library::message_id(0, __('This functionality is disabled in free version.', WDS()->prefix), 'error');
|
170 |
+
}
|
171 |
+
?>
|
172 |
+
<div class="wd-group">
|
173 |
+
<label class="wd-label" for="default_layer_ffamily"><?php _e('Font', WDS()->prefix); ?></label>
|
174 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_google_fonts1" type="radio" name="default_layer_google_fonts" value="1" <?php echo (($global_options->default_layer_google_fonts) ? 'checked="checked"' : ''); ?> onchange="wds_change_fonts()" />
|
175 |
+
<label for="default_layer_google_fonts1"><?php _e('Google fonts', WDS()->prefix); ?></label>
|
176 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_google_fonts0" type="radio" name="default_layer_google_fonts" value="0" <?php echo (($global_options->default_layer_google_fonts) ? '' : 'checked="checked"'); ?> onchange="wds_change_fonts()" />
|
177 |
+
<label for="default_layer_google_fonts0"><?php _e('Default', WDS()->prefix); ?></label>
|
178 |
+
</div>
|
179 |
+
<div class="wd-group">
|
180 |
+
<label class="wd-label wds_default_label" for="default_layer_ffamily"><?php _e('Font family', WDS()->prefix); ?></label>
|
181 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" id="default_layer_ffamily" onchange="wds_change_fonts('', 1)" name="default_layer_ffamily">
|
182 |
+
<?php
|
183 |
+
$fonts = (isset($global_options->default_layer_google_fonts) && $global_options->default_layer_google_fonts) ? $google_fonts : $font_families;
|
184 |
+
foreach ($fonts as $key => $font_family) {
|
185 |
+
?>
|
186 |
+
<option value="<?php echo $key; ?>" <?php echo (($global_options->default_layer_ffamily == $key) ? 'selected="selected"' : ''); ?>><?php echo $font_family; ?></option>
|
187 |
+
<?php } ?>
|
188 |
+
</select>
|
189 |
+
</div>
|
190 |
+
<div class="wd-group">
|
191 |
+
<label class="wd-label" for="possib_add_ffamily_input"><?php _e('Add font-family', WDS()->prefix); ?></label>
|
192 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="text" id="possib_add_ffamily_input" value="" class="spider_box_input"/>
|
193 |
+
<input type="hidden" id="possib_add_ffamily" name="possib_add_ffamily" value="<?php echo $global_options->possib_add_ffamily; ?>"/>
|
194 |
+
<input type="hidden" id="possib_add_ffamily_google" name="possib_add_ffamily_google" value="<?php echo $global_options->possib_add_ffamily_google; ?>"/>
|
195 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="possib_add_google_fonts" type="checkbox" name="possib_add_google_fonts" value="1"/><label for="possib_add_google_fonts"><?php _e('Add to Google fonts', WDS()->prefix); ?></label>
|
196 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="add_font_family" class="button button-primary" type="button" onclick="set_ffamily_value();spider_set_input_value('task', 'save_font_family');spider_form_submit(event, 'sliders_form')" value="<?php _e('Add font-family', WDS()->prefix); ?>"/>
|
197 |
+
<p class="description"><?php _e('The added font family will appear in the drop-down list of fonts.', WDS()->prefix); ?></p>
|
198 |
+
</div>
|
199 |
+
<div class="wd-group">
|
200 |
+
<label class="wd-label wds_default_label" for="default_layer_fweight"><?php _e('Font weight', WDS()->prefix); ?></label>
|
201 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" id="default_layer_fweight" name="default_layer_fweight">
|
202 |
+
<?php foreach ($default_layer_fweights as $key => $default_layer_fweight) { ?>
|
203 |
+
<option value="<?php echo $key; ?>" <?php echo (($global_options->default_layer_fweight == $key) ? 'selected="selected"' : ''); ?>><?php echo $default_layer_fweight; ?></option>
|
204 |
+
<?php } ?>
|
205 |
+
</select>
|
206 |
+
</div>
|
207 |
+
<div class="wd-group">
|
208 |
+
<label class="wd-label wds_default_label" for="default_layer_effect_in"><?php _e('Effect In', WDS()->prefix); ?></label>
|
209 |
+
<span style="display: inline-block;">
|
210 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_start" class="spider_int_input" type="text" value="<?php echo $global_options->default_layer_start; ?>" name="default_layer_start"/> ms
|
211 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
212 |
+
</span>
|
213 |
+
<span style="display: inline-block;">
|
214 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="default_layer_effect_in" id="default_layer_effect_in">
|
215 |
+
<?php foreach ( $default_layer_effects_in as $key => $default_layer_effect_in ) { ?>
|
216 |
+
<option value="<?php echo $key; ?>" <?php echo ( $global_options->default_layer_effect_in == $key ) ? 'selected="selected"' : '' ?>><?php echo $default_layer_effect_in; ?></option>
|
217 |
+
<?php } ?>
|
218 |
+
</select>
|
219 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
220 |
+
</span>
|
221 |
+
<span style="display: inline-block;">
|
222 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_duration_eff_in" class="spider_int_input" type="text" value="<?php echo $global_options->default_layer_duration_eff_in; ?>" name="default_layer_duration_eff_in"/>ms
|
223 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
224 |
+
</span>
|
225 |
+
<span style="display: inline-block;">
|
226 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_infinite_in" type="text" name="default_layer_infinite_in" value="<?php echo $global_options->default_layer_infinite_in; ?>" class="spider_int_input" title="<?php _e('0 for play infinte times', WDS()->prefix);?>" />
|
227 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
228 |
+
</span>
|
229 |
+
</div>
|
230 |
+
<div class="wd-group">
|
231 |
+
<label class="wd-label wds_default_label" for="default_layer_effect_out"><?php _e('Effect Out', WDS()->prefix); ?></label>
|
232 |
+
<span style="display: inline-block;">
|
233 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_end" class="spider_int_input" type="text" value="<?php echo $global_options->default_layer_end; ?>" name="default_layer_end">ms
|
234 |
+
<p class="description"><?php _e('Start', WDS()->prefix); ?></p>
|
235 |
+
</span>
|
236 |
+
<span style="display: inline-block;">
|
237 |
+
<select <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> class="select_icon select_icon_320" name="default_layer_effect_out" id="default_layer_effect_out" style="width:150px;">
|
238 |
+
<?php foreach ($default_layer_effects_out as $key => $default_layer_effect_out) { ?>
|
239 |
+
<option value="<?php echo $key; ?>" <?php echo ( $global_options->default_layer_effect_out == $key ) ? 'selected="selected"' : '' ?>><?php echo $default_layer_effect_out; ?></option>
|
240 |
+
<?php
|
241 |
+
}
|
242 |
+
?>
|
243 |
+
</select>
|
244 |
+
<p class="description"><?php _e('Effect', WDS()->prefix); ?></p>
|
245 |
+
</span>
|
246 |
+
<span style="display: inline-block;">
|
247 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_duration_eff_out" class="spider_int_input" type="text" onkeypress="return spider_check_isnum(event)" value="<?php echo $global_options->default_layer_duration_eff_out; ?>" name="default_layer_duration_eff_out">ms
|
248 |
+
<p class="description"><?php _e('Duration', WDS()->prefix); ?></p>
|
249 |
+
</span>
|
250 |
+
<span style="display: inline-block;">
|
251 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_infinite_out" type="text" name="default_layer_infinite_out" value="<?php echo $global_options->default_layer_infinite_out; ?>" class="spider_int_input" title="<?php _e('0 for play infinte times', WDS()->prefix); ?>" />
|
252 |
+
<p class="description"><?php _e('Iteration', WDS()->prefix); ?></p>
|
253 |
+
</span>
|
254 |
+
</div>
|
255 |
+
<div class="wd-group">
|
256 |
+
<label class="wd-label wds_default_label" for="default_layer_add_class"><?php _e('Add class', WDS()->prefix); ?></label>
|
257 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> id="default_layer_add_class" class="spider_char_input" type="text" value="<?php echo $global_options->default_layer_add_class; ?>" name="default_layer_add_class" />
|
258 |
+
</div>
|
259 |
+
<div class="wd-group">
|
260 |
+
<input <?php echo (WDS()->is_free ? 'disabled="disabled" title="' . __('This functionality is disabled in free version.', WDS()->prefix) . '"' : ''); ?> type="button" class="button button-primary" onclick="wds_set_one(); wds_invent_default_layer_check();" value="<?php _e('Apply to existing layers', WDS()->prefix); ?>" />
|
261 |
+
</div>
|
262 |
+
</div>
|
263 |
+
</div>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
<div class="wds_opacity_set" onclick="jQuery('.wds_opacity_set').hide();jQuery('.wds_set').hide();"></div>
|
267 |
+
<div class="wds_set">
|
268 |
+
<table>
|
269 |
+
<tbody class="choose_slider_tbody">
|
270 |
+
<tr>
|
271 |
+
<td colspan="2">
|
272 |
+
<select class="select_icon select_icon_320" id="choose_slider" name="choose_slider">
|
273 |
+
<?php foreach ($slider
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|