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

743 lines 26.7 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
297 $fields[] = [
298 'id' => 'gutenberg_editor_logo',
299 'type' => 'media',
300 /* translators: %s: pro upgrade badge HTML */
301 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::upgrade_pro_badge()),
302 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer',
303 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'),
304 'library' => 'image',
305 'preview_size' => 'thumbnail',
306 'button_title' => __('Add Editor Logo', 'adminify'),
307 'remove_title' => __('Remove Editor Logo', 'adminify'),
308 'default' => $this->get_default_field('gutenberg_editor_logo'),
309 ];
310
311 }
312
313
314
315 public function background_settings(&$fields)
316 {
317 $fields[] = [
318 'id' => 'adminify_custom_bg',
319 'type' => 'switcher',
320 'title' => '',
321 'class' => '!adminify-flex adminify-pt-0 adminify-pl-0 adminify-pro-feature',
322 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'),
323 'text_on' => __('Show', 'adminify'),
324 'text_off' => __('Hide', 'adminify'),
325 'text_width' => 80,
326 'default' => $this->get_default_field('body_fields')['adminify_custom_bg'],
327 ];
328
329
330 $fields[] = [
331 'id' => 'admin_general_bg',
332 'type' => 'button_set',
333 'class' => Utils::upgrade_pro_notice_class(),
334 'title' => 'Background Type',
335 'options' => [
336 // 'color' => __('Color', 'adminify'),
337 'gradient' => __('Gradient', 'adminify'),
338 'image' => __('Image', 'adminify'),
339 // 'slideshow' => __('Slideshow', 'adminify'),
340 // 'video' => __('Video', 'adminify'),
341 ],
342 'default' => $this->get_default_field('body_fields')['admin_general_bg'],
343 'dependency' => ['adminify_custom_bg', '==', 'true', true],
344 ];
345
346 // $fields[] = [
347 // 'id' => 'admin_general_bg_color',
348 // 'type' => 'color',
349 // 'title' => __('Background Color', 'adminify'),
350 // 'default' => $this->get_default_field('body_fields')['admin_general_bg_color'],
351 // 'dependency' => ['admin_general_bg', '==', 'color', true],
352 // ];
353
354 // Gradient BG
355 $fields[] = [
356 'id' => 'admin_general_bg_gradient',
357 'type' => 'background',
358 'class' => Utils::upgrade_pro_notice_class(),
359 'title' => __('Gradient Color', 'adminify'),
360 'background_color' => true,
361 'background_image' => false,
362 'background_position' => false,
363 'background_repeat' => false,
364 'background_attachment' => true,
365 'background_size' => false,
366 'background_origin' => false,
367 'background_clip' => false,
368 'background_blend_mode' => false,
369 'background_gradient' => true,
370 'default' => $this->get_default_field('body_fields')['admin_general_bg_gradient'],
371 'dependency' => ['admin_general_bg|adminify_custom_bg', '==|==', 'gradient|true', true],
372 ];
373
374 // Image
375 $fields[] = [
376 'id' => 'admin_general_bg_image',
377 'type' => 'background',
378 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer',
379 'title' => __('Background Image', 'adminify'),
380 'background_color' => false,
381 'background_image' => true,
382 'background_position' => true,
383 'background_repeat' => true,
384 'background_attachment' => true,
385 'background_size' => true,
386 'background_origin' => false,
387 'background_clip' => false,
388 'background_blend_mode' => false,
389 'background_gradient' => false,
390 'default' => $this->get_default_field('body_fields')['admin_general_bg_image'],
391 'dependency' => ['admin_general_bg|adminify_custom_bg', '==|==', 'image|true', true],
392 ];
393 }
394
395
396 public function buttons_customize_settings(&$fields)
397 {
398 // $fields[] = [
399 // 'type' => 'subheading',
400 // 'content' => __('Button Customization', 'adminify'),
401 // ];
402
403 // $fields[] = [
404 // 'id' => 'admin_general_button_color',
405 // 'type' => 'color_group',
406 // 'title' => __('Button', 'adminify'),
407 // 'subtitle' => __('Change Admin Button Colors', 'adminify'),
408 // 'options' => [
409 // 'primary_color' => __('Primary Color', 'adminify'),
410 // 'secondary_color' => __('Secondary Color', 'adminify'),
411 // ],
412 // 'default' => $this->get_default_field('admin_general_button_color'),
413 // ];
414
415 // $fields[] = [
416 // 'id' => 'admin_danger_button_color',
417 // 'type' => 'color_group',
418 // 'title' => __('Danger Button', 'adminify'),
419 // 'subtitle' => __('Change Admin Delete Button Colors', 'adminify'),
420 // 'options' => [
421 // 'primary_color' => __('Background Color', 'adminify'),
422 // 'secondary_color' => __('Hover Background Color', 'adminify'),
423 // ],
424 // 'default' => $this->get_default_field('admin_danger_button_color'),
425 // ];
426 }
427
428
429 /**
430 * Logo Options Settings
431 *
432 * @return void
433 */
434 public function layout_mode_setting_fields(&$fields)
435 {
436 $dark_light_data[] = [
437 'id' => 'admin_ui_mode',
438 'type' => 'button_set',
439 'title' => __('Layout Mode', 'adminify'),
440 'options' => [
441 'light' => __('Light Mode', 'adminify'),
442 'dark' => __('Dark Mode', 'adminify'),
443 ],
444 'default' => $this->get_default_field('light_dark_mode')['admin_ui_mode'],
445 ];
446
447
448 $dark_light_data[] = [
449 'id' => 'admin_ui_logo_type',
450 'type' => 'button_set',
451 'title' => __('Logo Type', 'adminify'),
452 'options' => [
453 'image_logo' => __('Image', 'adminify'),
454 'text_logo' => __('Text', 'adminify'),
455 ],
456 'default' => $this->get_default_field('light_dark_mode')['admin_ui_logo_type'],
457 'dependency' => ['admin_ui', '==', 'true', 'true'],
458 ];
459
460 $dark_light_data[] = [
461 'id' => 'admin_ui_light_mode',
462 'title' => ' ',
463 'class' => 'adminify-one-col adminify-pl-0',
464 'type' => 'fieldset',
465 'fields' => [
466 [
467 'id' => 'admin_ui_light_logo_text',
468 'type' => 'text',
469 'title' => __('Logo Text', 'adminify'),
470 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
471 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo_text'],
472 ],
473 [
474 'id' => 'admin_ui_light_logo_text_typo',
475 'type' => 'typography',
476 'title' => __('Logo Text Typography', 'adminify'),
477 'font_family' => true,
478 'font_weight' => true,
479 'font_style' => true,
480 'font_size' => true,
481 'line_height' => false,
482 'letter_spacing' => true,
483 'text_align' => false,
484 'text_transform' => false,
485 'color' => true,
486 'subset' => false,
487 'word_spacing' => false,
488 'text_decoration' => false,
489 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
490 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo_text_typo'],
491 ],
492 [
493 'id' => 'admin_ui_light_logo',
494 'type' => 'media',
495 'title' => __('Light Logo', 'adminify'),
496 'library' => 'image',
497 'preview_size' => 'thumbnail',
498 'button_title' => __('Add Light Logo', 'adminify'),
499 'remove_title' => __('Remove Light Logo', 'adminify'),
500 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['admin_ui_light_logo'],
501 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
502 ],
503 [
504 'id' => 'light_logo_size',
505 'type' => 'dimensions',
506 'title' => __('Logo Size', 'adminify'),
507 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['light_logo_size'],
508 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
509 ],
510
511 [
512 'id' => 'mini_admin_ui_light_logo',
513 'type' => 'media',
514 'title' => __('Mini Logo', 'adminify'),
515 'library' => 'image',
516 'preview_size' => 'thumbnail',
517 'button_title' => __('Add Mini Light Logo', 'adminify'),
518 'remove_title' => __('Remove Mini Light Logo', 'adminify'),
519 'default' => $this->get_default_field('light_dark_mode')['admin_ui_light_mode']['mini_admin_ui_light_logo'],
520 'dependency' => ['admin_ui|layout_type', '==|==|==', 'true|vertical', 'true'],
521 ],
522 ],
523 'dependency' => ['admin_ui|admin_ui_mode', '==|==', 'true|light', 'true'],
524 ];
525
526 $dark_light_data[] = [
527 'id' => 'admin_ui_dark_mode',
528 'type' => 'fieldset',
529 'title' => ' ',
530 'class' => 'adminify-one-col adminify-pl-0',
531 'fields' => [
532 [
533 'id' => 'admin_ui_dark_logo_text',
534 'type' => 'text',
535 'title' => __('Logo Text', 'adminify'),
536 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo_text'],
537 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
538 ],
539 [
540 'id' => 'admin_ui_dark_logo_text_typo',
541 'type' => 'typography',
542 'title' => __('Logo Text Typography', 'adminify'),
543 'font_family' => true,
544 'font_weight' => true,
545 'font_style' => true,
546 'font_size' => true,
547 'line_height' => false,
548 'letter_spacing' => true,
549 'text_align' => false,
550 'text_transform' => false,
551 'color' => true,
552 'subset' => false,
553 'word_spacing' => false,
554 'text_decoration' => false,
555 'dependency' => ['admin_ui_logo_type', '==', 'text_logo', 'true'],
556 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo_text_typo'],
557 ],
558 [
559 'id' => 'admin_ui_dark_logo',
560 'type' => 'media',
561 'title' => __('Dark Logo', 'adminify'),
562 'library' => 'image',
563 'preview_size' => 'thumbnail',
564 'button_title' => __('Add Dark Logo', 'adminify'),
565 'remove_title' => __('Remove Dark Logo', 'adminify'),
566 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['admin_ui_dark_logo'],
567 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
568 ],
569 [
570 'id' => 'dark_logo_size',
571 'type' => 'dimensions',
572 'title' => __('Logo Size', 'adminify'),
573 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['dark_logo_size'],
574 'dependency' => ['admin_ui_logo_type', '==', 'image_logo', 'true'],
575 ],
576 [
577 'id' => 'mini_admin_ui_dark_logo',
578 'type' => 'media',
579 'title' => __('Mini Logo', 'adminify'),
580 'library' => 'image',
581 'preview_size' => 'thumbnail',
582 'button_title' => __('Add Dark Mini Logo', 'adminify'),
583 'remove_title' => __('Remove Dark Mini Logo', 'adminify'),
584 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['mini_admin_ui_dark_logo'],
585 'dependency' => ['admin_ui_logo_type|admin_ui|layout_type', '==|==|==', 'image_logo|true|vertical', 'true'],
586 ],
587
588 [
589 'id' => 'schedule_dark_mode',
590 /* translators: %s: pro upgrade badge HTML */
591 'title' => sprintf(__('Schedule Dark Mode %s', 'adminify'), Utils::upgrade_pro_badge()),
592 'type' => 'fieldset',
593 'class' => 'adminify-mt-10',
594 'fields' => [
595 [
596 'id' => 'enable_schedule_dark_mode',
597 'type' => 'switcher',
598 'class' => 'adminify-pro-feature adminify-pt-0 adminify-pl-0',
599 'text_on' => __('Enable', 'adminify'),
600 'text_off' => __('Disable', 'adminify'),
601 'text_width' => '100',
602 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['enable_schedule_dark_mode'],
603 ],
604 [
605 'id' => 'schedule_dark_mode_type',
606 'title' => __('Schedule Type', 'adminify'),
607 'type' => 'button_set',
608 'class' => Utils::upgrade_pro_notice_class(),
609 'options' => [
610 'system' => __('System', 'adminify'),
611 'custom' => __('Custom', 'adminify'),
612 ],
613 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_type'],
614 'dependency' => ['enable_schedule_dark_mode|admin_ui_mode', '==|==', 'true|dark', 'true'],
615 ],
616 [
617 'id' => 'schedule_dark_mode_start_time',
618 'type' => 'datetime',
619 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer',
620 'title' => __('Start Time', 'adminify'),
621 'settings' => [
622 'noCalendar' => true,
623 'enableTime' => true,
624 ],
625 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_start_time'],
626 'dependency' => [
627 [
628 'enable_schedule_dark_mode', '==', 'true', 'true'
629 ],
630 [
631 'schedule_dark_mode_type', '==', 'custom', 'true'
632 ],
633 ],
634 ],
635 [
636 'id' => 'schedule_dark_mode_end_time',
637 'type' => 'datetime',
638 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer',
639 'title' => __('End Time', 'adminify'),
640 'settings' => [
641 'noCalendar' => true,
642 'enableTime' => true,
643 ],
644 'default' => $this->get_default_field('light_dark_mode')['admin_ui_dark_mode']['schedule_dark_mode']['schedule_dark_mode_end_time'],
645 'dependency' => [
646 [
647 'enable_schedule_dark_mode', '==', 'true', 'true'
648 ],
649 [
650 'schedule_dark_mode_type', '==', 'custom', 'true'
651 ],
652 ],
653 ]
654 ],
655 'dependency' => ['admin_ui_mode', '==', 'dark', 'true'],
656 ]
657
658 ],
659 'dependency' => ['admin_ui|admin_ui_mode', '==|==', 'true|dark', 'true'],
660 ];
661
662 $fields[] = array(
663 'id' => 'light_dark_mode',
664 'type' => 'fieldset',
665 'title' => __('Light/Dark Mode', 'adminify'),
666 'subtitle' => __('Enable/Disable Light or Dark Mode', 'adminify'),
667 'fields' => $dark_light_data,
668 'default' => $this->get_default_field('light_dark_mode'),
669 'dependency' => ['admin_ui', '==', 'true', 'true'],
670 );
671 }
672
673
674 /**
675 * Post Status colors
676 */
677 public function post_status_bg_colors(&$fields)
678 {
679
680
681 $fields[] = [
682 'id' => 'post_status_bg_colors',
683 'type' => 'color_group',
684 'class' => 'adminify-pro-fieldset',
685 /* translators: %s: pro upgrade badge HTML */
686 'title' => sprintf(__('Post Status Background Colors %s', 'adminify'), Utils::upgrade_pro_badge()),
687 'subtitle' => __('Background Color by Post Status type', 'adminify'),
688 'options' => [
689 'publish' => __('Publish BG Color', 'adminify'),
690 'pending' => __('Pending BG Color', 'adminify'),
691 'future' => __('Future BG Color', 'adminify'),
692 'private' => __('Private BG Color', 'adminify'),
693 'draft' => __('Draft BG Color', 'adminify'),
694 'trash' => __('Trash BG Color', 'adminify'),
695 ],
696 'default' => $this->get_default_field('post_status_bg_colors'),
697 ];
698 }
699
700 public function gutenberg_editor_customization( &$fields){
701 $fields[] = [
702
703 ];
704 }
705
706 public function admin_customization( &$fields){
707 }
708
709 public function customize_settings() {
710 if ( ! class_exists( 'ADMINIFY' ) ) {
711 return;
712 }
713
714
715 $fields = [];
716
717 $this->admin_ui_settings($fields);
718 $this->body_fields_settings($fields);
719 // $this->admin_customization($fields);
720 // self::general_glass_effect_bg($fields);
721 // $this->buttons_customize_settings($fields);
722 $this->layout_mode_setting_fields($fields);
723 $this->admin_bar_settings($fields);
724 // $this->gutenberg_editor_customization($fields);
725
726 $fields = apply_filters('pxlbsadminify_settings/customize', $fields, $this);
727 $this->post_status_bg_colors($fields);
728 $fields = apply_filters('pxlbsadminify_settings/post_status', $fields, $this);
729
730 // Admin UI Section
731 \ADMINIFY::createSection(
732 $this->prefix,
733 [
734 'title' => __('Customize', 'adminify'),
735 'icon' => 'fas fa-fill-drip',
736 'fields' => $fields,
737 ]
738 );
739
740 }
741 }
742 }
743