PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.1.3
Adminify – White Label, Admin Menu Editor, Login Customizer v4.1.3
4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.1.17 All 164 releases
adminify / Inc / Admin / Options / Customize.php

Customize.php in Adminify – White Label, Admin Menu Editor, Login Customizer 4.1.3, at Inc/Admin/Options/Customize.php

736 lines 26.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPAdminify\Inc\Admin\Options;
4
5 use WPAdminify\Inc\Utils;
6 use WPAdminify\Inc\Admin\AdminSettingsModel;
7
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 die;
11 } // Cannot access directly.
12
13 if ( ! class_exists( 'Customize' ) ) {
14 class Customize extends AdminSettingsModel {
15
16 public $defaults = [];
17
18 public function __construct() {
19 $this->customize_settings();
20 }
21
22 public function get_defaults()
23 {
24 return [
25 'admin_ui' => false,
26 'gutenberg_editor_logo' => '',
27 'admin_favicon_logo' => [],
28 'adminify_theme' => 'preset1',
29 'admin_bar_search' => true,
30 'admin_bar_notif' => true,
31 'admin_bar_dark_light_btn' => true,
32 'body_fields' => [
33 'adminify_custom_bg' => false,
34 'admin_general_bg' => 'gradient',
35 // 'admin_general_bg_color' => '',
36 'admin_general_bg_gradient' => [
37 'background-color' => '#0347FF',
38 'background-gradient-color' => '#fd1919',
39 'background-gradient-direction' => '135deg',
40 ],
41 'admin_general_bg_image' => '',
42 // 'admin_general_bg_slideshow' => '',
43 // 'admin_general_bg_video_type' => 'youtube',
44 // 'admin_general_bg_video_self_hosted' => '',
45 // 'admin_general_bg_video_youtube' => '',
46 // 'admin_general_bg_video_loop' => true,
47 // 'admin_general_bg_video_poster' => '',
48 ],
49 'adminify_theme_custom_colors' => [
50 '--adminify-preset-background' => '#F9F9F9',
51 '--adminify-primary' => '#3a3ae9',
52 '--adminify-menu-bg' => '#4738a6',
53 '--adminify-menu-text-color' => '#ffffff',
54 '--adminify-menu-border' => '#7062cd',
55 '--adminify-notif-bg-color' => '#FD49A0',
56 ],
57 'admin_general_google_font' => [
58 'font-family' => '',
59 'font-weight' => '400',
60 'type' => 'google',
61 'font-size' => '',
62 'line-height' => '',
63 'color' => '',
64 'output' => 'body',
65 ],
66 'admin_glass_effect' => true,
67 // 'admin_general_button_color' => [
68 // 'primary_color' => '#0347FF',
69 // 'secondary_color' => '#fff',
70 // ],
71 // 'admin_danger_button_color' => [
72 // 'primary_color' => '#c30052',
73 // 'secondary_color' => '#fff',
74 // ],
75
76 // Dark/Light Mode Settings
77 'light_dark_mode' => [
78 'admin_ui_mode' => 'light',
79 'admin_ui_logo_type' => 'image_logo',
80 'admin_ui_light_mode' => [
81 'admin_ui_light_logo_text' => __('WP Adminify', 'adminify'),
82 'admin_ui_light_logo_text_typo' => '',
83 'admin_ui_light_logo' => [
84 'url' => ''
85 ],
86 'mini_admin_ui_light_logo' => '',
87 'light_logo_size' => [
88 'width' => '120',
89 'height' => '32',
90 'unit' => 'px',
91 ]
92 ],
93 'admin_ui_dark_mode' => [
94 'admin_ui_dark_logo_text' => __('WP Adminify', 'adminify'),
95 'admin_ui_dark_logo_text_typo' => '',
96 'admin_ui_dark_logo' => '',
97 'mini_admin_ui_dark_logo' => '',
98 'dark_logo_size' => [
99 'width' => '150',
100 'height' => '45',
101 'unit' => 'px',
102 ],
103 'schedule_dark_mode' => [
104 'enable_schedule_dark_mode' => false,
105 'schedule_dark_mode_type' => 'system',
106 'schedule_dark_mode_start_time' => '',
107 'schedule_dark_mode_end_time' => '',
108 ]
109 ],
110
111 ],
112
113
114
115 // Post Status Colors
116 'post_status_bg_colors' => [
117 'publish' => 'transparent',
118 'pending' => 'transparent',
119 'future' => 'transparent',
120 'private' => 'transparent',
121 'draft' => 'transparent',
122 'trash' => 'transparent',
123 ],
124 ];
125 }
126
127 public function admin_ui_settings(&$fields)
128 {
129 $fields[] = [
130 'id' => 'layout_mode_setting_subheading',
131 'type' => 'subheading',
132 'content' => Utils::adminfiy_help_urls(
133 '<span></span>',
134 'https://wpadminify.com/docs/adminify/customize/adminify-ui-templates',
135 'https://www.youtube.com/watch?v=jeWdKbEHYVU',
136 'https://www.facebook.com/groups/jeweltheme',
137 \WPAdminify\Inc\Admin\AdminSettings::support_url()
138 ),
139 ];
140
141 $fields[] = [
142 'id' => 'admin_ui',
143 'type' => 'switcher',
144 'title' => __('Adminify UI', 'adminify'),
145 'subtitle' => __('Choose to Enable Adminify UI for your Dashboard.', 'adminify'),
146 'text_on' => __('Enable', 'adminify'),
147 'text_off' => __('Disable', 'adminify'),
148 'text_width' => '100',
149 'default' => $this->get_default_field('admin_ui'),
150 ];
151
152
153 $fields[] = [
154 'id' => 'adminify_theme',
155 'type' => 'image_select',
156 'title' => __('Adminify UI Templates', 'adminify'),
157 'options' => [
158 'preset1' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-1.png',
159 'preset2' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-2.png',
160 'preset3' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-3.png',
161 'preset4' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-4.png',
162 'preset5' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-5.png',
163 'preset6' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-6.png',
164 'preset7' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-7.png',
165 'preset8' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-8.png',
166 'preset9' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-9.png',
167 'custom' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-10.png',
168 ],
169 'default' => $this->get_default_field('adminify_theme'),
170 'dependency' => ['admin_ui', '==', 'true'],
171 ];
172
173 $fields[] = [
174 // 'id' => 'adminify_theme_custom_colors',
175 // 'title' => __(' ', 'adminify'),
176 // 'type' => 'notice',
177 // 'style' => 'warning',
178 // 'content' => Utils::adminify_upgrade_pro(),
179 // 'dependency' => [ 'adminify_theme|adminify_theme', '!=|!=', 'preset1|preset2', 'any'],
180
181 'id' => 'adminify_theme_custom_colors',
182 'type' => 'color_group',
183 'class' => 'adminify-pro-fieldset',
184 'title' => sprintf(__('Custom Color Preset %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
185 'subtitle' => __('Custom Template Color Presets', 'adminify'),
186 'options' => [
187 '--adminify-preset-background' => __('Body BG', 'adminify'),
188 '--adminify-primary' => __('Primary Color', 'adminify'),
189 '--adminify-menu-bg' => __('Menu BG', 'adminify'),
190 '--adminify-menu-text-color' => __('Menu Text', 'adminify'),
191 '--adminify-menu-border' => __('Menu Border', 'adminify'),
192 '--adminify-notif-bg-color' => __('Notification BG', 'adminify'),
193 ],
194 'default' => $this->get_default_field('adminify_theme_custom_colors'),
195 'dependency' => ['adminify_theme|admin_ui', '==|==', 'custom|true', 'true'],
196 ];
197 }
198
199
200 public function general_glass_effect_bg(&$fields)
201 {
202 $fields[] = [
203 'id' => 'admin_glass_effect',
204 'title' => __('Glass Effect', 'adminify'),
205 'type' => 'notice',
206 'style' => 'warning',
207 'content' => Utils::adminify_upgrade_pro(),
208 ];
209 }
210
211 // Admin Bar Settings
212 public function admin_bar_settings( &$fields ){
213
214 $fields[] = [
215 'id' => 'admin_bar_search',
216 'type' => 'switcher',
217 'title' => __('Search Form', 'adminify'),
218 'text_on' => __('Show', 'adminify'),
219 'text_off' => __('Hide', 'adminify'),
220 'text_width' => '100',
221 'default' => $this->get_default_field('admin_bar_search'),
222 'dependency' => ['admin_ui', '==', 'true', 'true'],
223 ];
224
225 $fields[] = [
226 'id' => 'admin_bar_notif',
227 'type' => 'switcher',
228 'title' => __('Notifications Icon', 'adminify'),
229 'text_on' => __('Show', 'adminify'),
230 'text_off' => __('Hide', 'adminify'),
231 'text_width' => '100',
232 'default' => $this->get_default_field('admin_bar_notif'),
233 'dependency' => ['admin_ui', '==', 'true', 'true'],
234 ];
235
236 $fields[] = [
237 'id' => 'admin_bar_dark_light_btn',
238 'type' => 'switcher',
239 'title' => __('Light/Dark Switcher', 'adminify'),
240 'text_on' => __('Show', 'adminify'),
241 'text_off' => __('Hide', 'adminify'),
242 'text_width' => '100',
243 'default' => $this->get_default_field('admin_bar_dark_light_btn'),
244 ];
245 }
246
247 // Body Color Settings
248 public function body_fields_settings(&$fields)
249 {
250 $background_settings = [];
251 $this->background_settings($background_settings);
252
253 $fields[] = [
254 'id' => 'body_fields',
255 'type' => 'fieldset',
256 'class' => 'adminify-nopadding',
257 'title' => sprintf(__('Custom Background %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
258 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'),
259 'fields' => $background_settings,
260 'dependency' => ['admin_ui', '==', 'true', 'true'],
261 ];
262
263 $fields[] = [
264 'id' => 'admin_general_google_font',
265 'type' => 'typography',
266 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
267 'title' => sprintf(__('Body Font %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
268 'line_height' => false,
269 'text_align' => false,
270 'text_transform' => false,
271 'subset' => false,
272 'letter_spacing' => false,
273 'font_size' => false,
274 'color' => false,
275 'default' => $this->get_default_field('admin_general_google_font'),
276 // 'dependency' => ['admin_ui', '==', 'true'],
277 ];
278
279 $fields[] = [
280 'id' => 'admin_favicon_logo',
281 'type' => 'media',
282 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
283 'title' => sprintf(__('Admin Favicon %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
284 'subtitle' => __('Admin Area Favicon Icon', 'adminify'),
285 'library' => 'image',
286 'preview_size' => 'thumbnail',
287 'button_title' => __('Add Favicon', 'adminify'),
288 'remove_title' => __('Remove Favicon', 'adminify'),
289 'default' => $this->get_default_field('admin_favicon_logo'),
290 ];
291
292 // Gutenberg Editor Logo
293 $fields[] = [
294 'id' => 'gutenberg_editor_logo',
295 'type' => 'media',
296 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
297 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
298 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'),
299 'library' => 'image',
300 'preview_size' => 'thumbnail',
301 'button_title' => __('Add Editor Logo', 'adminify'),
302 'remove_title' => __('Remove Editor Logo', 'adminify'),
303 'default' => $this->get_default_field('gutenberg_editor_logo'),
304 ];
305
306 }
307
308
309
310 public function background_settings(&$fields)
311 {
312 $fields[] = [
313 'id' => 'adminify_custom_bg',
314 'type' => 'switcher',
315 'title' => __('', 'adminify'),
316 'class' => '!adminify-flex adminify-pt-0 adminify-pl-0 adminify-pro-feature',
317 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'),
318 'text_on' => __('Show', 'adminify'),
319 'text_off' => __('Hide', 'adminify'),
320 'text_width' => 80,
321 'default' => $this->get_default_field('body_fields')['adminify_custom_bg'],
322 ];
323
324
325 $fields[] = [
326 'id' => 'admin_general_bg',
327 'type' => 'button_set',
328 'class' => Utils::upgrade_pro_class(),
329 'title' => 'Background Type',
330 'options' => [
331 // 'color' => __('Color', 'adminify'),
332 'gradient' => __('Gradient', 'adminify'),
333 'image' => __('Image', 'adminify'),
334 // 'slideshow' => __('Slideshow', 'adminify'),
335 // 'video' => __('Video', 'adminify'),
336 ],
337 'default' => $this->get_default_field('body_fields')['admin_general_bg'],
338 'dependency' => ['adminify_custom_bg', '==', 'true', true],
339 ];
340
341 // $fields[] = [
342 // 'id' => 'admin_general_bg_color',
343 // 'type' => 'color',
344 // 'title' => __('Background Color', 'adminify'),
345 // 'default' => $this->get_default_field('body_fields')['admin_general_bg_color'],
346 // 'dependency' => ['admin_general_bg', '==', 'color', true],
347 // ];
348
349 // Gradient BG
350 $fields[] = [
351 'id' => 'admin_general_bg_gradient',
352 'type' => 'background',
353 'class' => Utils::upgrade_pro_class(),
354 'title' => __('Gradient Color', 'adminify'),
355 'background_color' => true,
356 'background_image' => false,
357 'background_position' => false,
358 'background_repeat' => false,
359 'background_attachment' => true,
360 'background_size' => false,
361 'background_origin' => false,
362 'background_clip' => false,
363 'background_blend_mode' => false,
364 'background_gradient' => true,
365 'default' => $this->get_default_field('body_fields')['admin_general_bg_gradient'],
366 'dependency' => ['admin_general_bg|adminify_custom_bg', '==|==', 'gradient|true', true],
367 ];
368
369 // Image
370 $fields[] = [
371 'id' => 'admin_general_bg_image',
372 'type' => 'background',
373 'class' => Utils::upgrade_pro_class() . ' adminify-pro-pointer',
374 'title' => __('Background Image', 'adminify'),
375 'background_color' => false,
376 'background_image' => true,
377 'background_position' => true,
378 'background_repeat' => true,
379 'background_attachment' => true,
380 'background_size' => true,
381 'background_origin' => false,
382 'background_clip' => false,
383 'background_blend_mode' => false,
384 'background_gradient' => false,
385 'default' => $this->get_default_field('body_fields')['admin_general_bg_image'],
386 'dependency' => ['admin_general_bg|adminify_custom_bg', '==|==', 'image|true', true],
387 ];
388 }
389
390
391 public function buttons_customize_settings(&$fields)
392 {
393 // $fields[] = [
394 // 'type' => 'subheading',
395 // 'content' => __('Button Customization', 'adminify'),
396 // ];
397
398 // $fields[] = [
399 // 'id' => 'admin_general_button_color',
400 // 'type' => 'color_group',
401 // 'title' => __('Button', 'adminify'),
402 // 'subtitle' => __('Change Admin Button Colors', 'adminify'),
403 // 'options' => [
404 // 'primary_color' => __('Primary Color', 'adminify'),
405 // 'secondary_color' => __('Secondary Color', 'adminify'),
406 // ],
407 // 'default' => $this->get_default_field('admin_general_button_color'),
408 // ];
409
410 // $fields[] = [
411 // 'id' => 'admin_danger_button_color',
412 // 'type' => 'color_group',
413 // 'title' => __('Danger Button', 'adminify'),
414 // 'subtitle' => __('Change Admin Delete Button Colors', 'adminify'),
415 // 'options' => [
416 // 'primary_color' => __('Background Color', 'adminify'),
417 // 'secondary_color' => __('Hover Background Color', 'adminify'),
418 // ],
419 // 'default' => $this->get_default_field('admin_danger_button_color'),
420 // ];
421 }
422
423
424 /**
425 * Logo Options Settings
426 *
427 * @return void
428 */
429 public function layout_mode_setting_fields(&$fields)
430 {
431 $dark_light_data[] = [
432 'id' => 'admin_ui_mode',
433 'type' => 'button_set',
434 'title' => __('Layout Mode', 'adminify'),
435 'options' => [
436 'light' => __('Light Mode', 'adminify'),
437 'dark' => __('Dark Mode', 'adminify'),
438 ],
439 'default' => $this->get_default_field('light_dark_mode')['admin_ui_mode'],
440 ];
441
442
443 $dark_light_data[] = [
444 'id' => 'admin_ui_logo_type',
445 'type' => 'button_set',
446 'title' => __('Logo Type', 'adminify'),
447 'options' => [
448 'image_logo' => __('Image', 'adminify'),
449 'text_logo' => __('Text', 'adminify'),
450 ],
451 'default' => $this->get_default_field('light_dark_mode')['admin_ui_logo_type'],
452 'dependency' => ['admin_ui', '==', 'true', 'true'],
453 ];
454
455 $dark_light_data[] = [
456 'id' => 'admin_ui_light_mode',
457 'title' => __(' ', 'adminify'),
458 'class' => 'adminify-one-col adminify-pl-0',
459 'type' => 'fieldset',
460 'fields' => [
461 [
462 'id' => 'admin_ui_light_logo_text',
463 'type' => 'text',
464 'title' => __('Logo Text', 'adminify'),
465 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
466 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo_text'],
467 ],
468 [
469 'id' => 'admin_ui_light_logo_text_typo',
470 'type' => 'typography',
471 'title' => __('Logo Text Typography', 'adminify'),
472 'font_family' => true,
473 'font_weight' => true,
474 'font_style' => true,
475 'font_size' => true,
476 'line_height' => false,
477 'letter_spacing' => true,
478 'text_align' => false,
479 'text_transform' => false,
480 'color' => true,
481 'subset' => false,
482 'word_spacing' => false,
483 'text_decoration' => false,
484 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
485 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo_text_typo'],
486 ],
487 [
488 'id' => 'admin_ui_light_logo',
489 'type' => 'media',
490 'title' => __('Light Logo', 'adminify'),
491 'library' => 'image',
492 'preview_size' => 'thumbnail',
493 'button_title' => __('Add Light Logo', 'adminify'),
494 'remove_title' => __('Remove Light Logo', 'adminify'),
495 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo'],
496 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
497 ],
498 [
499 'id' => 'light_logo_size',
500 'type' => 'dimensions',
501 'title' => __('Logo Size', 'adminify'),
502 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['light_logo_size'],
503 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
504 ],
505
506 [
507 'id' => 'mini_admin_ui_light_logo',
508 'type' => 'media',
509 'title' => __('Mini Logo', 'adminify'),
510 'library' => 'image',
511 'preview_size' => 'thumbnail',
512 'button_title' => __('Add Mini Light Logo', 'adminify'),
513 'remove_title' => __('Remove Mini Light Logo', 'adminify'),
514 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['mini_admin_ui_light_logo'],
515 'dependency' => ['admin_ui|layout_type', '==|==|==', 'true|vertical', 'true'],
516 ],
517 ],
518 'dependency' => ['admin_ui|admin_ui_mode', '==|==', 'true|light', 'true'],
519 ];
520
521 $dark_light_data[] = [
522 'id' => 'admin_ui_dark_mode',
523 'type' => 'fieldset',
524 'title' => __(' ', 'adminify'),
525 'class' => 'adminify-one-col adminify-pl-0',
526 'fields' => [
527 [
528 'id' => 'admin_ui_dark_logo_text',
529 'type' => 'text',
530 'title' => __('Logo Text', 'adminify'),
531 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo_text'],
532 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
533 ],
534 [
535 'id' => 'admin_ui_dark_logo_text_typo',
536 'type' => 'typography',
537 'title' => __('Logo Text Typography', 'adminify'),
538 'font_family' => true,
539 'font_weight' => true,
540 'font_style' => true,
541 'font_size' => true,
542 'line_height' => false,
543 'letter_spacing' => true,
544 'text_align' => false,
545 'text_transform' => false,
546 'color' => true,
547 'subset' => false,
548 'word_spacing' => false,
549 'text_decoration' => false,
550 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
551 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo_text_typo'],
552 ],
553 [
554 'id' => 'admin_ui_dark_logo',
555 'type' => 'media',
556 'title' => __('Dark Logo', 'adminify'),
557 'library' => 'image',
558 'preview_size' => 'thumbnail',
559 'button_title' => __('Add Dark Logo', 'adminify'),
560 'remove_title' => __('Remove Dark Logo', 'adminify'),
561 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo'],
562 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
563 ],
564 [
565 'id' => 'dark_logo_size',
566 'type' => 'dimensions',
567 'title' => __('Logo Size', 'adminify'),
568 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['dark_logo_size'],
569 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
570 ],
571 [
572 'id' => 'mini_admin_ui_dark_logo',
573 'type' => 'media',
574 'title' => __('Mini Logo', 'adminify'),
575 'library' => 'image',
576 'preview_size' => 'thumbnail',
577 'button_title' => __('Add Dark Mini Logo', 'adminify'),
578 'remove_title' => __('Remove Dark Mini Logo', 'adminify'),
579 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['mini_admin_ui_dark_logo'],
580 'dependency' => ['admin_ui_logo_type|admin_ui|layout_type', '==|==|==', 'image_logo|true|vertical', 'true'],
581 ],
582
583 [
584 'id' => 'schedule_dark_mode',
585 'title' => sprintf(__('Schedule Dark Mode %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
586 'type' => 'fieldset',
587 'class' => 'adminify-mt-10',
588 'fields' => [
589 [
590 'id' => 'enable_schedule_dark_mode',
591 'type' => 'switcher',
592 'class' => 'adminify-pro-feature adminify-pt-0 adminify-pl-0',
593 'text_on' => __('Enable', 'adminify'),
594 'text_off' => __('Disable', 'adminify'),
595 'text_width' => '100',
596 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['enable_schedule_dark_mode'],
597 ],
598 [
599 'id' => 'schedule_dark_mode_type',
600 'title' => __('Schedule Type', 'adminify'),
601 'type' => 'button_set',
602 'class' => Utils::upgrade_pro_class(),
603 'options' => [
604 'system' => __('System', 'adminify'),
605 'custom' => __('Custom', 'adminify'),
606 ],
607 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_type'],
608 'dependency' => ['enable_schedule_dark_mode|admin_ui_mode', '==|==', 'true|dark', 'true'],
609 ],
610 [
611 'id' => 'schedule_dark_mode_start_time',
612 'type' => 'datetime',
613 'class' => Utils::upgrade_pro_class() . ' adminify-pro-pointer',
614 'title' => __('Start Time', 'adminify'),
615 'settings' => [
616 'noCalendar' => true,
617 'enableTime' => true,
618 ],
619 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_start_time'],
620 'dependency' => [
621 [
622 'enable_schedule_dark_mode', '==', 'true', 'true'
623 ],
624 [
625 'schedule_dark_mode_type', '==', 'custom', 'true'
626 ],
627 ],
628 ],
629 [
630 'id' => 'schedule_dark_mode_end_time',
631 'type' => 'datetime',
632 'class' => Utils::upgrade_pro_class() . ' adminify-pro-pointer',
633 'title' => __('End Time', 'adminify'),
634 'settings' => [
635 'noCalendar' => true,
636 'enableTime' => true,
637 ],
638 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_end_time'],
639 'dependency' => [
640 [
641 'enable_schedule_dark_mode', '==', 'true', 'true'
642 ],
643 [
644 'schedule_dark_mode_type', '==', 'custom', 'true'
645 ],
646 ],
647 ]
648 ],
649 'dependency' => ['admin_ui_mode', '==', 'dark', 'true'],
650 ]
651
652 ],
653 'dependency' => ['admin_ui|admin_ui_mode', '==|==', 'true|dark', 'true'],
654 ];
655
656 $fields[] = array(
657 'id' => 'light_dark_mode',
658 'type' => 'fieldset',
659 'title' => __('Light/Dark Mode', 'adminify'),
660 'subtitle' => __('Enable/Disable Light or Dark Mode', 'adminify'),
661 'fields' => $dark_light_data,
662 'default' => $this->get_default_field('light_dark_mode'),
663 'dependency' => ['admin_ui', '==', 'true', 'true'],
664 );
665 }
666
667
668 /**
669 * Post Status colors
670 */
671 public function post_status_bg_colors(&$fields)
672 {
673
674
675 $fields[] = [
676 'id' => 'post_status_bg_colors',
677 'type' => 'color_group',
678 'class' => 'adminify-pro-fieldset',
679 'title' => sprintf(__('Post Status Background Colors %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
680 'subtitle' => __('Background Color by Post Status type', 'adminify'),
681 'options' => [
682 'publish' => __('Publish BG Color', 'adminify'),
683 'pending' => __('Pending BG Color', 'adminify'),
684 'future' => __('Future BG Color', 'adminify'),
685 'private' => __('Private BG Color', 'adminify'),
686 'draft' => __('Draft BG Color', 'adminify'),
687 'trash' => __('Trash BG Color', 'adminify'),
688 ],
689 'default' => $this->get_default_field('post_status_bg_colors'),
690 ];
691 }
692
693 public function gutenberg_editor_customization( &$fields){
694 $fields[] = [
695
696 ];
697 }
698
699 public function admin_customization( &$fields){
700 }
701
702 public function customize_settings() {
703 if ( ! class_exists( 'ADMINIFY' ) ) {
704 return;
705 }
706
707
708 $fields = [];
709
710 $this->admin_ui_settings($fields);
711 $this->body_fields_settings($fields);
712 // $this->admin_customization($fields);
713 // self::general_glass_effect_bg($fields);
714 // $this->buttons_customize_settings($fields);
715 $this->layout_mode_setting_fields($fields);
716 $this->admin_bar_settings($fields);
717 // $this->gutenberg_editor_customization($fields);
718
719 $fields = apply_filters('adminify_settings/customize', $fields, $this);
720 $this->post_status_bg_colors($fields);
721 $fields = apply_filters('adminify_settings/post_status', $fields, $this);
722
723 // Admin UI Section
724 \ADMINIFY::createSection(
725 $this->prefix,
726 [
727 'title' => __('Customize', 'adminify'),
728 'icon' => 'fas fa-fill-drip',
729 'fields' => $fields,
730 ]
731 );
732
733 }
734 }
735 }
736