PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.5.5
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.5.5
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / src / Admin / Views / SwitcherStyle.php

SwitcherStyle.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.5.5, at src/Admin/Views/SwitcherStyle.php

1,002 lines 77.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * SwitcherStyle class for Switcher options.
5 *
6 * @link https://themeatelier.net
7 * @since 1.0.0
8 *
9 * @package darkify
10 * @subpackage darkify/src/Admin/Views/SwitcherStyle
11 * @author ThemeAtelier<themeatelierbd@gmail.com>
12 */
13
14 namespace ThemeAtelier\Darkify\Admin\Views;
15
16 use ThemeAtelier\Darkify\Admin\Framework\Classes\Darkify;
17
18 class SwitcherStyle
19 {
20 /**
21 * Create Option fields for the setting options.
22 *
23 * @param string $prefix Option setting key prefix.
24 * @return void
25 */
26 public static function options($prefix)
27 {
28 Darkify::createSection(
29 $prefix,
30 array(
31 'title' => esc_html__('SWITCHES', 'darkify'),
32 'icon' => 'icofont-toggle-on',
33 'fields' => array(
34
35 array(
36 'type' => 'section_tab',
37 'tabs' => array(
38 array(
39 'title' => esc_html__('Floating Switch', 'darkify'),
40 'icon' => 'icofont-ui-theme',
41 'fields' => array(
42 array(
43 'id' => 'enable_dark_switcher',
44 'type' => 'image_select',
45 'title' => esc_html__('Switch Toggler', 'darkify'),
46 'title_help' =>
47 '<div class="darkify-info-label">' .
48 __('Choose the default floating switch toggler.', 'darkify') .
49 '</div>' .
50 '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'switches/#switchers') . '" target="_blank" rel="noopener noreferrer">' .
51 esc_html__('Live Demo', 'darkify') .
52 '</a>' .
53 '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'switcher/#switcher-customization') . '" target="_blank" rel="noopener noreferrer">' .
54 esc_html__('Open Docs', 'darkify') .
55 '</a>',
56 'class' => 'icon_select ',
57 'options' => array(
58 'classic' => array(
59 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/classic.svg',
60 'text' => esc_html__('Classic', 'darkify'),
61 'option_demo_url' => '',
62 ),
63
64 'expand' => array(
65 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/expand.svg',
66 'text' => esc_html__('Expand', 'darkify'),
67 'option_demo_url' => '',
68 ),
69
70 'inner-moon' => array(
71 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/inner-moon.svg',
72 'text' => esc_html__('Inner Moon', 'darkify'),
73 'option_demo_url' => '',
74 ),
75
76 'within' => array(
77 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/within.svg',
78 'text' => esc_html__('Within', 'darkify'),
79 'option_demo_url' => '',
80 ),
81 'orbit' => array(
82 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/orbit.svg',
83 'text' => esc_html__('Orbit', 'darkify'),
84 'option_demo_url' => '',
85 ),
86
87 'around' => array(
88 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/around.svg',
89 'text' => esc_html__('Around', 'darkify'),
90 'option_demo_url' => '',
91 'pro_only' => true,
92 ),
93
94 'dark-side' => array(
95 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dark-side.svg',
96 'text' => esc_html__('Dark Side', 'darkify'),
97 'option_demo_url' => '',
98 'pro_only' => true,
99 ),
100
101 'horizon' => array(
102 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/horizon.svg',
103 'text' => esc_html__('Horizon', 'darkify'),
104 'option_demo_url' => '',
105 'pro_only' => true,
106 ),
107
108 'eclipse' => array(
109 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/eclipse.svg',
110 'text' => esc_html__('Eclipse', 'darkify'),
111 'option_demo_url' => '',
112 'pro_only' => true,
113 ),
114
115 'lightbulb' => array(
116 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/lightbulb.svg',
117 'text' => esc_html__('Lightbulb', 'darkify'),
118 'option_demo_url' => '',
119 'pro_only' => true,
120 ),
121
122 'dark-inner' => array(
123 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dark-inner.svg',
124 'text' => esc_html__('Dark Inner', 'darkify'),
125 'option_demo_url' => '',
126 'pro_only' => true,
127 ),
128
129 'half-sun' => array(
130 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/half-sun.svg',
131 'text' => esc_html__('Half Sun', 'darkify'),
132 'option_demo_url' => '',
133 'pro_only' => true,
134 ),
135
136 'simple' => array(
137 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/simple.svg',
138 'text' => esc_html__('Simple', 'darkify'),
139 'option_demo_url' => '',
140 'pro_only' => true,
141 ),
142 'duality' => array(
143 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/duality.svg',
144 'text' => esc_html__('Duality', 'darkify'),
145 'option_demo_url' => '',
146 'pro_only' => true,
147 ),
148 'dual' => array(
149 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dual.svg',
150 'text' => esc_html__('Dual', 'darkify'),
151 'option_demo_url' => '',
152 'pro_only' => true,
153 ),
154 'shift' => array(
155 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/shift.svg',
156 'text' => esc_html__('Shift', 'darkify'),
157 'option_demo_url' => '',
158 'pro_only' => true,
159 ),
160 ),
161 'default' => 'classic',
162 ),
163 array(
164 'id' => 'switch_size',
165 'type' => 'button_set',
166 'title' => esc_html__('Switch Size', 'darkify'),
167 'title_help' => '<div class="darkify-info-label">' . esc_html__('Choose the size of the floating toggle switch as you need.', 'darkify') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' . esc_html__('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank">' . esc_html__('Open Docs', 'darkify') . '</a>',
168 'options' => array(
169 '0.6' => esc_html__('XS', 'darkify'),
170 '0.8' => esc_html__('S', 'darkify'),
171 '1' => esc_html__('M', 'darkify'),
172 '1.2' => esc_html__('L', 'darkify'),
173 '1.4' => esc_html__('XL', 'darkify'),
174 '1.6' => esc_html__('XXL', 'darkify'),
175 'custom' => esc_html__('Custom', 'darkify'),
176 ),
177 'default' => '1',
178 ),
179 array(
180 'id' => 'switch_size_custom',
181 'type' => 'slider',
182 'title' => esc_html__('Custom Switch Size', 'darkify'),
183 'title_help' => '<div class="darkify-info-label">' . esc_html__('Scale in percentage relative to normal size.', 'darkify') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' . esc_html__('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank">' . esc_html__('Open Docs', 'darkify') . '</a>',
184 'default' => '100',
185 'min' => 40,
186 'max' => 300,
187 'dependency' => array('switch_size', '==', 'custom')
188 ),
189 array(
190 'id' => 'switch_background',
191 'type' => 'color_group',
192 'title' => esc_html__('Switch Background', 'darkify'),
193 'title_help' => '<div class="darkify-info-label">' .
194 __('Customize the floating switch background to match your design.', 'darkify') .
195 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank" rel="noopener noreferrer">' .
196 __('Live Demo', 'darkify') .
197 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank" rel="noopener noreferrer">' .
198 __('Open Docs', 'darkify') .
199 '</a>',
200 'options' => array(
201 'switch_light_mode_bg' => esc_html__('Light Mode', 'darkify'),
202 'switch_dark_mode_bg' => esc_html__('Dark Mode', 'darkify'),
203 ),
204 'default' => array(
205 'switch_light_mode_bg' => '#121116',
206 'switch_dark_mode_bg' => '#ffffff',
207 )
208 ),
209 array(
210 'id' => 'switch_icon_color',
211 'type' => 'color_group',
212 'title' => esc_html__('Switch Icon Color', 'darkify'),
213 'title_help' => '<div class="darkify-info-label">' .
214 __('Customize the floating switch icon color as needed.', 'darkify') .
215 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank" rel="noopener noreferrer">' .
216 __('Live Demo', 'darkify') .
217 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank" rel="noopener noreferrer">' .
218 __('Open Docs', 'darkify') .
219 '</a>',
220
221 'options' => array(
222 'switch_light_mode_color' => esc_html__('Light Mode', 'darkify'),
223 'switch_dark_mode_color' => esc_html__('Dark Mode', 'darkify'),
224 ),
225 'default' => array(
226 'switch_light_mode_color' => '#ffffff',
227 'switch_dark_mode_color' => '#121116',
228 ),
229 ),
230 array(
231 'id' => 'switch_border',
232 'type' => 'border',
233 'title' => esc_html__('Switch Border', 'darkify'),
234 'title_help' =>
235 '<div class="darkify-info-label">' .
236 __('Customize the floating switch border and border radius.', 'darkify') .
237 '</div>' .
238 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank" rel="noopener noreferrer">' .
239 __('Live Demo', 'darkify') .
240 '</a>' .
241 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank" rel="noopener noreferrer">' .
242 __('Open Docs', 'darkify') .
243 '</a>',
244 'color' => true,
245 'style' => false,
246 'color2' => false,
247 'all' => true,
248 'radius' => true,
249 'default' => array(
250 'color' => '#121116',
251 'color3' => '#ffffff',
252 'all' => 0,
253 'radius' => 7,
254 ),
255 ),
256
257 array(
258 'id' => 'enable_switch_attention',
259 'type' => 'switcher',
260 'title' => esc_html__('Switch Attention Effect', 'darkify'),
261 'text_on' => esc_html__('Enabled', 'darkify'),
262 'text_off' => esc_html__('Disabled', 'darkify'),
263 'text_width' => '100',
264 'title_help' => '<div class="darkify-info-label">' . esc_html__('Enable an animation to draw visitor attention to the floating dark mode switch.', 'darkify') . '</div>',
265 ),
266 array(
267 'id' => 'switch_attention_effect',
268 'type' => 'button_set',
269 'title' => esc_html__('Attention Effect Style', 'darkify'),
270 'title_help' => '<div class="darkify-info-label">' . esc_html__('Choose the animation style for the attention effect. Hover pauses the animation.', 'darkify') . '</div>',
271 'options' => array(
272 'pulse' => esc_html__('Pulse', 'darkify'),
273 'radiance' => array('label' => esc_html__('Radiance', 'darkify'), 'disabled' => true),
274 'leap' => array('label' => esc_html__('Leap', 'darkify'), 'disabled' => true),
275 'swing' => array('label' => esc_html__('Swing', 'darkify'), 'disabled' => true),
276 'drift' => array('label' => esc_html__('Drift', 'darkify'), 'disabled' => true),
277 'nudge' => array('label' => esc_html__('Nudge', 'darkify'), 'disabled' => true),
278 ),
279 'default' => 'pulse',
280 'dependency' => array('enable_switch_attention', '==', 'true'),
281 ),
282
283 array(
284 'title' => esc_html__('Switch Extra', 'darkify'),
285 'type' => 'heading',
286 ),
287 array(
288 'id' => 'tooltip_on_floating_switch',
289 'type' => 'fieldset',
290 'fields' => array(
291 array(
292 'id' => 'floating_switch_width',
293 'type' => 'switcher',
294 'title' => esc_html__('Tooltip on Floating Switch', 'darkify'),
295 'title_help' =>
296 '<div class="darkify-info-label">' .
297 __('Display a tooltip hint on the dark mode floating switch.', 'darkify') .
298 '</div>' .
299 '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'switches/#custom_switches') . '" target="_blank" rel="noopener noreferrer">' .
300 __('Live Demo', 'darkify') .
301 '</a>' .
302 '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'switcher/#tooltips') . '" target="_blank" rel="noopener noreferrer">' .
303 __('Open Docs', 'darkify') .
304 '</a>',
305 'text_on' => esc_html__('Enabled', 'darkify'),
306 'text_off' => esc_html__('Disabled', 'darkify'),
307 'text_width' => 100,
308 'default' => false,
309 ),
310 array(
311 'id' => 'tooltip_position',
312 'type' => 'button_set',
313 'title' => esc_html__('Tooltip Position', 'darkify'),
314 'title_help' =>
315 '<div class="darkify-info-label">' .
316 __('Choose where the tooltip should appear relative to the floating switch.', 'darkify') .
317 '</div>' .
318 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank">' .
319 __('Live Demo', 'darkify') .
320 '</a>' .
321 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#tooltips" target="_blank">' .
322 __('Open Docs', 'darkify') .
323 '</a>',
324 'options' => array(
325 'left' => esc_html__('Left', 'darkify'),
326 'right' => esc_html__('Right', 'darkify'),
327 'top' => esc_html__('Top', 'darkify'),
328 'bottom' => esc_html__('Bottom', 'darkify'),
329 ),
330 'default' => 'left',
331 'dependency' => array('floating_switch_width', '==', 'true'),
332 ),
333 array(
334 'id' => 'tooltip_text',
335 'type' => 'text',
336 'title' => esc_html__('Tooltip Text', 'darkify'),
337 'title_help' =>
338 '<div class="darkify-info-label">' .
339 __('Add tooltip text for floating switch toggler.', 'darkify') .
340 '</div>' .
341 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' .
342 __('Live Demo', 'darkify') .
343 '</a>' .
344 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-customization" target="_blank">' .
345 __('Open Docs', 'darkify') .
346 '</a>',
347 'default' => esc_html__('Toggle Dark Mode', 'darkify'),
348 'dependency' => array('floating_switch_width', '==', 'true'),
349 ),
350
351 array(
352 'id' => 'tooltip_color',
353 'type' => 'color_group',
354 'title' => esc_html__('Tooltip Color', 'darkify'),
355 'title_help' =>
356 '<div class="darkify-info-label">' .
357 __('Customize the tooltip colors and appearance.', 'darkify') .
358 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank">' .
359 __('Live Demo', 'darkify') .
360 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#tooltips" target="_blank">' .
361 __('Open Docs', 'darkify') .
362 '</a>',
363 'options' => array(
364 'tooltip_background_color' => esc_html__('Background', 'darkify'),
365 'tooltip_text_color' => esc_html__('Color', 'darkify'),
366 ),
367 'default' => array(
368 'tooltip_background_color' => '#142434',
369 'tooltip_text_color' => '#B0CBE7',
370 ),
371 'dependency' => array('floating_switch_width', '==', 'true'),
372 ),
373
374 ),
375 ),
376
377 array(
378 'id' => 'switcher_shortcode',
379 'type' => 'switcher_shortcode',
380 'title' => esc_html__('Switcher Shortcode', 'darkify'),
381 'title_help' => '<div class="darkify-info-content">' .
382 __('Copy this shortcode and place it on any page or post to display the switcher. You can customize all values, including Switcher styles 1–5, which are available in the current version of the plugin.', 'darkify') .
383 '</div>' .
384 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank" rel="noopener noreferrer">' .
385 __('Live Demo', 'darkify') .
386 '</a>' .
387 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#advanced-options" target="_blank" rel="noopener noreferrer">' .
388 __('Open Docs', 'darkify') .
389 '</a>',
390 'dependency' => array('enable_dark_switcher', 'not-any', 'orbit,duality,dual,shift'),
391 ),
392 array(
393 'id' => 'switcher_shortcode_v2',
394 'type' => 'switcher_shortcode_v2',
395 'title' => esc_html__('Switcher Shortcode', 'darkify'),
396 'title_help' => '<div class="darkify-info-content">' .
397 __('Copy this shortcode and place it on any page or post to display the switcher. You can customize all available options, including switch styles 1–5, which are available in the current version of the plugin.', 'darkify') .
398 '</div>' .
399 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank" rel="noopener noreferrer">' .
400 __('Live Demo', 'darkify') .
401 '</a>' .
402 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#advanced-options" target="_blank" rel="noopener noreferrer">' .
403 __('Open Docs', 'darkify') .
404 '</a>',
405 'dependency' => array('enable_dark_switcher', 'any', 'orbit,duality,dual,shift'),
406 ),
407 array(
408 'id' => 'alternative_dark_mode_switcher',
409 'type' => 'text',
410 'title' => esc_html__('Alternative Dark Mode Switch', 'darkify'),
411 'title_help' =>
412 '<div class="darkify-info-label">' .
413 __('Enter comma-separated CSS class or ID selectors to use them as alternative dark mode switches.', 'darkify') .
414 '</div>' .
415 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank">' .
416 __('Live Demo', 'darkify') .
417 '</a>' .
418 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#tooltips" target="_blank">' .
419 __('Open Docs', 'darkify') .
420 '</a>',
421 'placeholder' => esc_html__('e.g., .my-dark-switch, #dark-mode-toggle', 'darkify'),
422 ),
423 )
424 ),
425 array(
426 'title' => esc_html__('Mobile Switch', 'darkify'),
427 'icon' => 'dashicons dashicons-smartphone',
428 'fields' => array(
429 array(
430 'id' => 'dark_switcher_switch_in_mobile',
431 'type' => 'switcher',
432 'title' => esc_html__('Different Switch in Mobile', 'darkify-pro'),
433 'title_help' => '<div class="darkify-info-label">' . esc_html__('Should the Floating Switch be displayed on different in mobile?', 'darkify-pro') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' . esc_html__('Live Demo', 'darkify-pro') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' . esc_html__('Open Docs', 'darkify-pro') . '</a>',
434 'text_on' => esc_html__('Yes', 'darkify-pro'),
435 'text_off' => esc_html__('No', 'darkify-pro'),
436 ),
437 array(
438 'id' => 'enable_dark_switcher_in_mobile',
439 'type' => 'image_select',
440 'title' => esc_html__('Switch Toggler', 'darkify'),
441 'title_help' =>
442 '<div class="darkify-info-label">' .
443 __('Choose the default floating switch toggler.', 'darkify') .
444 '</div>' .
445 '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'switches/#switchers') . '" target="_blank" rel="noopener noreferrer">' .
446 esc_html__('Live Demo', 'darkify') .
447 '</a>' .
448 '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'switcher/#switcher-customization') . '" target="_blank" rel="noopener noreferrer">' .
449 esc_html__('Open Docs', 'darkify') .
450 '</a>',
451 'class' => 'icon_select ',
452 'options' => array(
453 'classic' => array(
454 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/classic.svg',
455 'text' => esc_html__('Classic', 'darkify'),
456 'option_demo_url' => '',
457 ),
458
459 'expand' => array(
460 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/expand.svg',
461 'text' => esc_html__('Expand', 'darkify'),
462 'option_demo_url' => '',
463 ),
464
465 'inner-moon' => array(
466 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/inner-moon.svg',
467 'text' => esc_html__('Inner Moon', 'darkify'),
468 'option_demo_url' => '',
469 ),
470
471 'within' => array(
472 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/within.svg',
473 'text' => esc_html__('Within', 'darkify'),
474 'option_demo_url' => '',
475 ),
476 'orbit' => array(
477 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/orbit.svg',
478 'text' => esc_html__('Orbit', 'darkify'),
479 'option_demo_url' => '',
480 ),
481
482 'around' => array(
483 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/around.svg',
484 'text' => esc_html__('Around', 'darkify'),
485 'option_demo_url' => '',
486 'pro_only' => true,
487 ),
488
489 'dark-side' => array(
490 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dark-side.svg',
491 'text' => esc_html__('Dark Side', 'darkify'),
492 'option_demo_url' => '',
493 'pro_only' => true,
494 ),
495
496 'horizon' => array(
497 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/horizon.svg',
498 'text' => esc_html__('Horizon', 'darkify'),
499 'option_demo_url' => '',
500 'pro_only' => true,
501 ),
502
503 'eclipse' => array(
504 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/eclipse.svg',
505 'text' => esc_html__('Eclipse', 'darkify'),
506 'option_demo_url' => '',
507 'pro_only' => true,
508 ),
509
510 'lightbulb' => array(
511 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/lightbulb.svg',
512 'text' => esc_html__('Lightbulb', 'darkify'),
513 'option_demo_url' => '',
514 'pro_only' => true,
515 ),
516
517 'dark-inner' => array(
518 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dark-inner.svg',
519 'text' => esc_html__('Dark Inner', 'darkify'),
520 'option_demo_url' => '',
521 'pro_only' => true,
522 ),
523
524 'half-sun' => array(
525 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/half-sun.svg',
526 'text' => esc_html__('Half Sun', 'darkify'),
527 'option_demo_url' => '',
528 'pro_only' => true,
529 ),
530
531 'simple' => array(
532 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/simple.svg',
533 'text' => esc_html__('Simple', 'darkify'),
534 'option_demo_url' => '',
535 'pro_only' => true,
536 ),
537 'duality' => array(
538 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/duality.svg',
539 'text' => esc_html__('Duality', 'darkify'),
540 'option_demo_url' => '',
541 'pro_only' => true,
542 ),
543 'dual' => array(
544 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/dual.svg',
545 'text' => esc_html__('Dual', 'darkify'),
546 'option_demo_url' => '',
547 'pro_only' => true,
548 ),
549 'shift' => array(
550 'image' => DARKIFY_DIR_URL . 'src/Admin/Framework/assets/images/shift.svg',
551 'text' => esc_html__('Shift', 'darkify'),
552 'option_demo_url' => '',
553 'pro_only' => true,
554 ),
555 ),
556 'default' => 'classic',
557 'dependency' => array('dark_switcher_switch_in_mobile', '==', 'true'),
558 ),
559 array(
560 'id' => 'switch_size_in_mobile',
561 'type' => 'button_set',
562 'title' => esc_html__('Switch Size', 'darkify'),
563 'title_help' => '<div class="darkify-info-label">' . esc_html__('Choose the size of the floating toggle switch as you need.', 'darkify') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' . esc_html__('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank">' . esc_html__('Open Docs', 'darkify') . '</a>',
564 'options' => array(
565 '0.6' => esc_html__('XS', 'darkify'),
566 '0.8' => esc_html__('S', 'darkify'),
567 '1' => esc_html__('M', 'darkify'),
568 '1.2' => esc_html__('L', 'darkify'),
569 '1.4' => esc_html__('XL', 'darkify'),
570 '1.6' => esc_html__('XXL', 'darkify'),
571 'custom' => esc_html__('Custom', 'darkify'),
572 ),
573 'default' => '1',
574 'dependency' => array('dark_switcher_switch_in_mobile', '==', 'true'),
575 ),
576 array(
577 'id' => 'switch_size_custom_in_mobile',
578 'type' => 'slider',
579 'title' => esc_html__('Custom Switch Size', 'darkify'),
580 'title_help' => '<div class="darkify-info-label">' . esc_html__('Scale in percentage relative to normal size.', 'darkify') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' . esc_html__('Live Demo', 'darkify') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank">' . esc_html__('Open Docs', 'darkify') . '</a>',
581 'default' => '100',
582 'min' => 40,
583 'max' => 300,
584 'dependency' => array('switch_size_in_mobile|dark_switcher_switch_in_mobile', '==|==', 'custom|true')
585 ),
586 array(
587 'id' => 'switch_background_in_mobile',
588 'type' => 'color_group',
589 'title' => esc_html__('Switch Background', 'darkify'),
590 'title_help' => '<div class="darkify-info-label">' .
591 __('Customize the floating switch background to match your design.', 'darkify') .
592 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank" rel="noopener noreferrer">' .
593 __('Live Demo', 'darkify') .
594 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank" rel="noopener noreferrer">' .
595 __('Open Docs', 'darkify') .
596 '</a>',
597 'options' => array(
598 'switch_light_mode_bg' => esc_html__('Light Mode', 'darkify'),
599 'switch_dark_mode_bg' => esc_html__('Dark Mode', 'darkify'),
600 ),
601 'default' => array(
602 'switch_light_mode_bg' => '#121116',
603 'switch_dark_mode_bg' => '#ffffff',
604 ),
605 'dependency' => array('dark_switcher_switch_in_mobile', '==', 'true'),
606 ),
607 array(
608 'id' => 'switch_icon_color_in_mobile',
609 'type' => 'color_group',
610 'title' => esc_html__('Switch Icon Color', 'darkify'),
611 'title_help' => '<div class="darkify-info-label">' .
612 __('Customize the floating switch icon color as needed.', 'darkify') .
613 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank" rel="noopener noreferrer">' .
614 __('Live Demo', 'darkify') .
615 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank" rel="noopener noreferrer">' .
616 __('Open Docs', 'darkify') .
617 '</a>',
618
619 'options' => array(
620 'switch_light_mode_color' => esc_html__('Light Mode', 'darkify'),
621 'switch_dark_mode_color' => esc_html__('Dark Mode', 'darkify'),
622 ),
623 'default' => array(
624 'switch_light_mode_color' => '#ffffff',
625 'switch_dark_mode_color' => '#121116',
626 ),
627 'dependency' => array('dark_switcher_switch_in_mobile', '==', 'true'),
628 ),
629 array(
630 'id' => 'switch_border_in_mobile',
631 'type' => 'border',
632 'title' => esc_html__('Switch Border', 'darkify'),
633 'title_help' =>
634 '<div class="darkify-info-label">' .
635 __('Customize the floating switch border and border radius.', 'darkify') .
636 '</div>' .
637 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank" rel="noopener noreferrer">' .
638 __('Live Demo', 'darkify') .
639 '</a>' .
640 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank" rel="noopener noreferrer">' .
641 __('Open Docs', 'darkify') .
642 '</a>',
643 'color' => true,
644 'style' => false,
645 'color2' => false,
646 'all' => true,
647 'radius' => true,
648 'default' => array(
649 'color' => '#121116',
650 'color3' => '#ffffff',
651 'all' => 0,
652 'radius' => 7,
653 ),
654 'dependency' => array('dark_switcher_switch_in_mobile', '==', 'true'),
655 ),
656
657 array(
658 'id' => 'enable_switch_attention_in_mobile',
659 'type' => 'switcher',
660 'title' => esc_html__('Switch Attention Effect', 'darkify'),
661 'text_on' => esc_html__('Enabled', 'darkify'),
662 'text_off' => esc_html__('Disabled', 'darkify'),
663 'text_width' => '100',
664 'title_help' => '<div class="darkify-info-label">' . esc_html__('Enable an animation to draw visitor attention to the floating dark mode switch.', 'darkify') . '</div>',
665 'dependency' => array('dark_switcher_switch_in_mobile', '==', 'true'),
666 ),
667 array(
668 'id' => 'switch_attention_effect_in_mobile',
669 'type' => 'button_set',
670 'title' => esc_html__('Attention Effect Style', 'darkify'),
671 'title_help' => '<div class="darkify-info-label">' . esc_html__('Choose the animation style for the attention effect. Hover pauses the animation.', 'darkify') . '</div>',
672 'options' => array(
673 'pulse' => esc_html__('Pulse', 'darkify'),
674 'radiance' => array('label' => esc_html__('Radiance', 'darkify'), 'disabled' => true),
675 'leap' => array('label' => esc_html__('Leap', 'darkify'), 'disabled' => true),
676 'swing' => array('label' => esc_html__('Swing', 'darkify'), 'disabled' => true),
677 'drift' => array('label' => esc_html__('Drift', 'darkify'), 'disabled' => true),
678 'nudge' => array('label' => esc_html__('Nudge', 'darkify'), 'disabled' => true),
679 ),
680 'default' => 'pulse',
681 'dependency' => array('enable_switch_attention_in_mobile|dark_switcher_switch_in_mobile', '==|==', 'true|true'),
682 ),
683 )
684 ),
685 array(
686 'title' => esc_html__('Positioning', 'darkify'),
687 'icon' => 'icofont-hand-drag',
688 'fields' => array(
689 // Switch Position
690 array(
691 'id' => 'switcher_button_position',
692 'type' => 'fieldset',
693 'fields' => array(
694 array(
695 'id' => 'dark_mode_switch_position',
696 'type' => 'button_set',
697 'title' => esc_html__('Switch Position', 'darkify'),
698 'title_help' =>
699 '<div class="darkify-info-label">' .
700 __('Choose the screen position where the floating switch should be displayed.', 'darkify') .
701 '</div>' .
702 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
703 __('Live Demo', 'darkify') .
704 '</a>' .
705 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
706 __('Open Docs', 'darkify') .
707 '</a>',
708 'options' => array(
709 'bottom_right' => esc_html__('Bottom Right', 'darkify'),
710 'bottom_left' => esc_html__('Bottom Left', 'darkify'),
711 'top_right' => esc_html__('Top Right', 'darkify'),
712 'top_left' => esc_html__('Top Left', 'darkify'),
713 ),
714 'default' => 'bottom_right',
715 ),
716 array(
717 'id' => 'switch_position_top_right',
718 'type' => 'spacing',
719 'title' => esc_html__('Margin From Top Right', 'darkify'),
720
721 'title_help' =>
722 '<div class="darkify-info-label">' .
723 __('Customize default margin from the top right of the Floating Switch.', 'darkify') .
724 '</div>' .
725 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
726 __('Live Demo', 'darkify') .
727 '</a>' .
728 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
729 __('Open Docs', 'darkify') .
730 '</a>',
731
732 'left' => false,
733 'bottom' => false,
734 'units' => ['px'],
735 'default' => array(
736 'top' => '40',
737 'right' => '40',
738 ),
739 'dependency' => array('dark_mode_switch_position', '==', 'top_right'),
740 ),
741 array(
742 'id' => 'switch_position_top_left',
743 'type' => 'spacing',
744 'title' => esc_html__('Margin from Top Left', 'darkify'),
745 'title_help' =>
746 '<div class="darkify-info-label">' .
747 __('Customize the default margin from the top-left position of the floating switch.', 'darkify') .
748 '</div>' .
749 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
750 __('Live Demo', 'darkify') .
751 '</a>' .
752 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
753 __('Open Docs', 'darkify') .
754 '</a>',
755
756 'right' => false,
757 'bottom' => false,
758 'units' => ['px'],
759 'default' => array(
760 'top' => '40',
761 'left' => '40',
762 ),
763 'dependency' => array('dark_mode_switch_position', '==', 'top_left'),
764 ),
765 array(
766 'id' => 'switch_position_bottom_right',
767 'type' => 'spacing',
768 'title' => esc_html__('Margin From Bottom Right', 'darkify'),
769
770 'title_help' =>
771 '<div class="darkify-info-label">' .
772 __('Customize the default margin from the bottom-right position of the floating switch.', 'darkify') .
773 '</div>' .
774 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
775 __('Live Demo', 'darkify') .
776 '</a>' .
777 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
778 __('Open Docs', 'darkify') .
779 '</a>',
780
781 'left' => false,
782 'top' => false,
783 'units' => ['px'],
784 'default' => array(
785 'bottom' => '40',
786 'right' => '40',
787 ),
788 'dependency' => array('dark_mode_switch_position', '==', 'bottom_right'),
789 ),
790 array(
791 'id' => 'switch_position_bottom_left',
792 'type' => 'spacing',
793 'title' => esc_html__('Margin from Bottom Left', 'darkify'),
794 'title_help' =>
795 '<div class="darkify-info-label">' .
796 __('Customize the default margin from the bottom-left position of the floating switch.', 'darkify') .
797 '</div>' .
798 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
799 __('Live Demo', 'darkify') .
800 '</a>' .
801 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
802 __('Open Docs', 'darkify') .
803 '</a>',
804
805 'right' => false,
806 'top' => false,
807 'units' => ['px'],
808 'default' => array(
809 'bottom' => '40',
810 'left' => '40',
811 ),
812 'dependency' => array('dark_mode_switch_position', '==', 'bottom_left'),
813 ),
814 ),
815 ),
816
817 // Different Switch Position in Mobile
818 array(
819 'id' => 'different_switch_in_mobile',
820 'type' => 'fieldset',
821 'fields' => array(
822 array(
823 'id' => 'switch_position_different_in_mobile',
824 'type' => 'switcher',
825 'title' => esc_html__('Different Switch Position on Mobile', 'darkify'),
826 'title_help' =>
827 '<div class="darkify-info-label">' .
828 __('Choose whether the floating switch should be displayed in a different position on mobile devices.', 'darkify') .
829 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
830 __('Live Demo', 'darkify') .
831 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
832 __('Open Docs', 'darkify') .
833 '</a>',
834
835 'text_on' => esc_html__('Yes', 'darkify'),
836 'text_off' => esc_html__('No', 'darkify'),
837
838 ),
839 array(
840 'id' => 'switch_position_in_mobile',
841 'type' => 'button_set',
842 'title' => esc_html__('Switch Position on Mobile', 'darkify'),
843
844 'title_help' =>
845 '<div class="darkify-info-label">' .
846 __('Choose the screen position where the floating switch should be displayed on mobile devices.', 'darkify') .
847 '</div>' .
848 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
849 __('Live Demo', 'darkify') .
850 '</a>' .
851 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
852 __('Open Docs', 'darkify') .
853 '</a>',
854
855 'options' => array(
856 'bottom_right' => esc_html__('Bottom Right', 'darkify'),
857 'bottom_left' => esc_html__('Bottom Left', 'darkify'),
858 'top_right' => esc_html__('Top Right', 'darkify'),
859 'top_left' => esc_html__('Top Left', 'darkify'),
860 ),
861
862 'default' => 'bottom_right',
863 'dependency' => array('switch_position_different_in_mobile', '==', 'true'),
864 ),
865 array(
866 'id' => 'switch_position_top_right_in_mobile',
867 'type' => 'spacing',
868 'title' => esc_html__('Margin from Top Right on Mobile', 'darkify'),
869 'title_help' =>
870 '<div class="darkify-info-label">' .
871 __('Adjust the default margin from the top-right position of the floating switch on mobile devices.', 'darkify') .
872 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
873 __('Live Demo', 'darkify') .
874 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
875 __('Open Docs', 'darkify') .
876 '</a>',
877
878
879 'left' => false,
880 'bottom' => false,
881 'units' => ['px'],
882 'default' => array(
883 'top' => '40',
884 'right' => '40',
885 ),
886 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_right'),
887 ),
888 array(
889 'id' => 'switch_position_top_left_in_mobile',
890 'type' => 'spacing',
891 'title' => esc_html__('Margin from Top Left on Mobile', 'darkify'),
892 'title_help' =>
893 '<div class="darkify-info-label">' .
894 __('Adjust the default margin from the top-left position of the floating switch on mobile devices.', 'darkify') .
895 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
896 __('Live Demo', 'darkify') .
897 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
898 __('Open Docs', 'darkify') .
899 '</a>',
900
901 'right' => false,
902 'bottom' => false,
903 'units' => ['px'],
904 'default' => array(
905 'top' => '40',
906 'left' => '40',
907 ),
908 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_left'),
909 ),
910 array(
911 'id' => 'switch_position_bottom_right_in_mobile',
912 'type' => 'spacing',
913 'title' => esc_html__('Margin from Bottom Right on Mobile', 'darkify'),
914 'title_help' =>
915 '<div class="darkify-info-label">' .
916 __('Adjust the default margin from the bottom-right position of the floating switch on mobile devices.', 'darkify') .
917 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
918 __('Live Demo', 'darkify') .
919 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
920 __('Open Docs', 'darkify') .
921 '</a>',
922
923 'left' => false,
924 'top' => false,
925 'units' => ['px'],
926 'default' => array(
927 'bottom' => '40',
928 'right' => '40',
929 ),
930 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_right'),
931 ),
932 array(
933 'id' => 'switch_position_bottom_left_in_mobile',
934 'type' => 'spacing',
935 'title' => esc_html__('Margin from Bottom Left on Mobile', 'darkify'),
936 'title_help' =>
937 '<div class="darkify-info-label">' .
938 __('Adjust the default margin from the bottom-left position of the floating switch on mobile devices.', 'darkify') .
939 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
940 __('Live Demo', 'darkify') .
941 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
942 __('Open Docs', 'darkify') .
943 '</a>',
944
945 'right' => false,
946 'top' => false,
947 'units' => ['px'],
948 'default' => array(
949 'bottom' => '40',
950 'left' => '40',
951 ),
952 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_left'),
953 ),
954 ),
955 ),
956 array(
957 'id' => 'enable_absolute_position',
958 'type' => 'switcher',
959 'title' => esc_html__('Absolute Switch Position', 'darkify'),
960
961 'title_help' =>
962 '<div class="darkify-info-label">' .
963 __('Enable this option to allow the floating switch to scroll along with the page.', 'darkify') .
964 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
965 __('Live Demo', 'darkify') .
966 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
967 __('Open Docs', 'darkify') .
968 '</a>',
969 'text_on' => esc_html__('Enabled', 'darkify'),
970 'text_off' => esc_html__('Disabled', 'darkify'),
971 'text_width' => '100',
972 ),
973
974 array(
975 'id' => 'enable_switch_dragging',
976 'type' => 'switcher',
977 'title' => esc_html__('Draggable Position Change', 'darkify'),
978 'title_help' =>
979 '<div class="darkify-info-label">' .
980 __('Enable this option to allow users to change the floating switch position by dragging it.', 'darkify') .
981 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
982 __('Live Demo', 'darkify') .
983 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
984 __('Open Docs', 'darkify') .
985 '</a>',
986
987 'text_on' => esc_html__('Enabled', 'darkify'),
988 'text_off' => esc_html__('Disabled', 'darkify'),
989 'text_width' => '100',
990
991 'class' => 'switcher_pro_only',
992 ),
993 )
994 ),
995 )
996 ),
997 )
998 )
999 );
1000 }
1001 }
1002