PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 2.0.0
Adminify – White Label, Admin Menu Editor, Login Customizer v2.0.0
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 / General_Settings.php

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

227 lines 7.2 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 if ( !defined( 'ABSPATH' ) ) {
8 die;
9 }
10 // Cannot access directly.
11 class General_Settings extends AdminSettingsModel
12 {
13 public function __construct()
14 {
15 $this->general_settings();
16 }
17
18 public function get_defaults()
19 {
20 return [
21 'admin_general_google_font' => array(
22 'font-family' => 'Nunito Sans',
23 'font-weight' => '400',
24 'type' => 'google',
25 'font-size' => '',
26 'line-height' => '',
27 'color' => '',
28 'output' => 'body',
29 ),
30 'admin_general_bg' => 'color',
31 'admin_general_bg_color' => '',
32 'admin_general_bg_gradient' => array(
33 'background-color' => '#0347FF',
34 'background-gradient-color' => '#fd1919',
35 'background-gradient-direction' => '135deg',
36 ),
37 'admin_general_bg_image' => '',
38 'admin_general_bg_slideshow' => '',
39 'admin_general_bg_video_type' => 'youtube',
40 'admin_general_bg_video_self_hosted' => '',
41 'admin_general_bg_video_youtube' => '',
42 'admin_general_bg_video_loop' => true,
43 'admin_general_bg_video_poster' => '',
44 'admin_glass_effect' => true,
45 'admin_general_button_color' => [
46 'bg_color' => '#0347FF',
47 'hover_bg_color' => '#fff',
48 'text_color' => '#fff',
49 'hover_text_color' => '#0347FF',
50 'border_color' => '#0347FF',
51 'hover_border_color' => '#0347FF',
52 ],
53 ];
54 }
55
56 public function general_google_fonts( &$fields )
57 {
58 $fields[] = array(
59 'type' => 'subheading',
60 'content' => Utils::adminfiy_help_urls(
61 __( 'Customize Settings', WP_ADMINIFY_TD ),
62 'https://wpadminify.com/kb/admin-customization/',
63 'https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8',
64 'https://www.facebook.com/groups/jeweltheme',
65 'https://wpadminify.com/support/'
66 ),
67 );
68 $fields[] = array(
69 'title' => 'Body Font',
70 'type' => 'notice',
71 'style' => 'warning',
72 'content' => Utils::adminify_upgrade_pro(),
73 );
74 }
75
76 public function general_gradient_bg( &$fields )
77 {
78 $fields[] = array(
79 'title' => '',
80 'type' => 'notice',
81 'style' => 'warning',
82 'content' => Utils::adminify_upgrade_pro(),
83 'dependency' => array(
84 'admin_general_bg',
85 '==',
86 'gradient',
87 true
88 ),
89 );
90 }
91
92 public function general_image_bg( &$fields )
93 {
94 $fields[] = array(
95 'title' => '',
96 'type' => 'notice',
97 'style' => 'warning',
98 'content' => Utils::adminify_upgrade_pro(),
99 'dependency' => array(
100 'admin_general_bg',
101 '==',
102 'image',
103 true
104 ),
105 );
106 }
107
108 public function general_slideshow_bg( &$fields )
109 {
110 $fields[] = array(
111 'title' => '',
112 'type' => 'notice',
113 'style' => 'warning',
114 'content' => Utils::adminify_upgrade_pro(),
115 'dependency' => array(
116 'admin_general_bg',
117 '==',
118 'slideshow',
119 true
120 ),
121 );
122 }
123
124 public function general_glass_effect_bg( &$fields )
125 {
126 $fields[] = array(
127 'title' => __( 'Glass Effect', WP_ADMINIFY_TD ),
128 'type' => 'notice',
129 'style' => 'warning',
130 'content' => Utils::adminify_upgrade_pro(),
131 );
132 }
133
134 public function general_video_bg( &$fields )
135 {
136 $fields[] = array(
137 'title' => '',
138 'type' => 'notice',
139 'style' => 'warning',
140 'content' => Utils::adminify_upgrade_pro(),
141 'dependency' => array(
142 'admin_general_bg',
143 '==',
144 'video',
145 true
146 ),
147 );
148 }
149
150 public function general_fields( &$fields )
151 {
152 $fields[] = array(
153 'type' => 'subheading',
154 'content' => __( 'Body Color', WP_ADMINIFY_TD ),
155 );
156 $fields[] = array(
157 'id' => 'admin_general_bg',
158 'type' => 'button_set',
159 'title' => 'Background Type',
160 'options' => array(
161 'color' => 'Color',
162 'gradient' => 'Gradient',
163 'image' => 'Image',
164 'slideshow' => 'Slideshow',
165 'video' => 'Video',
166 ),
167 'default' => 'color',
168 );
169 $fields[] = array(
170 'id' => 'admin_general_bg_color',
171 'type' => 'color',
172 'title' => 'Background Color',
173 'default' => '',
174 'dependency' => array(
175 'admin_general_bg',
176 '==',
177 'color',
178 true
179 ),
180 );
181 }
182
183 public function general_customization( &$fields )
184 {
185 $fields[] = array(
186 'type' => 'subheading',
187 'content' => __( 'General Customization', WP_ADMINIFY_TD ),
188 );
189 $fields[] = array(
190 'id' => 'admin_general_button_color',
191 'type' => 'color_group',
192 'title' => __( 'Button Color', WP_ADMINIFY_TD ),
193 'subtitle' => __( 'Change Admin default Button Colors', WP_ADMINIFY_TD ),
194 'options' => array(
195 'bg_color' => __( 'BG Color', WP_ADMINIFY_TD ),
196 'hover_bg_color' => __( 'Hover BG Color', WP_ADMINIFY_TD ),
197 'text_color' => __( 'Text Color', WP_ADMINIFY_TD ),
198 'hover_text_color' => __( 'Hover Text Color', WP_ADMINIFY_TD ),
199 'border_color' => __( 'Border Color', WP_ADMINIFY_TD ),
200 'hover_border_color' => __( 'Hover Border Color', WP_ADMINIFY_TD ),
201 ),
202 'default' => $this->get_default_field( 'admin_general_button_color' ),
203 );
204 }
205
206 public function general_settings()
207 {
208 if ( !class_exists( 'ADMINIFY' ) ) {
209 return;
210 }
211 $fields = [];
212 $this->general_google_fonts( $fields );
213 $this->general_fields( $fields );
214 $this->general_gradient_bg( $fields );
215 $this->general_image_bg( $fields );
216 $this->general_slideshow_bg( $fields );
217 $this->general_video_bg( $fields );
218 // self::general_glass_effect_bg($fields);
219 $this->general_customization( $fields );
220 \ADMINIFY::createSection( $this->prefix, array(
221 'title' => __( 'Customize', WP_ADMINIFY_TD ),
222 'icon' => 'fas fa-fill-drip',
223 'fields' => $fields,
224 ) );
225 }
226
227 }