PluginProbe
Visual Slider / trunk
Visual Slider vtrunk
visual-slider / admin / slider-array.php

slider-array.php in Visual Slider trunk, at admin/slider-array.php

621 lines 17.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly.
4 }
5 /*****************************************************************************************************************************************************
6 ******************************************************************************************************************************************************
7
8 Radius Mini
9
10 */////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11
12 /*****************************************************************************************************************************************************
13 ******************************************************************************************************************************************************
14
15 Radius Mini
16
17 */////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
18 if(is_admin()){
19 if( ! function_exists( 'vs_array_options' ) ) {
20 function vs_array_options($value) {
21
22
23 $page_args = array(
24 'sort_order' => 'asc',
25 'sort_column' => 'post_title',
26 'hierarchical' => 1,
27 sanitize_key('meta_value') => '1',
28 'child_of' => 0,
29 'parent' => -1,
30 'post_type' => 'visual-slider',
31 'post_status' => 'publish'
32 );
33
34 $options_page = array();
35 $options_page_obj =get_posts($page_args);
36 $options_page[''] = __('Default','visual-slider');
37
38 if(!empty($options_page_obj) && is_array($options_page_obj) ){
39 foreach ($options_page_obj as $rezapage) {
40 $options_page[$rezapage->ID] = $rezapage->post_title;
41 }
42 }
43
44 $options['visualslider_loop'] = $options_page;
45
46 $options['unit']= array(
47 'px' => 'px',
48 '%' => '%',
49 'em' => 'em',
50
51 );
52
53 $options['align']= array(
54 'left' => is_rtl() ? esc_html__('Right','visual-slider'):esc_html__('Left','visual-slider'),
55 'center' => esc_html__('Center','visual-slider'),
56 'right' => is_rtl() ? esc_html__('Left','visual-slider'):esc_html__('Right','visual-slider'),
57
58 );
59
60 $options['align_mini']= array(
61 'left' => is_rtl() ? esc_html__('Right','visual-slider'):esc_html__('Left','visual-slider'),
62 'right' => is_rtl() ? esc_html__('Left','visual-slider'):esc_html__('Right','visual-slider'),
63
64 );
65 $options['button'] = array(
66 'style-1' => esc_html__('Style 1','visual-slider'),
67 'style-2' => esc_html__('Style 2:Top Border inset','visual-slider'),
68 'style-3' => esc_html__('Style 3:Bottom Border inset','visual-slider'),
69 'style-4' => is_rtl()? __('Style 5:Right Border inset','visual-slider'): __('Style 4:Left Border inset','visual-slider'),
70 'style-5' => is_rtl()? __('Style 4:Left Border inset','visual-slider'): __('Style 5:Right Border inset','visual-slider'),
71 'style-6' => esc_html__('Style 6:Icon Background color','visual-slider'),
72 'style-7' => esc_html__('Style 7:none boxed','visual-slider'),
73 );
74 $options['border_style']= array(
75
76 'solid' =>esc_html__('Solid','visual-slider'),
77 'dotted' => esc_html__('Dotted','visual-slider'),
78 'dashed' => esc_html__('Dashed','visual-slider'),
79 'double' => esc_html__('Double','visual-slider'),
80 'groove' => esc_html__('Groove','visual-slider'),
81
82
83
84 );
85
86
87
88 $options['image_position']= array(
89 '' => __('Default','visual-slider'),
90 'center' => __('Center','visual-slider'),
91 'left' => is_rtl()?__('Right','visual-slider'):__('Left','visual-slider'),
92 'left top' => is_rtl()?__('Right Top','visual-slider'): __('Left Top','visual-slider'),
93 'left bottom' => is_rtl()?__('Right Bottom','visual-slider'):__('Left Bottom','visual-slider'),
94 'left center' => is_rtl()?__('Right Center','visual-slider'): __('Left Center','visual-slider'),
95 'right' => is_rtl()? __('Left','visual-slider'):__('Right','visual-slider'),
96 'right top' => is_rtl()? __('Left Top','visual-slider'): __('Right Top','visual-slider'),
97 'right bottom' => is_rtl()? __('Left Bottom','visual-slider'): __('Right Bottom','visual-slider'),
98 'right center' => is_rtl()? __('Left Center','visual-slider'): __('Right Center','visual-slider'),
99 'top' => __('Top','visual-slider'),
100 'top center' => __('Top Center','visual-slider'),
101 'bottom' => __('Bottom','visual-slider'),
102 'bottom center' => __('Bottom Center','visual-slider'),
103 );
104
105
106
107
108
109 if(is_rtl()){
110 $options['fontfamily']= array(
111 '' => 'پیشفرض',
112 'vs-iransans' => 'ایران سنس',
113 'vs-vazir' => 'وزیر',
114 'vs-yekan' => 'یکان',
115 "vs-sahel" => "ساحل",
116 "vs-parastoo" => "پرستو",
117 "vs-samim" => "ص�
118 ی�
119 ",
120 "vs-shabnam" => "شبن�
121 ",
122 "vs-nahid" => "ناهید",
123 "vs-segoe" => 'سگو',
124 "vs-tahoma" => "تاهو�
125 ا",
126 );
127 }else{
128 $options['fontfamily']= vs_google_fonts();
129
130 }
131
132
133
134
135
136
137 return $options[$value];
138 }
139 }
140 if( ! function_exists( 'vs_multi_array_options' ) ) {
141 function vs_multi_array_options($value) {
142 $options['background2'] =array(
143 array( "id" => "first",
144 "type" => "color_rgba",
145 ),
146 array(
147 "id" => "second",
148 "type" => "color_rgba",
149 ),
150
151 array(
152 "id" => "orientation",
153 "type" => "select",
154 "options" => array(
155 "horizontal" => esc_html__('→','visual-slider'),
156 "vertical" => esc_html__('↓','visual-slider'),
157 "diagonal" => esc_html__('↘','visual-slider'),
158 "diagonal-bottom" => esc_html__('↗','visual-slider'),
159 "radial" => esc_html__('○','visual-slider'),
160
161 ),
162 ),
163 );
164 $options['layer_padding'] = array(
165 array(
166 "name_bottom" => esc_html__('Top','visual-slider'),
167 "id" => "top",
168 "width" => "40px",
169 "min" => "-1000",
170 "max" => "10000",
171 "type" => "number",
172 ),
173 array(
174 "name_bottom" => is_rtl()? __('Left','visual-slider'):__('Right','visual-slider'),
175 "id" => "right",
176 "width" => "40px",
177 "min" => "-1000",
178 "max" => "10000",
179 "type" => "number",
180 ),
181 array(
182 "name_bottom" => esc_html__('Bottom','visual-slider'),
183 "id" => "bottom",
184 "width" => "40px",
185 "min" => "-1000",
186 "max" => "10000",
187 "type" => "number",
188 ),
189 array(
190 "name_bottom" => is_rtl()? __('Right','visual-slider'): __('Left','visual-slider'),
191 "id" => "left",
192 "width" => "40px",
193 "min" => "-1000",
194 "max" => "10000",
195 "type" => "number",
196 ),
197 array(
198 "name_bottom" => __('Unit','visual-slider'),
199 "id" => "unit",
200 "type" => "select",
201 "width" => "auto",
202 "options" => vs_array_options('unit'),
203 ),
204 );
205
206
207
208
209 $options['margin'] = array(
210 array(
211 "name" => esc_html__('Top','visual-slider'),
212 "id" => "top",
213 "width" => "40px",
214 "min" => "-10000",
215 "max" => "10000",
216 "type" => "number",
217 ),
218 array(
219 "name" => is_rtl()? __('Left','visual-slider'):__('Right','visual-slider'),
220 "id" => "right",
221 "width" => "40px",
222 "min" => "-10000",
223 "max" => "10000",
224 "type" => "number",
225 ),
226 array(
227 "name" => esc_html__('Bottom','visual-slider'),
228 "id" => "bottom",
229 "width" => "40px",
230 "max" => "10000",
231 "type" => "number",
232 ),
233 array(
234 "name" => is_rtl()? __('Right','visual-slider'): __('Left','visual-slider'),
235 "id" => "left",
236 "width" => "40px",
237 "min" => "-10000",
238 "max" => "10000",
239 "type" => "number",
240 ),
241 array(
242 "name" => __('Uint','visual-slider'),
243 "id" => "unit",
244 "type" => "select",
245 "width" => "auto",
246
247 "options" => vs_array_options('unit'),
248 ),
249 );
250
251
252 $options['padding'] = array(
253 array(
254 "name" => esc_html__('Top','visual-slider'),
255 "id" => "top",
256 "width" => "40px",
257 "max" => "10000",
258 "type" => "number",
259 ),
260 array(
261 "name" => is_rtl()? __('Left','visual-slider'):__('Right','visual-slider'),
262 "id" => "right",
263 "width" => "40px",
264 "max" => "10000",
265 "type" => "number",
266 ),
267 array(
268 "name" => esc_html__('Bottom','visual-slider'),
269 "id" => "bottom",
270 "width" => "40px",
271 "max" => "10000",
272 "type" => "number",
273 ),
274 array(
275 "name" => is_rtl()? __('Right','visual-slider'): __('Left','visual-slider'),
276 "id" => "left",
277 "width" => "40px",
278 "max" => "10000",
279 "type" => "number",
280 ),
281 array(
282 "name" => __('Uint','visual-slider'),
283 "id" => "unit",
284 "type" => "select",
285 "width" => "auto",
286
287 "options" => vs_array_options('unit'),
288 ),
289 );
290
291
292
293 $options['text_shadow'] = array(
294 array(
295 "name_bottom" => esc_html__('Horizontal','visual-slider'),
296 "id" => "horizontal",
297 "width" => "40px",
298 "min" => "-1000",
299 "max" => "10000",
300
301 "type" => "number",
302 ),
303 array(
304 "name_bottom" => esc_html__('Vertical','visual-slider'),
305 "id" => "vertical",
306 "width" => "40px",
307 "min" => "-1000",
308 "max" => "10000",
309
310 "type" => "number",
311 ),
312 array(
313 "name_bottom" => esc_html__('Blur','visual-slider'),
314 "id" => "blur",
315 "width" => "40px",
316 "min" => "0",
317 "max" => "10000",
318 "type" => "number",
319 ),
320
321 array(
322 "name_bottom" => esc_html__('Color','visual-slider'),
323 "id" => "color",
324 "type" => "color_rgba",
325 ),
326
327 );
328
329
330 $options['border'] = array(
331 array(
332 "name" => esc_html__('Top','visual-slider'),
333 "id" => "top",
334 "width" => "40px",
335 "min" => "0",
336 "max" => "10000",
337 "unit" => "px",
338 "type" => "number",
339 ),
340 array(
341 "name" => is_rtl()?__('Left','visual-slider'):__('Right','visual-slider'),
342 "id" => "right",
343 "width" => "40px",
344 "min" => "0",
345 "max" => "10000",
346 "unit" => "px",
347 "type" => "number",
348 ),
349 array(
350 "name" => esc_html__('Bottom','visual-slider'),
351 "id" => "bottom",
352 "width" => "40px",
353 "min" => "0",
354 "max" => "10000",
355 "unit" => "px",
356 "type" => "number",
357 ),
358 array(
359 "name" => is_rtl()?__('Right','visual-slider'):__('Left','visual-slider'),
360 "id" => "left",
361 "width" => "40px",
362 "min" => "0",
363 "max" => "10000",
364 "unit" => "px",
365 "type" => "number",
366 ),
367
368 array(
369 "name" => esc_html__('Style','visual-slider'),
370 "id" => "style",
371 "type" => "select",
372 "width" => "auto",
373 "options" => vs_array_options('border_style'),
374 ),
375
376 array(
377 "name" => esc_html__('Color','visual-slider'),
378 "id" => "color",
379 "type" => "color_rgba",
380 ),
381 );
382
383 $options['layer_border'] = array(
384 array(
385 "name_bottom" => esc_html__('Top','visual-slider'),
386 "id" => "top",
387 "width" => "40px",
388 "type" => "number",
389 ),
390 array(
391 "name_bottom" => is_rtl()?__('Left','visual-slider'):__('Right','visual-slider'),
392 "id" => "right",
393 "width" => "40px",
394 "type" => "number",
395 ),
396 array(
397 "name_bottom" => esc_html__('Bottom','visual-slider'),
398 "id" => "bottom",
399 "width" => "40px",
400 "type" => "number",
401 ),
402 array(
403 "name_bottom" => is_rtl()?__('Right','visual-slider'):__('Left','visual-slider'),
404 "id" => "left",
405 "width" => "40px",
406 "type" => "number",
407 ),
408
409 array(
410 "name_bottom" => esc_html__('Style','visual-slider'),
411 "id" => "style",
412 "type" => "select",
413 "width" => "auto",
414 "width" => "70px",
415 "options" => vs_array_options('border_style'),
416 ),
417
418 array(
419 "name_bottom" => esc_html__('Color','visual-slider'),
420 "id" => "color",
421 "type" => "color_rgba",
422 ),
423 );
424
425
426
427 $options['shadow'] = array(
428 array(
429 "name" => esc_html__('Horizontal','visual-slider'),
430 "id" => "horizontal",
431 "width" => "40px",
432 "min" => "-10000",
433 "unit" => "px",
434 "type" => "number",
435 ),
436 array(
437 "name" => esc_html__('Vertical','visual-slider'),
438 "id" => "vertical",
439 "width" => "40px",
440 "min" => "-10000",
441 "unit" => "px",
442 "type" => "number",
443 ),
444 array(
445 "name" => esc_html__('Blur','visual-slider'),
446 "id" => "blur",
447 "width" => "40px",
448 "unit" => "px",
449 "type" => "number",
450 ),
451 array(
452 "name" => esc_html__('Spread','visual-slider'),
453 "id" => "spread",
454 "unit" => "px",
455 "width" => "40px",
456 "type" => "number",
457 ),
458
459 array(
460 "name" => esc_html__('Color','visual-slider'),
461 "id" => "color",
462 "type" => "color_rgba",
463 ),
464 array(
465
466 "name" => esc_html__('Position','visual-slider'),
467 "id" => "position",
468 "type" => "select",
469 "width" => "auto",
470 "options" => array(
471 "" => esc_html__('Outset','visual-slider'),
472 "inset" => esc_html__('Inset','visual-slider'),
473 ),
474 ),
475 );
476
477
478 $options['layer_shadow'] = array(
479 array(
480 "name_bottom" => esc_html__('Horizontal','visual-slider'),
481 "id" => "horizontal",
482 "width" => "40px",
483 "min" => "-10000",
484 "type" => "number",
485 ),
486 array(
487 "name_bottom" => esc_html__('Vertical','visual-slider'),
488 "id" => "vertical",
489 "width" => "40px",
490 "min" => "-10000",
491 "type" => "number",
492 ),
493 array(
494 "name_bottom" => esc_html__('Blur','visual-slider'),
495 "id" => "blur",
496 "width" => "40px",
497 "type" => "number",
498 ),
499 array(
500 "name_bottom" => esc_html__('Spread','visual-slider'),
501 "id" => "spread",
502 "width" => "40px",
503 "type" => "number",
504 ),
505
506 array(
507 "name_bottom" => esc_html__('Color','visual-slider'),
508 "id" => "color",
509 "type" => "color_rgba",
510 ),
511 array(
512 "name_bottom" => esc_html__('Position','visual-slider'),
513 "id" => "position",
514 "type" => "select",
515 "width" => "auto",
516 "options" => array(
517 "" => esc_html__('Outset','visual-slider'),
518 "inset" => esc_html__('Inset','visual-slider'),
519 ),
520 ),
521 );
522
523
524
525
526 $options['radius'] = array(
527 array(
528 "name" => is_rtl()? esc_html__('Top Right','visual-slider'): esc_html__('Top Left','visual-slider'),
529 "id" => "top_left",
530 "width" => "40px",
531 "min" => "0",
532 "max" => "10000",
533 "unit" => "px",
534 "type" => "number",
535 ),
536 array(
537 "name" => is_rtl()? esc_html__('Top Left','visual-slider'): esc_html__('Top Right','visual-slider'),
538 "id" => "top_right",
539 "width" => "40px",
540 "min" => "0",
541 "max" => "10000",
542 "unit" => "px",
543 "type" => "number",
544 ),
545 array(
546 "name" => is_rtl()? esc_html__('Bottom Left','visual-slider'):esc_html__('Buttom Right','visual-slider'),
547 "id" => "bottom_right",
548 "width" => "40px",
549 "min" => "0",
550 "max" => "10000",
551 "unit" => "px",
552 "type" => "number",
553 ),
554 array(
555 "name" => is_rtl()? esc_html__('Bottom Right','visual-slider'):esc_html__('Bottom Left','visual-slider'),
556 "id" => "bottom_left",
557 "width" => "40px",
558 "min" => "0",
559 "max" => "10000",
560 "unit" => "px",
561 "type" => "number",
562 ),
563
564
565 );
566
567
568
569 $options['layer_radius'] = array(
570 array(
571 "name_bottom" => is_rtl()? esc_html__('Top Right','visual-slider'): esc_html__('Top Left','visual-slider'),
572 "id" => "top_left",
573 "width" => "60px",
574 "type" => "number",
575 ),
576 array(
577 "name_bottom" => is_rtl()? esc_html__('Top Left','visual-slider'): esc_html__('Top Right','visual-slider'),
578 "id" => "top_right",
579 "width" => "60px",
580 "type" => "number",
581 ),
582 array(
583 "name_bottom" =>is_rtl()? esc_html__('Bottom Left','visual-slider'):esc_html__('Buttom Right','visual-slider'),
584 "id" => "bottom_right",
585 "width" => "60px",
586 "type" => "number",
587 ),
588 array(
589 "name_bottom" => is_rtl()? esc_html__('Bottom Right','visual-slider'):esc_html__('Bottom Left','visual-slider'),
590 "id" => "bottom_left",
591 "width" => "60px",
592 "type" => "number",
593 ),
594
595
596 );
597
598
599 $options['size'] = array(
600 array(
601 "name" => __('Width','visual-slider'),
602 "id" => "width",
603 "type" => "number",
604 "width" => "60px",
605 "unit" => "px",
606 ),
607 array(
608 "name" => __('Height','visual-slider'),
609 "id" => "height",
610 "type" => "number",
611 "unit" => "px",
612 "width" => "60px",
613 ),
614
615 );
616 return $options[$value];
617
618 }
619 }
620 }
621 ?>