PluginProbe ʕ •ᴥ•ʔ
Slider Ultimate / 2.0.8
Slider Ultimate v2.0.8
trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9
ultimate-slider / includes / Settings.class.php
ultimate-slider / includes Last commit date
BackwardsCompatibility.class.php 4 years ago Blocks.class.php 4 years ago CustomPostTypes.class.php 4 years ago Dashboard.class.php 4 years ago DeactivationSurvey.class.php 4 years ago InstallationWalkthrough.class.php 4 years ago Permissions.class.php 4 years ago ReviewAsk.class.php 4 years ago Settings.class.php 4 years ago Widgets.class.php 4 years ago WooCommerceIntegration.class.php 4 years ago template-functions.php 4 years ago
Settings.class.php
910 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit;
3
4 if ( ! class_exists( 'ewdusSettings' ) ) {
5 /**
6 * Class to handle configurable settings for Ultimate Slider
7 * @since 1.0.0
8 */
9 class ewdusSettings {
10
11 /**
12 * Default values for settings
13 * @since 1.0.0
14 */
15 public $defaults = array();
16
17 /**
18 * Stored values for settings
19 * @since 1.0.0
20 */
21 public $settings = array();
22
23 public function __construct() {
24
25 add_action( 'init', array( $this, 'set_defaults' ) );
26
27 add_action( 'init', array( $this, 'load_settings_panel' ) );
28 }
29
30 /**
31 * Load the plugin's default settings
32 * @since 1.0.0
33 */
34 public function set_defaults() {
35
36 $this->defaults = array(
37
38 'timer-bar' => 'bottom',
39 'autoplay-delay' => 6,
40 'autoplay-interval' => 6,
41 'transition-time' => 1,
42 'aspect-ratio' => '16_7',
43 'mobile-aspect-ratio' => '16_7',
44 'arrow' => 'a',
45 'hide-from-slider' => array(),
46 'hide-on-mobile' => array(),
47 );
48
49 $this->defaults = apply_filters( 'ewd_us_defaults', $this->defaults );
50 }
51
52 /**
53 * Get a setting's value or fallback to a default if one exists
54 * @since 1.0.0
55 */
56 public function get_setting( $setting ) {
57
58 if ( empty( $this->settings ) ) {
59 $this->settings = get_option( 'ewd-us-settings' );
60 }
61
62 if ( ! empty( $this->settings[ $setting ] ) or isset( $this->settings[ $setting ] ) ) {
63 return apply_filters( 'ewd-us-settings-' . $setting, $this->settings[ $setting ] );
64 }
65
66 if ( ! empty( $this->defaults[ $setting ] ) or isset( $this->defaults[ $setting ] ) ) {
67 return apply_filters( 'ewd-us-settings-' . $setting, $this->defaults[ $setting ] );
68 }
69
70 return apply_filters( 'ewd-us-settings-' . $setting, null );
71 }
72
73 /**
74 * Set a setting to a particular value
75 * @since 1.0.0
76 */
77 public function set_setting( $setting, $value ) {
78
79 $this->settings[ $setting ] = $value;
80 }
81
82 /**
83 * Save all settings, to be used with set_setting
84 * @since 1.0.0
85 */
86 public function save_settings() {
87
88 update_option( 'ewd-us-settings', $this->settings );
89 }
90
91 /**
92 * Load the admin settings page
93 * @since 1.0.0
94 * @sa https://github.com/NateWr/simple-admin-pages
95 */
96 public function load_settings_panel() {
97 global $ewd_us_controller;
98
99 require_once( EWD_US_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php' );
100 $sap = sap_initialize_library(
101 $args = array(
102 'version' => '2.6.1',
103 'lib_url' => EWD_US_PLUGIN_URL . '/lib/simple-admin-pages/',
104 'theme' => 'purple',
105 )
106 );
107
108 $sap->add_page(
109 'submenu',
110 array(
111 'id' => 'ewd-us-settings',
112 'title' => __( 'Settings', 'ultimate-slider' ),
113 'menu_title' => __( 'Settings', 'ultimate-slider' ),
114 'parent_menu' => 'edit.php?post_type=ultimate_slider',
115 'description' => '',
116 'capability' => 'manage_options',
117 'default_tab' => 'ewd-us-basic-tab',
118 )
119 );
120
121 $sap->add_section(
122 'ewd-us-settings',
123 array(
124 'id' => 'ewd-us-basic-tab',
125 'title' => __( 'Basic', 'ultimate-slider' ),
126 'is_tab' => true,
127 )
128 );
129
130 $sap->add_section(
131 'ewd-us-settings',
132 array(
133 'id' => 'ewd-us-basic-options',
134 'title' => __( 'Basic Options', 'ultimate-slider' ),
135 'tab' => 'ewd-us-basic-tab',
136 )
137 );
138
139 $sap->add_setting(
140 'ewd-us-settings',
141 'ewd-us-basic-options',
142 'warningtip',
143 array(
144 'id' => 'shortcodes-reminder',
145 'title' => __( 'REMINDER:', 'ultimate-slider' ),
146 'placeholder' => __( 'To display the slider, place the [ultimate-slider] shortcode on a page' )
147 )
148 );
149
150 $sap->add_setting(
151 'ewd-us-settings',
152 'ewd-us-basic-options',
153 'textarea',
154 array(
155 'id' => 'custom-css',
156 'title' => __( 'Custom CSS', 'ultimate-slider' ),
157 'description' => __( 'You can add custom CSS styles to your slider in the box above.', 'ultimate-slider' ), )
158 );
159
160 $sap->add_setting(
161 'ewd-us-settings',
162 'ewd-us-basic-options',
163 'toggle',
164 array(
165 'id' => 'autoplay-slideshow',
166 'title' => __( 'Autoplay Slideshow', 'ultimate-slider' ),
167 'description' => __( 'Should the slider automatically toggle through slides?', 'ultimate-slider' )
168 )
169 );
170
171 $sap->add_setting(
172 'ewd-us-settings',
173 'ewd-us-basic-options',
174 'count',
175 array(
176 'id' => 'autoplay-delay',
177 'title' => __( 'Autoplay Delay', 'ultimate-slider' ),
178 'description' => __( 'If autoplay is on, how many seconds should the timer wait before starting the slideshow?', 'ultimate-slider' ),
179 'default' => $this->defaults['autoplay-delay'],
180 'blank_option' => false,
181 'min_value' => 1,
182 'max_value' => 60,
183 'increment' => 1,
184 'conditional_on' => 'autoplay-slideshow',
185 'conditional_on_value' => true
186 )
187 );
188
189 $sap->add_setting(
190 'ewd-us-settings',
191 'ewd-us-basic-options',
192 'count',
193 array(
194 'id' => 'autoplay-interval',
195 'title' => __( 'Autoplay Interval', 'ultimate-slider' ),
196 'description' => __( 'If autoplay is on, how many seconds should the slideshow wait between each slide?', 'ultimate-slider' ),
197 'default' => $this->defaults['autoplay-interval'],
198 'blank_option' => false,
199 'min_value' => 1,
200 'max_value' => 60,
201 'increment' => 1,
202 'conditional_on' => 'autoplay-slideshow',
203 'conditional_on_value' => true
204 )
205 );
206
207 $sap->add_setting(
208 'ewd-us-settings',
209 'ewd-us-basic-options',
210 'toggle',
211 array(
212 'id' => 'autoplay-pause-hover',
213 'title' => __( 'Pause Autoplay on Hover', 'ultimate-slider' ),
214 'description' => __( 'Should the slider autoplay automatically pause when you hover over it?', 'ultimate-slider' ),
215 'conditional_on' => 'autoplay-slideshow',
216 'conditional_on_value' => true
217 )
218 );
219
220 $sap->add_setting(
221 'ewd-us-settings',
222 'ewd-us-basic-options',
223 'count',
224 array(
225 'id' => 'transition-time',
226 'title' => __( 'Slide Transition Time', 'ultimate-slider' ),
227 'description' => __( 'How many seconds should each transition take to complete?', 'ultimate-slider' ),
228 'default' => $this->defaults['transition-time'],
229 'blank_option' => false,
230 'min_value' => 1,
231 'max_value' => 10,
232 'increment' => 1
233 )
234 );
235
236 $sap->add_setting(
237 'ewd-us-settings',
238 'ewd-us-basic-options',
239 'select',
240 array(
241 'id' => 'aspect-ratio',
242 'title' => __( 'Aspect Ratio', 'ultimate-slider' ),
243 'description' => '',
244 'blank_option' => false,
245 'default' => $this->defaults['aspect-ratio'],
246 'options' => array(
247 '3_1' => '3:1',
248 '16_7' => '16:7' . __( '(default)', 'ultimate-slider' ),
249 '2_1' => '2:1',
250 '16_9' => '16:9',
251 '3_2' => '3:2',
252 '4_3' => '4:3',
253 '1_1' => '1:1',
254 )
255 )
256 );
257
258 $sap->add_setting(
259 'ewd-us-settings',
260 'ewd-us-basic-options',
261 'toggle',
262 array(
263 'id' => 'carousel',
264 'title' => __( 'Carousel', 'ultimate-slider' ),
265 'description' => __( 'Display a carousel slider instead of the default. The "Slide Transition Effect" setting has to be set to "Default".', 'ultimate-slider' )
266 )
267 );
268
269 $sap->add_setting(
270 'ewd-us-settings',
271 'ewd-us-basic-options',
272 'radio',
273 array(
274 'id' => 'carousel-columns',
275 'title' => __( 'Carousel Columns', 'ultimate-slider' ),
276 'description' => __( 'Set the number of slides that should be displayed at once in carousel mode', 'ultimate-slider' ),
277 'options' => array(
278 2 => 2,
279 3 => 3,
280 4 => 4
281 ),
282 'conditional_on' => 'carousel',
283 'conditional_on_value' => true
284 )
285 );
286
287 $sap->add_setting(
288 'ewd-us-settings',
289 'ewd-us-basic-options',
290 'radio',
291 array(
292 'id' => 'timer-bar',
293 'title' => __( 'Timer Bar', 'ultimate-slider' ),
294 'description' => __( 'Display a timer bar at the top or bottom of your slider.', 'ultimate-slider' ),
295 'options' => array(
296 'top' => __( 'Top', 'ultimate-slider' ),
297 'bottom' => __( 'Bottom', 'ultimate-slider' ),
298 'off' => __( 'Off', 'ultimate-slider' )
299 )
300 )
301 );
302
303 $sap->add_setting(
304 'ewd-us-settings',
305 'ewd-us-basic-options',
306 'radio',
307 array(
308 'id' => 'slide-indicators',
309 'title' => __( 'Slide Indicators', 'ultimate-slider' ),
310 'description' => __( 'Display navigation controls to jump between slides.', 'ultimate-slider' ),
311 'options' => array(
312 'none' => __( 'None', 'ultimate-slider' ),
313 'dots' => __( 'Dots', 'ultimate-slider' ),
314 'thumbnails' => __( 'Thumbnails', 'ultimate-slider' ),
315 'sidethumbnails' => __( 'Side Thumbnails', 'ultimate-slider' )
316 )
317 )
318 );
319
320 $sap->add_setting(
321 'ewd-us-settings',
322 'ewd-us-basic-options',
323 'radio',
324 array(
325 'id' => 'link-action',
326 'title' => __( 'Button Link Action', 'ultimate-slider' ),
327 'description' => __( 'Should button links open in the same or new windows? "Smart" opens external links in new windows and links on your site in the same window.', 'ultimate-slider' ),
328 'options' => array(
329 'same' => __( 'Same Window', 'ultimate-slider' ),
330 'new' => __( 'New Window', 'ultimate-slider' ),
331 'smart' => __( 'Smart', 'ultimate-slider' )
332 )
333 )
334 );
335
336 if ( ! $ewd_us_controller->permissions->check_permission( 'premium' ) ) {
337 $ewd_us_premium_permissions = array(
338 'disabled' => true,
339 'disabled_image'=> '#',
340 'purchase_link' => 'https://www.etoilewebdesign.com/plugins/ultimate-slider/'
341 );
342 }
343 else { $ewd_us_premium_permissions = array(); }
344
345 $sap->add_section(
346 'ewd-us-settings',
347 array(
348 'id' => 'ewd-us-premium-tab',
349 'title' => __( 'Premium', 'ultimate-slider' ),
350 'is_tab' => true,
351 )
352 );
353
354 $sap->add_section(
355 'ewd-us-settings',
356 array_merge(
357 array(
358 'id' => 'ewd-us-premium-options',
359 'title' => __( 'Premium Options', 'ultimate-slider' ),
360 'tab' => 'ewd-us-premium-tab',
361 ),
362 $ewd_us_premium_permissions
363 )
364 );
365
366 $sap->add_setting(
367 'ewd-us-settings',
368 'ewd-us-premium-options',
369 'radio',
370 array(
371 'id' => 'slide-transition-effect',
372 'title' => __( 'Slide Transition Effect', 'ultimate-slider' ),
373 'description' => __( 'Which effect should be used to transition between slides?', 'ultimate-slider' ),
374 'options' => array(
375 'slide' => __( 'Default', 'ultimate-slider' ),
376 'fade' => __( 'Fade', 'ultimate-slider' ),
377 'slide-up' => __( 'Slide Up', 'ultimate-slider' ),
378 'slide-down' => __( 'Slide Down', 'ultimate-slider' ),
379 'stretch-right' => __( 'Stretch Right', 'ultimate-slider' ),
380 'stretch-left' => __( 'Stretch Left', 'ultimate-slider' ),
381 'grow' => __( 'Grow', 'ultimate-slider' ),
382 'expand' => __( 'Expand', 'ultimate-slider' ),
383 )
384 )
385 );
386
387 $sap->add_setting(
388 'ewd-us-settings',
389 'ewd-us-premium-options',
390 'toggle',
391 array(
392 'id' => 'wc-product-image-slider',
393 'title' => __( 'WooCommerce Product Image Slider', 'ultimate-slider' ),
394 'description' => __( 'Should the WooCommerce product page image be converted into a slider when there\'s more than one image? (Might require changing the "Aspect Ratio" setting for the slider, depending on the theme you\'re using)', 'ultimate-slider' )
395 )
396 );
397
398 $sap->add_setting(
399 'ewd-us-settings',
400 'ewd-us-premium-options',
401 'select',
402 array(
403 'id' => 'mobile-aspect-ratio',
404 'title' => __( 'Mobile Aspect Ratio', 'ultimate-slider' ),
405 'description' => __( 'What should the aspect ratio of the slider be on smaller screens?', 'ultimate-slider' ),
406 'blank_option' => false,
407 'default' => $this->defaults['mobile-aspect-ratio'],
408 'options' => array(
409 '3_1' => '3:1',
410 '16_7' => '16:7' . __( '(default)', 'ultimate-slider' ),
411 '2_1' => '2:1',
412 '16_9' => '16:9',
413 '3_2' => '3:2',
414 '4_3' => '4:3',
415 '1_1' => '1:1',
416 )
417 )
418 );
419
420 $sap->add_setting(
421 'ewd-us-settings',
422 'ewd-us-premium-options',
423 'checkbox',
424 array(
425 'id' => 'hide-from-slider',
426 'title' => __( 'Hide Elements from Slider', 'ultimate-slider' ),
427 'description' => __( 'Hide specific elements of the slider.', 'ultimate-slider' ),
428 'options' => array(
429 'title' => 'Title',
430 'body' => 'Body',
431 'buttons' => 'Buttons',
432 'arrows' => 'Arrows',
433 )
434 )
435 );
436
437 $sap->add_setting(
438 'ewd-us-settings',
439 'ewd-us-premium-options',
440 'checkbox',
441 array(
442 'id' => 'hide-on-mobile',
443 'title' => __( 'Hide Elements from Mobile View', 'ultimate-slider' ),
444 'description' => __( 'Hide elements just from the mobile view.', 'ultimate-slider' ),
445 'options' => array(
446 'title' => 'Title',
447 'body' => 'Body',
448 'buttons' => 'Buttons',
449 'arrows' => 'Arrows',
450 'thumbnails' => 'Thumbnails',
451 )
452 )
453 );
454
455 $sap->add_setting(
456 'ewd-us-settings',
457 'ewd-us-premium-options',
458 'toggle',
459 array(
460 'id' => 'mobile-link-to-full',
461 'title' => __( 'Mobile Link to Full Post?', 'ultimate-slider' ),
462 'description' => __( 'Should clicking on a slide bring up the individual slide post on mobile?', 'ultimate-slider' )
463 )
464 );
465
466 $sap->add_setting(
467 'ewd-us-settings',
468 'ewd-us-premium-options',
469 'radio',
470 array(
471 'id' => 'title-animate',
472 'title' => __( 'Title Animation', 'ultimate-slider' ),
473 'description' => '',
474 'options' => array(
475 'none' => __( 'None', 'ultimate-slider' ),
476 'slidefromleft' => __( 'Slide From Left', 'ultimate-slider' ),
477 'slidefromright' => __( 'Slide From Right', 'ultimate-slider' ),
478 'fadein' => __( 'Fade In', 'ultimate-slider' ),
479 'scrolldown' => __( 'Scroll Down', 'ultimate-slider' ),
480 )
481 )
482 );
483
484 $sap->add_setting(
485 'ewd-us-settings',
486 'ewd-us-premium-options',
487 'toggle',
488 array(
489 'id' => 'force-full-width',
490 'title' => __( 'Force Full Width', 'ultimate-slider' ),
491 'description' => __( 'Force the slider to go the full width of the window, regardless of the container it\'s in.', 'ultimate-slider' )
492 )
493 );
494
495 $sap->add_setting(
496 'ewd-us-settings',
497 'ewd-us-premium-options',
498 'toggle',
499 array(
500 'id' => 'add-watermark',
501 'title' => __( 'Add Watermark', 'ultimate-slider' ),
502 'description' => __( 'Should a watermark be added to each image? Requires GD PHP module to be installed on your server.', 'ultimate-slider' )
503 )
504 );
505
506 $sap->add_setting(
507 'ewd-us-settings',
508 'ewd-us-premium-options',
509 'toggle',
510 array(
511 'id' => 'lightbox',
512 'title' => __( 'Lightbox on Image Click', 'ultimate-slider' ),
513 'description' => __( 'Should a lightbox be opened when an image is clicked on? Particularly useful if you\'re using carousel mode. Want to customize this lightbox? Install the "Ultimate Lightbox" plugin , and you can switch the lightbox colors, controls, behaviour and more. It\'s free!', 'ultimate-slider' )
514 )
515 );
516
517 if ( ! $ewd_us_controller->permissions->check_permission( 'youtube' ) ) {
518 $ewd_us_youtube_permissions = array(
519 'disabled' => true,
520 'disabled_image'=> '#',
521 'purchase_link' => 'https://www.etoilewebdesign.com/plugins/ultimate-slider/'
522 );
523 }
524 else { $ewd_us_youtube_permissions = array(); }
525
526 $sap->add_section(
527 'ewd-us-settings',
528 array_merge(
529 array(
530 'id' => 'ewd-us-youtube-options',
531 'title' => __( 'YouTube Slide Options', 'ultimate-slider' ),
532 'tab' => 'ewd-us-premium-tab',
533 ),
534 $ewd_us_youtube_permissions
535 )
536 );
537
538 $sap->add_setting(
539 'ewd-us-settings',
540 'ewd-us-youtube-options',
541 'toggle',
542 array(
543 'id' => 'youtube-autoplay-video',
544 'title' => __( 'Autoplay Video', 'ultimate-slider' ),
545 'description' => __( 'Should the video automatically start playing on page load?', 'ultimate-slider' )
546 )
547 );
548
549 $sap->add_setting(
550 'ewd-us-settings',
551 'ewd-us-youtube-options',
552 'toggle',
553 array(
554 'id' => 'youtube-show-content',
555 'title' => __( 'Show Slide Content', 'ultimate-slider' ),
556 'description' => __( 'Enabling this will overlay the slide content on top of the video. Disable it to only show the video.', 'ultimate-slider' )
557 )
558 );
559
560 $sap->add_setting(
561 'ewd-us-settings',
562 'ewd-us-youtube-options',
563 'text',
564 array(
565 'id' => 'youtube-video-opacity',
566 'title' => __( 'Video Opacity', 'ultimate-slider' ),
567 'description' => __( 'This lets you set the opacity of the video, which can help if you have the content enabled above. (Examples would be 0, 0.5 or 1.)', 'ultimate-slider' ),
568 'small' => true
569 )
570 );
571
572 if ( ! $ewd_us_controller->permissions->check_permission( 'styling' ) ) {
573 $ewd_us_styling_permissions = array(
574 'disabled' => true,
575 'disabled_image'=> '#',
576 'purchase_link' => 'https://www.etoilewebdesign.com/plugins/ultimate-slider/'
577 );
578 }
579 else { $ewd_us_styling_permissions = array(); }
580
581 $sap->add_section(
582 'ewd-us-settings',
583 array(
584 'id' => 'ewd-us-styling-tab',
585 'title' => __( 'Styling', 'ultimate-slider' ),
586 'is_tab' => true,
587 )
588 );
589
590 $sap->add_section(
591 'ewd-us-settings',
592 array_merge(
593 array(
594 'id' => 'ewd-us-slide-title-options',
595 'title' => __( 'Slide Title Options', 'ultimate-slider' ),
596 'tab' => 'ewd-us-styling-tab',
597 ),
598 $ewd_us_styling_permissions
599 )
600 );
601
602 $sap->add_setting(
603 'ewd-us-settings',
604 'ewd-us-slide-title-options',
605 'colorpicker',
606 array(
607 'id' => 'styling-slide-title-font-color',
608 'title' => __( 'Color', 'ultimate-slider' )
609 )
610 );
611
612 $sap->add_setting(
613 'ewd-us-settings',
614 'ewd-us-slide-title-options',
615 'text',
616 array(
617 'id' => 'styling-slide-title-font',
618 'title' => __( 'Font Family', 'ultimate-slider' ),
619 'small' => true
620 )
621 );
622
623 $sap->add_setting(
624 'ewd-us-settings',
625 'ewd-us-slide-title-options',
626 'text',
627 array(
628 'id' => 'styling-slide-title-font-size',
629 'title' => __( 'Font Size', 'ultimate-slider' ),
630 'small' => true
631 )
632 );
633
634 $sap->add_section(
635 'ewd-us-settings',
636 array_merge(
637 array(
638 'id' => 'ewd-us-slide-text-options',
639 'title' => __( 'Slide Text Options', 'ultimate-slider' ),
640 'tab' => 'ewd-us-styling-tab',
641 ),
642 $ewd_us_styling_permissions
643 )
644 );
645
646 $sap->add_setting(
647 'ewd-us-settings',
648 'ewd-us-slide-text-options',
649 'colorpicker',
650 array(
651 'id' => 'styling-slide-text-font-color',
652 'title' => __( 'Color', 'ultimate-slider' )
653 )
654 );
655
656 $sap->add_setting(
657 'ewd-us-settings',
658 'ewd-us-slide-text-options',
659 'text',
660 array(
661 'id' => 'styling-slide-text-font',
662 'title' => __( 'Font Family', 'ultimate-slider' ),
663 'small' => true
664 )
665 );
666
667 $sap->add_setting(
668 'ewd-us-settings',
669 'ewd-us-slide-text-options',
670 'text',
671 array(
672 'id' => 'styling-slide-text-font-size',
673 'title' => __( 'Font Size', 'ultimate-slider' ),
674 'small' => true
675 )
676 );
677
678 $sap->add_section(
679 'ewd-us-settings',
680 array_merge(
681 array(
682 'id' => 'ewd-us-slide-button-options',
683 'title' => __( 'Slide Button Options', 'ultimate-slider' ),
684 'tab' => 'ewd-us-styling-tab',
685 ),
686 $ewd_us_styling_permissions
687 )
688 );
689
690 $sap->add_setting(
691 'ewd-us-settings',
692 'ewd-us-slide-button-options',
693 'colorpicker',
694 array(
695 'id' => 'styling-button-background-color',
696 'title' => __( 'Background Color', 'ultimate-slider' )
697 )
698 );
699
700 $sap->add_setting(
701 'ewd-us-settings',
702 'ewd-us-slide-button-options',
703 'colorpicker',
704 array(
705 'id' => 'styling-button-background-hover-color',
706 'title' => __( 'Background Hover Color', 'ultimate-slider' )
707 )
708 );
709
710 $sap->add_setting(
711 'ewd-us-settings',
712 'ewd-us-slide-button-options',
713 'colorpicker',
714 array(
715 'id' => 'styling-button-border-color',
716 'title' => __( 'Border Color', 'ultimate-slider' )
717 )
718 );
719
720 $sap->add_setting(
721 'ewd-us-settings',
722 'ewd-us-slide-button-options',
723 'colorpicker',
724 array(
725 'id' => 'styling-button-border-hover-color',
726 'title' => __( 'Border Hover Color', 'ultimate-slider' )
727 )
728 );
729
730 $sap->add_setting(
731 'ewd-us-settings',
732 'ewd-us-slide-button-options',
733 'colorpicker',
734 array(
735 'id' => 'styling-button-text-color',
736 'title' => __( 'Text Color', 'ultimate-slider' )
737 )
738 );
739
740 $sap->add_setting(
741 'ewd-us-settings',
742 'ewd-us-slide-button-options',
743 'colorpicker',
744 array(
745 'id' => 'styling-button-text-hover-color',
746 'title' => __( 'Text Hover Color', 'ultimate-slider' )
747 )
748 );
749
750 if ( ! $ewd_us_controller->permissions->check_permission( 'controls' ) ) {
751 $ewd_us_controls_permissions = array(
752 'disabled' => true,
753 'disabled_image'=> '#',
754 'purchase_link' => 'https://www.etoilewebdesign.com/plugins/ultimate-slider/'
755 );
756 }
757 else { $ewd_us_controls_permissions = array(); }
758
759 $sap->add_section(
760 'ewd-us-settings',
761 array(
762 'id' => 'ewd-us-controls-tab',
763 'title' => __( 'Controls', 'ultimate-slider' ),
764 'is_tab' => true,
765 )
766 );
767
768 $sap->add_section(
769 'ewd-us-settings',
770 array_merge(
771 array(
772 'id' => 'ewd-us-control-options',
773 'title' => __( 'Control Options', 'ultimate-slider' ),
774 'tab' => 'ewd-us-controls-tab',
775 ),
776 $ewd_us_controls_permissions
777 )
778 );
779
780 $sap->add_setting(
781 'ewd-us-settings',
782 'ewd-us-control-options',
783 'radio',
784 array(
785 'id' => 'arrow',
786 'title' => __( 'Arrows', 'ultimate-slider' ),
787 'columns' => '3',
788 'options' => array(
789 'none' => __( 'No Arrow', 'ultimate-slider' ),
790 'a' => '<span class="ewd-us-arrow">b</span>',
791 'c' => '<span class="ewd-us-arrow">d</span>',
792 'e' => '<span class="ewd-us-arrow">f</span>',
793 'g' => '<span class="ewd-us-arrow">h</span>',
794 'i' => '<span class="ewd-us-arrow">j</span>',
795 'k' => '<span class="ewd-us-arrow">l</span>',
796 'm' => '<span class="ewd-us-arrow">n</span>',
797 'o' => '<span class="ewd-us-arrow">p</span>',
798 'q' => '<span class="ewd-us-arrow">r</span>',
799 'A' => '<span class="ewd-us-arrow">B</span>',
800 'E' => '<span class="ewd-us-arrow">D</span>',
801 'G' => '<span class="ewd-us-arrow">F</span>',
802 'I' => '<span class="ewd-us-arrow">J</span>',
803 'K' => '<span class="ewd-us-arrow">L</span>',
804 'M' => '<span class="ewd-us-arrow">N</span>',
805 'O' => '<span class="ewd-us-arrow">P</span>',
806 'Q' => '<span class="ewd-us-arrow">R</span>',
807 )
808 )
809 );
810
811 $sap->add_setting(
812 'ewd-us-settings',
813 'ewd-us-control-options',
814 'radio',
815 array(
816 'id' => 'arrow-background-shape',
817 'title' => __( 'Background Shape', 'ultimate-slider' ),
818 'description' => '',
819 'options' => array(
820 'none' => __( 'No Background', 'ultimate-slider' ),
821 'square' => __( 'Square', 'ultimate-slider' ),
822 'circle' => __( 'Circle', 'ultimate-slider' ),
823 'diamond' => __( 'Diamond', 'ultimate-slider' ),
824 )
825 )
826 );
827
828 $sap->add_setting(
829 'ewd-us-settings',
830 'ewd-us-control-options',
831 'colorpicker',
832 array(
833 'id' => 'styling-arrow-color',
834 'title' => __( 'Arrow Color', 'ultimate-slider' )
835 )
836 );
837
838 $sap->add_setting(
839 'ewd-us-settings',
840 'ewd-us-control-options',
841 'colorpicker',
842 array(
843 'id' => 'styling-arrow-background-color',
844 'title' => __( 'Arrow Background Color', 'ultimate-slider' )
845 )
846 );
847
848 $sap->add_setting(
849 'ewd-us-settings',
850 'ewd-us-control-options',
851 'colorpicker',
852 array(
853 'id' => 'styling-clickable-area-background-color',
854 'title' => __( 'Clickable Area Color', 'ultimate-slider' )
855 )
856 );
857
858 $sap->add_setting(
859 'ewd-us-settings',
860 'ewd-us-control-options',
861 'text',
862 array(
863 'id' => 'styling-arrow-font-size',
864 'title' => __( 'Arrow Size', 'ultimate-slider' ),
865 'small' => true
866 )
867 );
868
869 $sap->add_setting(
870 'ewd-us-settings',
871 'ewd-us-control-options',
872 'text',
873 array(
874 'id' => 'styling-arrow-background-size',
875 'title' => __( 'Arrow Background Size', 'ultimate-slider' ),
876 'small' => true
877 )
878 );
879
880 $sap->add_setting(
881 'ewd-us-settings',
882 'ewd-us-control-options',
883 'text',
884 array(
885 'id' => 'styling-clickable-area-size',
886 'title' => __( 'Clickable Area Size', 'ultimate-slider' ),
887 'small' => true
888 )
889 );
890
891 $sap->add_setting(
892 'ewd-us-settings',
893 'ewd-us-control-options',
894 'text',
895 array(
896 'id' => 'styling-arrow-line-height',
897 'title' => __( 'Line Height of Arrow Within Background (ex. "1.25")', 'ultimate-slider' ),
898 'small' => true
899 )
900 );
901
902 $sap = apply_filters( 'ewd_us_settings_page', $sap );
903
904 $sap->add_admin_menus();
905
906 }
907
908 }
909 } // endif;
910