PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.3.1
Adminify – White Label, Admin Menu Editor, Login Customizer v4.3.1
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.3.1, at Inc/Admin/Options/Customize.php

746 lines 26.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PXLBSAdminify\Inc\Admin\Options;
4
5 use PXLBSAdminify\Inc\Utils;
6 use PXLBSAdminify\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' => __('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' => __('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::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 \PXLBSAdminify\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' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-1.png',
159 'preset2' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-2.png',
160 'preset3' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-3.png',
161 'preset4' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-4.png',
162 'preset5' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-5.png',
163 'preset6' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-6.png',
164 'preset7' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-7.png',
165 'preset8' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-8.png',
166 'preset9' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-9.png',
167 'custom' => PXLBSADMINIFY_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::upgrade_pro_notice(),
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 /* translators: %s: pro upgrade badge HTML */
185 'title' => sprintf(__('Custom Color Preset %s', 'adminify'), Utils::upgrade_pro_badge()),
186 'subtitle' => __('Custom Template Color Presets', 'adminify'),
187 'options' => [
188 '--adminify-preset-background' => __('Body BG', 'adminify'),
189 '--adminify-primary' => __('Primary Color', 'adminify'),
190 '--adminify-menu-bg' => __('Menu BG', 'adminify'),
191 '--adminify-menu-text-color' => __('Menu Text', 'adminify'),
192 '--adminify-menu-border' => __('Menu Border', 'adminify'),
193 '--adminify-notif-bg-color' => __('Notification BG', 'adminify'),
194 ],
195 'default' => $this->get_default_field('adminify_theme_custom_colors'),
196 'dependency' => ['adminify_theme|admin_ui', '==|==', 'custom|true', 'true'],
197 ];
198 }
199
200
201 public function general_glass_effect_bg(&$fields)
202 {
203 $fields[] = [
204 'id' => 'admin_glass_effect',
205 'title' => __('Glass Effect', 'adminify'),
206 'type' => 'notice',
207 'style' => 'warning',
208 'content' => Utils::upgrade_pro_notice(),
209 ];
210 }
211
212 // Admin Bar Settings
213 public function admin_bar_settings( &$fields ){
214
215 $fields[] = [
216 'id' => 'admin_bar_search',
217 'type' => 'switcher',
218 'title' => __('Search Form', 'adminify'),
219 'text_on' => __('Show', 'adminify'),
220 'text_off' => __('Hide', 'adminify'),
221 'text_width' => '100',
222 'default' => $this->get_default_field('admin_bar_search'),
223 'dependency' => ['admin_ui', '==', 'true', 'true'],
224 ];
225
226 $fields[] = [
227 'id' => 'admin_bar_notif',
228 'type' => 'switcher',
229 'title' => __('Notifications Icon', 'adminify'),
230 'text_on' => __('Show', 'adminify'),
231 'text_off' => __('Hide', 'adminify'),
232 'text_width' => '100',
233 'default' => $this->get_default_field('admin_bar_notif'),
234 'dependency' => ['admin_ui', '==', 'true', 'true'],
235 ];
236
237 $fields[] = [
238 'id' => 'admin_bar_dark_light_btn',
239 'type' => 'switcher',
240 'title' => __('Light/Dark Switcher', 'adminify'),
241 'text_on' => __('Show', 'adminify'),
242 'text_off' => __('Hide', 'adminify'),
243 'text_width' => '100',
244 'default' => $this->get_default_field('admin_bar_dark_light_btn'),
245 ];
246 }
247
248 // Body Color Settings
249 public function body_fields_settings(&$fields)
250 {
251 $background_settings = [];
252 $this->background_settings($background_settings);
253
254 $fields[] = [
255 'id' => 'body_fields',
256 'type' => 'fieldset',
257 'class' => 'adminify-nopadding',
258 /* translators: %s: pro upgrade badge HTML */
259 'title' => sprintf(__('Custom Background %s', 'adminify'), Utils::upgrade_pro_badge()),
260 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'),
261 'fields' => $background_settings,
262 'dependency' => ['admin_ui', '==', 'true', 'true'],
263 ];
264
265 $fields[] = [
266 'id' => 'admin_general_google_font',
267 'type' => 'typography',
268 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
269 /* translators: %s: pro upgrade badge HTML */
270 'title' => sprintf(__('Body Font %s', 'adminify'), Utils::upgrade_pro_badge()),
271 'line_height' => false,
272 'text_align' => false,
273 'text_transform' => false,
274 'subset' => false,
275 'letter_spacing' => false,
276 'font_size' => false,
277 'color' => false,
278 'default' => $this->get_default_field('admin_general_google_font'),
279 // 'dependency' => ['admin_ui', '==', 'true'],
280 ];
281
282 $fields[] = [
283 'id' => 'admin_favicon_logo',
284 'type' => 'media',
285 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
286 /* translators: %s: pro upgrade badge HTML */
287 'title' => sprintf(__('Admin Favicon %s', 'adminify'), Utils::upgrade_pro_badge()),
288 'subtitle' => __('Admin Area Favicon Icon', 'adminify'),
289 'library' => 'image',
290 'preview_size' => 'thumbnail',
291 'button_title' => __('Add Favicon', 'adminify'),
292 'remove_title' => __('Remove Favicon', 'adminify'),
293 'default' => $this->get_default_field('admin_favicon_logo'),
294 ];
295
296 // Gutenberg Editor Logo. WordPress 7.1 dropped the class this hooks
297 // onto, so the field is only offered where it can still do something.
298 if ( Utils::is_wp_below_7_1() ) {
299 $fields[] = [
300 'id' => 'gutenberg_editor_logo',
301 'type' => 'media',
302 /* translators: %s: pro upgrade badge HTML */
303 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::upgrade_pro_badge()),
304 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
305 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'),
306 'library' => 'image',
307 'preview_size' => 'thumbnail',
308 'button_title' => __('Add Editor Logo', 'adminify'),
309 'remove_title' => __('Remove Editor Logo', 'adminify'),
310 'default' => $this->get_default_field('gutenberg_editor_logo'),
311 ];
312 }
313
314 }
315
316
317
318 public function background_settings(&$fields)
319 {
320 $fields[] = [
321 'id' => 'adminify_custom_bg',
322 'type' => 'switcher',
323 'title' => '',
324 'class' => '!adminify-flex adminify-pt-0 adminify-pl-0 adminify-pro-feature',
325 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'),
326 'text_on' => __('Show', 'adminify'),
327 'text_off' => __('Hide', 'adminify'),
328 'text_width' => 80,
329 'default' => $this->get_default_field('body_fields')['adminify_custom_bg'],
330 ];
331
332
333 $fields[] = [
334 'id' => 'admin_general_bg',
335 'type' => 'button_set',
336 'class' => Utils::upgrade_pro_notice_class(),
337 'title' => 'Background Type',
338 'options' => [
339 // 'color' => __('Color', 'adminify'),
340 'gradient' => __('Gradient', 'adminify'),
341 'image' => __('Image', 'adminify'),
342 // 'slideshow' => __('Slideshow', 'adminify'),
343 // 'video' => __('Video', 'adminify'),
344 ],
345 'default' => $this->get_default_field('body_fields')['admin_general_bg'],
346 'dependency' => ['adminify_custom_bg', '==', 'true', true],
347 ];
348
349 // $fields[] = [
350 // 'id' => 'admin_general_bg_color',
351 // 'type' => 'color',
352 // 'title' => __('Background Color', 'adminify'),
353 // 'default' => $this->get_default_field('body_fields')['admin_general_bg_color'],
354 // 'dependency' => ['admin_general_bg', '==', 'color', true],
355 // ];
356
357 // Gradient BG
358 $fields[] = [
359 'id' => 'admin_general_bg_gradient',
360 'type' => 'background',
361 'class' => Utils::upgrade_pro_notice_class(),
362 'title' => __('Gradient Color', 'adminify'),
363 'background_color' => true,
364 'background_image' => false,
365 'background_position' => false,
366 'background_repeat' => false,
367 'background_attachment' => true,
368 'background_size' => false,
369 'background_origin' => false,
370 'background_clip' => false,
371 'background_blend_mode' => false,
372 'background_gradient' => true,
373 'default' => $this->get_default_field('body_fields')['admin_general_bg_gradient'],
374 'dependency' => ['admin_general_bg|adminify_custom_bg', '==|==', 'gradient|true', true],
375 ];
376
377 // Image
378 $fields[] = [
379 'id' => 'admin_general_bg_image',
380 'type' => 'background',
381 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer',
382 'title' => __('Background Image', 'adminify'),
383 'background_color' => false,
384 'background_image' => true,
385 'background_position' => true,
386 'background_repeat' => true,
387 'background_attachment' => true,
388 'background_size' => true,
389 'background_origin' => false,
390 'background_clip' => false,
391 'background_blend_mode' => false,
392 'background_gradient' => false,
393 'default' => $this->get_default_field('body_fields')['admin_general_bg_image'],
394 'dependency' => ['admin_general_bg|adminify_custom_bg', '==|==', 'image|true', true],
395 ];
396 }
397
398
399 public function buttons_customize_settings(&$fields)
400 {
401 // $fields[] = [
402 // 'type' => 'subheading',
403 // 'content' => __('Button Customization', 'adminify'),
404 // ];
405
406 // $fields[] = [
407 // 'id' => 'admin_general_button_color',
408 // 'type' => 'color_group',
409 // 'title' => __('Button', 'adminify'),
410 // 'subtitle' => __('Change Admin Button Colors', 'adminify'),
411 // 'options' => [
412 // 'primary_color' => __('Primary Color', 'adminify'),
413 // 'secondary_color' => __('Secondary Color', 'adminify'),
414 // ],
415 // 'default' => $this->get_default_field('admin_general_button_color'),
416 // ];
417
418 // $fields[] = [
419 // 'id' => 'admin_danger_button_color',
420 // 'type' => 'color_group',
421 // 'title' => __('Danger Button', 'adminify'),
422 // 'subtitle' => __('Change Admin Delete Button Colors', 'adminify'),
423 // 'options' => [
424 // 'primary_color' => __('Background Color', 'adminify'),
425 // 'secondary_color' => __('Hover Background Color', 'adminify'),
426 // ],
427 // 'default' => $this->get_default_field('admin_danger_button_color'),
428 // ];
429 }
430
431
432 /**
433 * Logo Options Settings
434 *
435 * @return void
436 */
437 public function layout_mode_setting_fields(&$fields)
438 {
439 $dark_light_data[] = [
440 'id' => 'admin_ui_mode',
441 'type' => 'button_set',
442 'title' => __('Layout Mode', 'adminify'),
443 'options' => [
444 'light' => __('Light Mode', 'adminify'),
445 'dark' => __('Dark Mode', 'adminify'),
446 ],
447 'default' => $this->get_default_field('light_dark_mode')['admin_ui_mode'],
448 ];
449
450
451 $dark_light_data[] = [
452 'id' => 'admin_ui_logo_type',
453 'type' => 'button_set',
454 'title' => __('Logo Type', 'adminify'),
455 'options' => [
456 'image_logo' => __('Image', 'adminify'),
457 'text_logo' => __('Text', 'adminify'),
458 ],
459 'default' => $this->get_default_field('light_dark_mode')['admin_ui_logo_type'],
460 'dependency' => ['admin_ui', '==', 'true', 'true'],
461 ];
462
463 $dark_light_data[] = [
464 'id' => 'admin_ui_light_mode',
465 'title' => ' ',
466 'class' => 'adminify-one-col adminify-pl-0',
467 'type' => 'fieldset',
468 'fields' => [
469 [
470 'id' => 'admin_ui_light_logo_text',
471 'type' => 'text',
472 'title' => __('Logo Text', 'adminify'),
473 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
474 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo_text'],
475 ],
476 [
477 'id' => 'admin_ui_light_logo_text_typo',
478 'type' => 'typography',
479 'title' => __('Logo Text Typography', 'adminify'),
480 'font_family' => true,
481 'font_weight' => true,
482 'font_style' => true,
483 'font_size' => true,
484 'line_height' => false,
485 'letter_spacing' => true,
486 'text_align' => false,
487 'text_transform' => false,
488 'color' => true,
489 'subset' => false,
490 'word_spacing' => false,
491 'text_decoration' => false,
492 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
493 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo_text_typo'],
494 ],
495 [
496 'id' => 'admin_ui_light_logo',
497 'type' => 'media',
498 'title' => __('Light Logo', 'adminify'),
499 'library' => 'image',
500 'preview_size' => 'thumbnail',
501 'button_title' => __('Add Light Logo', 'adminify'),
502 'remove_title' => __('Remove Light Logo', 'adminify'),
503 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo'],
504 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
505 ],
506 [
507 'id' => 'light_logo_size',
508 'type' => 'dimensions',
509 'title' => __('Logo Size', 'adminify'),
510 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['light_logo_size'],
511 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
512 ],
513
514 [
515 'id' => 'mini_admin_ui_light_logo',
516 'type' => 'media',
517 'title' => __('Mini Logo', 'adminify'),
518 'library' => 'image',
519 'preview_size' => 'thumbnail',
520 'button_title' => __('Add Mini Light Logo', 'adminify'),
521 'remove_title' => __('Remove Mini Light Logo', 'adminify'),
522 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['mini_admin_ui_light_logo'],
523 'dependency' => ['admin_ui|layout_type', '==|==|==', 'true|vertical', 'true'],
524 ],
525 ],
526 'dependency' => ['admin_ui|admin_ui_mode', '==|==', 'true|light', 'true'],
527 ];
528
529 $dark_light_data[] = [
530 'id' => 'admin_ui_dark_mode',
531 'type' => 'fieldset',
532 'title' => ' ',
533 'class' => 'adminify-one-col adminify-pl-0',
534 'fields' => [
535 [
536 'id' => 'admin_ui_dark_logo_text',
537 'type' => 'text',
538 'title' => __('Logo Text', 'adminify'),
539 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo_text'],
540 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
541 ],
542 [
543 'id' => 'admin_ui_dark_logo_text_typo',
544 'type' => 'typography',
545 'title' => __('Logo Text Typography', 'adminify'),
546 'font_family' => true,
547 'font_weight' => true,
548 'font_style' => true,
549 'font_size' => true,
550 'line_height' => false,
551 'letter_spacing' => true,
552 'text_align' => false,
553 'text_transform' => false,
554 'color' => true,
555 'subset' => false,
556 'word_spacing' => false,
557 'text_decoration' => false,
558 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
559 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo_text_typo'],
560 ],
561 [
562 'id' => 'admin_ui_dark_logo',
563 'type' => 'media',
564 'title' => __('Dark Logo', 'adminify'),
565 'library' => 'image',
566 'preview_size' => 'thumbnail',
567 'button_title' => __('Add Dark Logo', 'adminify'),
568 'remove_title' => __('Remove Dark Logo', 'adminify'),
569 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo'],
570 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
571 ],
572 [
573 'id' => 'dark_logo_size',
574 'type' => 'dimensions',
575 'title' => __('Logo Size', 'adminify'),
576 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['dark_logo_size'],
577 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
578 ],
579 [
580 'id' => 'mini_admin_ui_dark_logo',
581 'type' => 'media',
582 'title' => __('Mini Logo', 'adminify'),
583 'library' => 'image',
584 'preview_size' => 'thumbnail',
585 'button_title' => __('Add Dark Mini Logo', 'adminify'),
586 'remove_title' => __('Remove Dark Mini Logo', 'adminify'),
587 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['mini_admin_ui_dark_logo'],
588 'dependency' => ['admin_ui_logo_type|admin_ui|layout_type', '==|==|==', 'image_logo|true|vertical', 'true'],
589 ],
590
591 [
592 'id' => 'schedule_dark_mode',
593 /* translators: %s: pro upgrade badge HTML */
594 'title' => sprintf(__('Schedule Dark Mode %s', 'adminify'), Utils::upgrade_pro_badge()),
595 'type' => 'fieldset',
596 'class' => 'adminify-mt-10',
597 'fields' => [
598 [
599 'id' => 'enable_schedule_dark_mode',
600 'type' => 'switcher',
601 'class' => 'adminify-pro-feature adminify-pt-0 adminify-pl-0',
602 'text_on' => __('Enable', 'adminify'),
603 'text_off' => __('Disable', 'adminify'),
604 'text_width' => '100',
605 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['enable_schedule_dark_mode'],
606 ],
607 [
608 'id' => 'schedule_dark_mode_type',
609 'title' => __('Schedule Type', 'adminify'),
610 'type' => 'button_set',
611 'class' => Utils::upgrade_pro_notice_class(),
612 'options' => [
613 'system' => __('System', 'adminify'),
614 'custom' => __('Custom', 'adminify'),
615 ],
616 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_type'],
617 'dependency' => ['enable_schedule_dark_mode|admin_ui_mode', '==|==', 'true|dark', 'true'],
618 ],
619 [
620 'id' => 'schedule_dark_mode_start_time',
621 'type' => 'datetime',
622 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer',
623 'title' => __('Start Time', 'adminify'),
624 'settings' => [
625 'noCalendar' => true,
626 'enableTime' => true,
627 ],
628 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_start_time'],
629 'dependency' => [
630 [
631 'enable_schedule_dark_mode', '==', 'true', 'true'
632 ],
633 [
634 'schedule_dark_mode_type', '==', 'custom', 'true'
635 ],
636 ],
637 ],
638 [
639 'id' => 'schedule_dark_mode_end_time',
640 'type' => 'datetime',
641 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer',
642 'title' => __('End Time', 'adminify'),
643 'settings' => [
644 'noCalendar' => true,
645 'enableTime' => true,
646 ],
647 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_end_time'],
648 'dependency' => [
649 [
650 'enable_schedule_dark_mode', '==', 'true', 'true'
651 ],
652 [
653 'schedule_dark_mode_type', '==', 'custom', 'true'
654 ],
655 ],
656 ]
657 ],
658 'dependency' => ['admin_ui_mode', '==', 'dark', 'true'],
659 ]
660
661 ],
662 'dependency' => ['admin_ui|admin_ui_mode', '==|==', 'true|dark', 'true'],
663 ];
664
665 $fields[] = array(
666 'id' => 'light_dark_mode',
667 'type' => 'fieldset',
668 'title' => __('Light/Dark Mode', 'adminify'),
669 'subtitle' => __('Enable/Disable Light or Dark Mode', 'adminify'),
670 'fields' => $dark_light_data,
671 'default' => $this->get_default_field('light_dark_mode'),
672 'dependency' => ['admin_ui', '==', 'true', 'true'],
673 );
674 }
675
676
677 /**
678 * Post Status colors
679 */
680 public function post_status_bg_colors(&$fields)
681 {
682
683
684 $fields[] = [
685 'id' => 'post_status_bg_colors',
686 'type' => 'color_group',
687 'class' => 'adminify-pro-fieldset',
688 /* translators: %s: pro upgrade badge HTML */
689 'title' => sprintf(__('Post Status Background Colors %s', 'adminify'), Utils::upgrade_pro_badge()),
690 'subtitle' => __('Background Color by Post Status type', 'adminify'),
691 'options' => [
692 'publish' => __('Publish BG Color', 'adminify'),
693 'pending' => __('Pending BG Color', 'adminify'),
694 'future' => __('Future BG Color', 'adminify'),
695 'private' => __('Private BG Color', 'adminify'),
696 'draft' => __('Draft BG Color', 'adminify'),
697 'trash' => __('Trash BG Color', 'adminify'),
698 ],
699 'default' => $this->get_default_field('post_status_bg_colors'),
700 ];
701 }
702
703 public function gutenberg_editor_customization( &$fields){
704 $fields[] = [
705
706 ];
707 }
708
709 public function admin_customization( &$fields){
710 }
711
712 public function customize_settings() {
713 if ( ! class_exists( 'ADMINIFY' ) ) {
714 return;
715 }
716
717
718 $fields = [];
719
720 $this->admin_ui_settings($fields);
721 $this->body_fields_settings($fields);
722 // $this->admin_customization($fields);
723 // self::general_glass_effect_bg($fields);
724 // $this->buttons_customize_settings($fields);
725 $this->layout_mode_setting_fields($fields);
726 $this->admin_bar_settings($fields);
727 // $this->gutenberg_editor_customization($fields);
728
729 $fields = apply_filters('pxlbsadminify_settings/customize', $fields, $this);
730 $this->post_status_bg_colors($fields);
731 $fields = apply_filters('pxlbsadminify_settings/post_status', $fields, $this);
732
733 // Admin UI Section
734 \ADMINIFY::createSection(
735 $this->prefix,
736 [
737 'title' => __('Customize', 'adminify'),
738 'icon' => 'fas fa-fill-drip',
739 'fields' => $fields,
740 ]
741 );
742
743 }
744 }
745 }
746