PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 1.0.8
Adminify – White Label, Admin Menu Editor, Login Customizer v1.0.8
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 1.0.8, at Inc/Admin/Options/General_Settings.php

195 lines 5.7 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 ];
46 }
47
48 public function general_google_fonts( &$fields )
49 {
50 $fields[] = array(
51 'type' => 'subheading',
52 'content' => Utils::adminfiy_help_urls(
53 __( 'Customize Settings', WP_ADMINIFY_TD ),
54 'https://wpadminify.com/kb/admin-customization/',
55 'https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8',
56 'https://www.facebook.com/groups/jeweltheme',
57 'https://wpadminify.com/support/'
58 ),
59 );
60 $fields[] = array(
61 'title' => 'Body Font',
62 'type' => 'notice',
63 'style' => 'warning',
64 'content' => Utils::adminify_upgrade_pro(),
65 );
66 }
67
68 public function general_gradient_bg( &$fields )
69 {
70 $fields[] = array(
71 'title' => '',
72 'type' => 'notice',
73 'style' => 'warning',
74 'content' => Utils::adminify_upgrade_pro(),
75 'dependency' => array(
76 'admin_general_bg',
77 '==',
78 'gradient',
79 true
80 ),
81 );
82 }
83
84 public function general_image_bg( &$fields )
85 {
86 $fields[] = array(
87 'title' => '',
88 'type' => 'notice',
89 'style' => 'warning',
90 'content' => Utils::adminify_upgrade_pro(),
91 'dependency' => array(
92 'admin_general_bg',
93 '==',
94 'image',
95 true
96 ),
97 );
98 }
99
100 public function general_slideshow_bg( &$fields )
101 {
102 $fields[] = array(
103 'title' => '',
104 'type' => 'notice',
105 'style' => 'warning',
106 'content' => Utils::adminify_upgrade_pro(),
107 'dependency' => array(
108 'admin_general_bg',
109 '==',
110 'slideshow',
111 true
112 ),
113 );
114 }
115
116 public function general_glass_effect_bg( &$fields )
117 {
118 $fields[] = array(
119 'title' => __( 'Glass Effect', WP_ADMINIFY_TD ),
120 'type' => 'notice',
121 'style' => 'warning',
122 'content' => Utils::adminify_upgrade_pro(),
123 );
124 }
125
126 public function general_video_bg( &$fields )
127 {
128 $fields[] = array(
129 'title' => '',
130 'type' => 'notice',
131 'style' => 'warning',
132 'content' => Utils::adminify_upgrade_pro(),
133 'dependency' => array(
134 'admin_general_bg',
135 '==',
136 'video',
137 true
138 ),
139 );
140 }
141
142 public function general_fields( &$fields )
143 {
144 $fields[] = array(
145 'type' => 'subheading',
146 'content' => __( 'Body Color Customization', WP_ADMINIFY_TD ),
147 );
148 $fields[] = array(
149 'id' => 'admin_general_bg',
150 'type' => 'button_set',
151 'title' => 'Background Type',
152 'options' => array(
153 'color' => 'Color',
154 'gradient' => 'Gradient',
155 'image' => 'Image',
156 'slideshow' => 'Slideshow',
157 'video' => 'Video',
158 ),
159 'default' => 'color',
160 );
161 $fields[] = array(
162 'id' => 'admin_general_bg_color',
163 'type' => 'color',
164 'title' => 'Background Color',
165 'default' => '',
166 'dependency' => array(
167 'admin_general_bg',
168 '==',
169 'color',
170 true
171 ),
172 );
173 }
174
175 public function general_settings()
176 {
177 if ( !class_exists( 'ADMINIFY' ) ) {
178 return;
179 }
180 $fields = [];
181 $this->general_google_fonts( $fields );
182 $this->general_fields( $fields );
183 $this->general_gradient_bg( $fields );
184 $this->general_image_bg( $fields );
185 $this->general_slideshow_bg( $fields );
186 $this->general_video_bg( $fields );
187 // self::general_glass_effect_bg($fields);
188 \ADMINIFY::createSection( $this->prefix, array(
189 'title' => __( 'Customize', WP_ADMINIFY_TD ),
190 'icon' => 'fas fa-fill-drip',
191 'fields' => $fields,
192 ) );
193 }
194
195 }