PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.4.26
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.4.26
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.4.26, at src/Admin/Views/SwitcherStyle.php

709 lines 53.9 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__('Customization', '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-pro'),
167 'title_help' => '<div class="darkify-info-label">' . esc_html__('Choose the size of the floating toggle switch as you need.', 'darkify-pro') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' . esc_html__('Live Demo', 'darkify-pro') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank">' . esc_html__('Open Docs', 'darkify-pro') . '</a>',
168 'options' => array(
169 '0.6' => esc_html__('XS', 'darkify-pro'),
170 '0.8' => esc_html__('S', 'darkify-pro'),
171 '1' => esc_html__('M', 'darkify-pro'),
172 '1.2' => esc_html__('L', 'darkify-pro'),
173 '1.4' => esc_html__('XL', 'darkify-pro'),
174 '1.6' => esc_html__('XXL', 'darkify-pro'),
175 'custom' => esc_html__('Custom', 'darkify-pro'),
176 ),
177 'default' => '1',
178 ),
179 array(
180 'id' => 'switch_size_custom',
181 'type' => 'slider',
182 'title' => esc_html__('Custom Switch Size', 'darkify-pro'),
183 'title_help' => '<div class="darkify-info-label">' . esc_html__('Scale in percentage relative to normal size.', 'darkify-pro') . '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' . esc_html__('Live Demo', 'darkify-pro') . '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switch-appearance" target="_blank">' . esc_html__('Open Docs', 'darkify-pro') . '</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 array(
257 'id' => 'tooltip_on_floating_switch',
258 'type' => 'fieldset',
259 'fields' => array(
260 array(
261 'id' => 'floating_switch_width',
262 'type' => 'switcher',
263 'title' => esc_html__('Tooltip on Floating Switch', 'darkify'),
264 'title_help' =>
265 '<div class="darkify-info-label">' .
266 __('Display a tooltip hint on the dark mode floating switch.', 'darkify') .
267 '</div>' .
268 '<a class="tooltip_btn_primary" href="' . esc_url(DARKIFY_DEMO_URL . 'switches/#custom_switches') . '" target="_blank" rel="noopener noreferrer">' .
269 __('Live Demo', 'darkify') .
270 '</a>' .
271 '<a class="tooltip_btn_secondary" href="' . esc_url(DARKIFY_DOCS_URL . 'switcher/#tooltips') . '" target="_blank" rel="noopener noreferrer">' .
272 __('Open Docs', 'darkify') .
273 '</a>',
274 'text_on' => esc_html__('Enabled', 'darkify'),
275 'text_off' => esc_html__('Disabled', 'darkify'),
276 'text_width' => 100,
277 'default' => false,
278 ),
279 array(
280 'id' => 'tooltip_position',
281 'type' => 'button_set',
282 'title' => esc_html__('Tooltip Position', 'darkify'),
283 'title_help' =>
284 '<div class="darkify-info-label">' .
285 __('Choose where the tooltip should appear relative to the floating switch.', 'darkify') .
286 '</div>' .
287 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank">' .
288 __('Live Demo', 'darkify') .
289 '</a>' .
290 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#tooltips" target="_blank">' .
291 __('Open Docs', 'darkify') .
292 '</a>',
293 'options' => array(
294 'left' => esc_html__('Left', 'darkify'),
295 'right' => esc_html__('Right', 'darkify'),
296 'top' => esc_html__('Top', 'darkify'),
297 'bottom' => esc_html__('Bottom', 'darkify'),
298 ),
299 'default' => 'left',
300 'dependency' => array('floating_switch_width', '==', 'true'),
301 ),
302 array(
303 'id' => 'tooltip_text',
304 'type' => 'text',
305 'title' => esc_html__('Tooltip Text', 'darkify'),
306 'title_help' =>
307 '<div class="darkify-info-label">' .
308 __('Add tooltip text for floating switch toggler.', 'darkify') .
309 '</div>' .
310 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switchers" target="_blank">' .
311 __('Live Demo', 'darkify') .
312 '</a>' .
313 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-customization" target="_blank">' .
314 __('Open Docs', 'darkify') .
315 '</a>',
316 'default' => esc_html__('Toggle Dark Mode', 'darkify'),
317 'dependency' => array('floating_switch_width', '==', 'true'),
318 ),
319
320 array(
321 'id' => 'tooltip_color',
322 'type' => 'color_group',
323 'title' => esc_html__('Tooltip Color', 'darkify'),
324 'title_help' =>
325 '<div class="darkify-info-label">' .
326 __('Customize the tooltip colors and appearance.', 'darkify') .
327 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank">' .
328 __('Live Demo', 'darkify') .
329 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#tooltips" target="_blank">' .
330 __('Open Docs', 'darkify') .
331 '</a>',
332 'options' => array(
333 'tooltip_background_color' => esc_html__('Background', 'darkify'),
334 'tooltip_text_color' => esc_html__('Color', 'darkify'),
335 ),
336 'default' => array(
337 'tooltip_background_color' => '#142434',
338 'tooltip_text_color' => '#B0CBE7',
339 ),
340 'dependency' => array('floating_switch_width', '==', 'true'),
341 ),
342
343 ),
344 ),
345 array(
346 'id' => 'alternative_dark_mode_switcher',
347 'type' => 'text',
348 'title' => esc_html__('Alternative Dark Mode Switch', 'darkify'),
349 'title_help' =>
350 '<div class="darkify-info-label">' .
351 __('Enter comma-separated CSS class or ID selectors to use them as alternative dark mode switches.', 'darkify') .
352 '</div>' .
353 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank">' .
354 __('Live Demo', 'darkify') .
355 '</a>' .
356 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#tooltips" target="_blank">' .
357 __('Open Docs', 'darkify') .
358 '</a>',
359 'placeholder' => esc_html__('e.g., .my-dark-switch, #dark-mode-toggle', 'darkify'),
360 ),
361 array(
362 'id' => 'switcher_shortcode',
363 'type' => 'switcher_shortcode',
364 'title' => esc_html__('Switcher Shortcode', 'darkify'),
365 'title_help' => '<div class="darkify-info-content">' .
366 __('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') .
367 '</div>' .
368 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank" rel="noopener noreferrer">' .
369 __('Live Demo', 'darkify') .
370 '</a>' .
371 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#advanced-options" target="_blank" rel="noopener noreferrer">' .
372 __('Open Docs', 'darkify') .
373 '</a>',
374 'dependency' => array('enable_dark_switcher', 'not-any', 'orbit,duality,dual,shift'),
375 ),
376 array(
377 'id' => 'switcher_shortcode_v2',
378 'type' => 'switcher_shortcode_v2',
379 'title' => esc_html__('Switcher Shortcode', 'darkify'),
380 'title_help' => '<div class="darkify-info-content">' .
381 __('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') .
382 '</div>' .
383 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#custom_switches" target="_blank" rel="noopener noreferrer">' .
384 __('Live Demo', 'darkify') .
385 '</a>' .
386 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#advanced-options" target="_blank" rel="noopener noreferrer">' .
387 __('Open Docs', 'darkify') .
388 '</a>',
389 'dependency' => array('enable_dark_switcher', 'any', 'orbit,duality,dual,shift'),
390 ),
391 )
392 ),
393 array(
394 'title' => esc_html__('Positioning', 'darkify'),
395 'icon' => 'icofont-hand-drag',
396 'fields' => array(
397 // Switch Position
398 array(
399 'id' => 'switcher_button_position',
400 'type' => 'fieldset',
401 'fields' => array(
402 array(
403 'id' => 'dark_mode_switch_position',
404 'type' => 'button_set',
405 'title' => esc_html__('Switch Position', 'darkify'),
406 'title_help' =>
407 '<div class="darkify-info-label">' .
408 __('Choose the screen position where the floating switch should be displayed.', 'darkify') .
409 '</div>' .
410 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
411 __('Live Demo', 'darkify') .
412 '</a>' .
413 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
414 __('Open Docs', 'darkify') .
415 '</a>',
416 'options' => array(
417 'bottom_right' => esc_html__('Bottom Right', 'darkify'),
418 'bottom_left' => esc_html__('Bottom Left', 'darkify'),
419 'top_right' => esc_html__('Top Right', 'darkify'),
420 'top_left' => esc_html__('Top Left', 'darkify'),
421 ),
422 'default' => 'bottom_right',
423 ),
424 array(
425 'id' => 'switch_position_top_right',
426 'type' => 'spacing',
427 'title' => esc_html__('Margin From Top Right', 'darkify'),
428
429 'title_help' =>
430 '<div class="darkify-info-label">' .
431 __('Customize default margin from the top right of the Floating Switch.', 'darkify') .
432 '</div>' .
433 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
434 __('Live Demo', 'darkify') .
435 '</a>' .
436 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
437 __('Open Docs', 'darkify') .
438 '</a>',
439
440 'left' => false,
441 'bottom' => false,
442 'units' => ['px'],
443 'default' => array(
444 'top' => '40',
445 'right' => '40',
446 ),
447 'dependency' => array('dark_mode_switch_position', '==', 'top_right'),
448 ),
449 array(
450 'id' => 'switch_position_top_left',
451 'type' => 'spacing',
452 'title' => esc_html__('Margin from Top Left', 'darkify'),
453 'title_help' =>
454 '<div class="darkify-info-label">' .
455 __('Customize the default margin from the top-left position of the floating switch.', 'darkify') .
456 '</div>' .
457 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
458 __('Live Demo', 'darkify') .
459 '</a>' .
460 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
461 __('Open Docs', 'darkify') .
462 '</a>',
463
464 'right' => false,
465 'bottom' => false,
466 'units' => ['px'],
467 'default' => array(
468 'top' => '40',
469 'left' => '40',
470 ),
471 'dependency' => array('dark_mode_switch_position', '==', 'top_left'),
472 ),
473 array(
474 'id' => 'switch_position_bottom_right',
475 'type' => 'spacing',
476 'title' => esc_html__('Margin From Bottom Right', 'darkify'),
477
478 'title_help' =>
479 '<div class="darkify-info-label">' .
480 __('Customize the default margin from the bottom-right position of the floating switch.', 'darkify') .
481 '</div>' .
482 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
483 __('Live Demo', 'darkify') .
484 '</a>' .
485 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
486 __('Open Docs', 'darkify') .
487 '</a>',
488
489 'left' => false,
490 'top' => false,
491 'units' => ['px'],
492 'default' => array(
493 'bottom' => '40',
494 'right' => '40',
495 ),
496 'dependency' => array('dark_mode_switch_position', '==', 'bottom_right'),
497 ),
498 array(
499 'id' => 'switch_position_bottom_left',
500 'type' => 'spacing',
501 'title' => esc_html__('Margin from Bottom Left', 'darkify'),
502 'title_help' =>
503 '<div class="darkify-info-label">' .
504 __('Customize the default margin from the bottom-left position of the floating switch.', 'darkify') .
505 '</div>' .
506 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
507 __('Live Demo', 'darkify') .
508 '</a>' .
509 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
510 __('Open Docs', 'darkify') .
511 '</a>',
512
513 'right' => false,
514 'top' => false,
515 'units' => ['px'],
516 'default' => array(
517 'bottom' => '40',
518 'left' => '40',
519 ),
520 'dependency' => array('dark_mode_switch_position', '==', 'bottom_left'),
521 ),
522 ),
523 ),
524
525 // Different Switch Position in Mobile
526 array(
527 'id' => 'different_switch_in_mobile',
528 'type' => 'fieldset',
529 'fields' => array(
530 array(
531 'id' => 'switch_position_different_in_mobile',
532 'type' => 'switcher',
533 'title' => esc_html__('Different Switch Position on Mobile', 'darkify'),
534 'title_help' =>
535 '<div class="darkify-info-label">' .
536 __('Choose whether the floating switch should be displayed in a different position on mobile devices.', 'darkify') .
537 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
538 __('Live Demo', 'darkify') .
539 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
540 __('Open Docs', 'darkify') .
541 '</a>',
542
543 'text_on' => esc_html__('Yes', 'darkify'),
544 'text_off' => esc_html__('No', 'darkify'),
545
546 ),
547 array(
548 'id' => 'switch_position_in_mobile',
549 'type' => 'button_set',
550 'title' => esc_html__('Switch Position on Mobile', 'darkify'),
551
552 'title_help' =>
553 '<div class="darkify-info-label">' .
554 __('Choose the screen position where the floating switch should be displayed on mobile devices.', 'darkify') .
555 '</div>' .
556 '<a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
557 __('Live Demo', 'darkify') .
558 '</a>' .
559 '<a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
560 __('Open Docs', 'darkify') .
561 '</a>',
562
563 'options' => array(
564 'bottom_right' => esc_html__('Bottom Right', 'darkify'),
565 'bottom_left' => esc_html__('Bottom Left', 'darkify'),
566 'top_right' => esc_html__('Top Right', 'darkify'),
567 'top_left' => esc_html__('Top Left', 'darkify'),
568 ),
569
570 'default' => 'bottom_right',
571 'dependency' => array('switch_position_different_in_mobile', '==', 'true'),
572 ),
573 array(
574 'id' => 'switch_position_top_right_in_mobile',
575 'type' => 'spacing',
576 'title' => esc_html__('Margin from Top Right on Mobile', 'darkify'),
577 'title_help' =>
578 '<div class="darkify-info-label">' .
579 __('Adjust the default margin from the top-right position of the floating switch on mobile devices.', 'darkify') .
580 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
581 __('Live Demo', 'darkify') .
582 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
583 __('Open Docs', 'darkify') .
584 '</a>',
585
586
587 'left' => false,
588 'bottom' => false,
589 'units' => ['px'],
590 'default' => array(
591 'top' => '40',
592 'right' => '40',
593 ),
594 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_right'),
595 ),
596 array(
597 'id' => 'switch_position_top_left_in_mobile',
598 'type' => 'spacing',
599 'title' => esc_html__('Margin from Top Left on Mobile', 'darkify'),
600 'title_help' =>
601 '<div class="darkify-info-label">' .
602 __('Adjust the default margin from the top-left position of the floating switch on mobile devices.', 'darkify') .
603 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
604 __('Live Demo', 'darkify') .
605 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
606 __('Open Docs', 'darkify') .
607 '</a>',
608
609 'right' => false,
610 'bottom' => false,
611 'units' => ['px'],
612 'default' => array(
613 'top' => '40',
614 'left' => '40',
615 ),
616 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|top_left'),
617 ),
618 array(
619 'id' => 'switch_position_bottom_right_in_mobile',
620 'type' => 'spacing',
621 'title' => esc_html__('Margin from Bottom Right on Mobile', 'darkify'),
622 'title_help' =>
623 '<div class="darkify-info-label">' .
624 __('Adjust the default margin from the bottom-right position of the floating switch on mobile devices.', 'darkify') .
625 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
626 __('Live Demo', 'darkify') .
627 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
628 __('Open Docs', 'darkify') .
629 '</a>',
630
631 'left' => false,
632 'top' => false,
633 'units' => ['px'],
634 'default' => array(
635 'bottom' => '40',
636 'right' => '40',
637 ),
638 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_right'),
639 ),
640 array(
641 'id' => 'switch_position_bottom_left_in_mobile',
642 'type' => 'spacing',
643 'title' => esc_html__('Margin from Bottom Left on Mobile', 'darkify'),
644 'title_help' =>
645 '<div class="darkify-info-label">' .
646 __('Adjust the default margin from the bottom-left position of the floating switch on mobile devices.', 'darkify') .
647 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
648 __('Live Demo', 'darkify') .
649 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
650 __('Open Docs', 'darkify') .
651 '</a>',
652
653 'right' => false,
654 'top' => false,
655 'units' => ['px'],
656 'default' => array(
657 'bottom' => '40',
658 'left' => '40',
659 ),
660 'dependency' => array('switch_position_different_in_mobile|switch_position_in_mobile', '==|==', 'true|bottom_left'),
661 ),
662 ),
663 ),
664 array(
665 'id' => 'enable_absolute_position',
666 'type' => 'switcher',
667 'title' => esc_html__('Absolute Switch Position', 'darkify'),
668
669 'title_help' =>
670 '<div class="darkify-info-label">' .
671 __('Enable this option to allow the floating switch to scroll along with the page.', 'darkify') .
672 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
673 __('Live Demo', 'darkify') .
674 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
675 __('Open Docs', 'darkify') .
676 '</a>',
677 'text_on' => esc_html__('Enabled', 'darkify'),
678 'text_off' => esc_html__('Disabled', 'darkify'),
679 'text_width' => '100',
680 ),
681 array(
682 'id' => 'enable_switch_dragging',
683 'type' => 'switcher',
684 'title' => esc_html__('Draggable Position Change', 'darkify'),
685 'title_help' =>
686 '<div class="darkify-info-label">' .
687 __('Enable this option to allow users to change the floating switch position by dragging it.', 'darkify') .
688 '</div><a class="tooltip_btn_primary" href="' . DARKIFY_DEMO_URL . 'switches/#switcher-positioning" target="_blank">' .
689 __('Live Demo', 'darkify') .
690 '</a><a class="tooltip_btn_secondary" href="' . DARKIFY_DOCS_URL . 'switcher/#switcher-positioning" target="_blank">' .
691 __('Open Docs', 'darkify') .
692 '</a>',
693
694 'text_on' => esc_html__('Enabled', 'darkify'),
695 'text_off' => esc_html__('Disabled', 'darkify'),
696 'text_width' => '100',
697
698 'class' => 'switcher_pro_only',
699 ),
700 )
701 ),
702 )
703 ),
704 )
705 )
706 );
707 }
708 }
709