PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 2.0.4
Adminify – White Label, Admin Menu Editor, Login Customizer v2.0.4
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 / Modules / NotificationBar / Inc / Notification_Customize.php

Notification_Customize.php in Adminify – White Label, Admin Menu Editor, Login Customizer 2.0.4, at Inc/Modules/NotificationBar/Inc/Notification_Customize.php

59 lines 1.9 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\Modules\NotificationBar\Inc;
4
5 use WPAdminify\Inc\Modules\NotificationBar\Inc\Settings\General;
6 use WPAdminify\Inc\Modules\NotificationBar\Inc\Settings\Content;
7 use WPAdminify\Inc\Modules\NotificationBar\Inc\Settings\Style;
8 use WPAdminify\Inc\Modules\NotificationBar\Inc\Settings\Display;
9
10 /**
11 * WP Adminify
12 * Module: Notification Bar Customization
13 *
14 * @author Jewel Theme <support@jeweltheme.com>
15 */
16
17 if (!class_exists('Notification_Customize')) {
18 class Notification_Customize extends NotificationBarModel
19 {
20 public $defaults = [];
21
22 public function __construct()
23 {
24 // this should be first so the default values get stored
25 $this->notification_bar_options();
26 parent::__construct((array) get_option($this->prefix));
27 }
28
29
30 protected function get_defaults()
31 {
32 return $this->defaults;
33 }
34
35 public function notification_bar_options()
36 {
37 if (!class_exists('ADMINIFY')) {
38 return;
39 }
40 // Create customize options
41 \ADMINIFY::createCustomizeOptions($this->prefix, array(
42 'database' => 'option',
43 'transport' => 'postMessage',
44 'capability' => 'manage_options',
45 'save_defaults' => true,
46 'enqueue_webfont' => true,
47 'async_webfont' => false,
48 'output_css' => true,
49 ));
50
51
52 $this->defaults = array_merge($this->defaults, (new General())->get_defaults());
53 $this->defaults = array_merge($this->defaults, (new Content())->get_defaults());
54 $this->defaults = array_merge($this->defaults, (new Style())->get_defaults());
55 $this->defaults = array_merge($this->defaults, (new Display())->get_defaults());
56 }
57 }
58 }
59