PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 1.0.5
Adminify – White Label, Admin Menu Editor, Login Customizer v1.0.5
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 / Modules.php

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

275 lines 10.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\Admin\AdminSettingsModel;
6
7 if (!defined('ABSPATH')) {
8 die;
9 } // Cannot access directly.
10
11 if (!class_exists('Modules')) {
12 class Modules extends AdminSettingsModel
13 {
14
15 public function __construct()
16 {
17 $this->jltwp_adminify_general_options();
18 }
19
20 public function get_defaults()
21 {
22 return [
23 'folders' => true,
24 'admin_notices' => true,
25 'login_customizer' => true,
26 'admin_columns' => true,
27 'menu_editor' => true,
28 'dashboard_widgets' => true,
29 'pagespeed_insights' => true,
30 'custom_css_js' => true,
31 'quick_menu' => true,
32 'menu_duplicator' => true,
33 'activity_logs' => true,
34 'admin_pages' => true,
35 'notification_bar' => true,
36 'post_duplicator' => true,
37 'post_types_order' => true,
38 'server_info' => true,
39 'sidebar_generator' => true,
40 'disable_comments' => true
41 ];
42 }
43
44 /**
45 * Module Fields
46 *
47 * @param [type] $modules_fields
48 *
49 * @return void
50 */
51 public function module_fields(&$modules_fields)
52 {
53 $modules_fields[] = array(
54 'id' => 'folders',
55 'type' => 'switcher',
56 'title' => __('Folders', WP_ADMINIFY_TD),
57 'subtitle' => __('Categorize Post/Page/Media & Custom Post Types', WP_ADMINIFY_TD),
58 'text_on' => __('Enabled', WP_ADMINIFY_TD),
59 'text_off' => __('Disabled', WP_ADMINIFY_TD),
60 'text_width' => 100,
61 'default' => $this->get_default_field('folders'),
62 );
63
64 $modules_fields[] = array(
65 'id' => 'login_customizer',
66 'type' => 'switcher',
67 'title' => __('Login Customizer', WP_ADMINIFY_TD),
68 'subtitle' => __('16 pre-built Templates, with Video,Slideshow,Gradient and many more', WP_ADMINIFY_TD),
69 'text_on' => __('Enabled', WP_ADMINIFY_TD),
70 'text_off' => __('Disabled', WP_ADMINIFY_TD),
71 'text_width' => 100,
72 'default' => $this->get_default_field('login_customizer'),
73 );
74
75 $modules_fields[] = array(
76 'id' => 'admin_notices',
77 'type' => 'switcher',
78 'title' => __('Admin Notices', WP_ADMINIFY_TD),
79 'subtitle' => __('Enable/Disable Hide All admin Notices Module', WP_ADMINIFY_TD),
80 'text_on' => __('Enabled', WP_ADMINIFY_TD),
81 'text_off' => __('Disabled', WP_ADMINIFY_TD),
82 'text_width' => 100,
83 'default' => $this->get_default_field('admin_notices'),
84 );
85
86 $modules_fields[] = array(
87 'id' => 'admin_columns',
88 'type' => 'switcher',
89 'title' => __('Admin Columns', WP_ADMINIFY_TD),
90 'subtitle' => __('Customize Column names post,page,products,media,taxonomoy etc', WP_ADMINIFY_TD),
91 'text_on' => __('Enabled', WP_ADMINIFY_TD),
92 'text_off' => __('Disabled', WP_ADMINIFY_TD),
93 'text_width' => 100,
94 'default' => $this->get_default_field('admin_columns'),
95 );
96
97 $modules_fields[] = array(
98 'id' => 'menu_editor',
99 'type' => 'switcher',
100 'title' => __('Menu Editor', WP_ADMINIFY_TD),
101 'subtitle' => __('Advanced Menu Editor with restrict users, Custom Icons etc', WP_ADMINIFY_TD),
102 'text_on' => __('Enabled', WP_ADMINIFY_TD),
103 'text_off' => __('Disabled', WP_ADMINIFY_TD),
104 'text_width' => 100,
105 'default' => $this->get_default_field('menu_editor'),
106 );
107
108 $modules_fields[] = array(
109 'id' => 'dashboard_widgets',
110 'type' => 'switcher',
111 'title' => __('Dashboard & Welcome Widget', WP_ADMINIFY_TD),
112 'subtitle' => __('Create Custom Dashboard & Sidebar Widgets', WP_ADMINIFY_TD),
113 'text_on' => __('Enabled', WP_ADMINIFY_TD),
114 'text_off' => __('Disabled', WP_ADMINIFY_TD),
115 'text_width' => 100,
116 'default' => $this->get_default_field('dashboard_widgets'),
117 );
118
119 $modules_fields[] = array(
120 'id' => 'pagespeed_insights',
121 'type' => 'switcher',
122 'title' => __('Pagespeed Insights', WP_ADMINIFY_TD),
123 'subtitle' => __('Analyze Google Pagespeed from Dashboard', WP_ADMINIFY_TD),
124 'text_on' => __('Enabled', WP_ADMINIFY_TD),
125 'text_off' => __('Disabled', WP_ADMINIFY_TD),
126 'text_width' => 100,
127 'default' => $this->get_default_field('pagespeed_insights'),
128 );
129
130 $modules_fields[] = array(
131 'id' => 'custom_css_js',
132 'type' => 'switcher',
133 'title' => __('Header/Footer Script', WP_ADMINIFY_TD),
134 'subtitle' => __('Inject Custom CSS/JS on Header or Footer', WP_ADMINIFY_TD),
135 'text_on' => __('Enabled', WP_ADMINIFY_TD),
136 'text_off' => __('Disabled', WP_ADMINIFY_TD),
137 'text_width' => 100,
138 'default' => $this->get_default_field('custom_css_js'),
139 );
140
141 $modules_fields[] = array(
142 'id' => 'quick_menu',
143 'type' => 'switcher',
144 'title' => __('Quick Menu', WP_ADMINIFY_TD),
145 'subtitle' => __('Quick Menu for navigating quickly', WP_ADMINIFY_TD),
146 'text_on' => __('Enabled', WP_ADMINIFY_TD),
147 'text_off' => __('Disabled', WP_ADMINIFY_TD),
148 'text_width' => 100,
149 'default' => $this->get_default_field('quick_menu'),
150 );
151
152 $modules_fields[] = array(
153 'id' => 'menu_duplicator',
154 'type' => 'switcher',
155 'title' => __('Menu Duplicator', WP_ADMINIFY_TD),
156 'subtitle' => __('Duplicate menu and Nav menu items also', WP_ADMINIFY_TD),
157 'text_on' => __('Enabled', WP_ADMINIFY_TD),
158 'text_off' => __('Disabled', WP_ADMINIFY_TD),
159 'text_width' => 100,
160 'default' => $this->get_default_field('menu_duplicator'),
161 );
162
163
164
165 $modules_fields[] = array(
166 'id' => 'notification_bar',
167 'type' => 'switcher',
168 'title' => __('Notification Bar', WP_ADMINIFY_TD),
169 'subtitle' => __('Cookie Notice, Promotional Bar on frontend', WP_ADMINIFY_TD),
170 'text_on' => __('Enabled', WP_ADMINIFY_TD),
171 'text_off' => __('Disabled', WP_ADMINIFY_TD),
172 'text_width' => 100,
173 'default' => $this->get_default_field('notification_bar'),
174 );
175
176 $modules_fields[] = array(
177 'id' => 'activity_logs',
178 'type' => 'switcher',
179 'title' => __('Activity Logs', WP_ADMINIFY_TD),
180 'subtitle' => __('Security check for all users Activity', WP_ADMINIFY_TD),
181 'text_on' => __('Enabled', WP_ADMINIFY_TD),
182 'text_off' => __('Disabled', WP_ADMINIFY_TD),
183 'text_width' => 100,
184 'default' => $this->get_default_field('activity_logs'),
185 );
186
187 $modules_fields[] = array(
188 'id' => 'post_duplicator',
189 'type' => 'switcher',
190 'title' => __('Post Duplicator', WP_ADMINIFY_TD),
191 'subtitle' => __('Duplicate Post/Page and any Custom Post Type', WP_ADMINIFY_TD),
192 'text_on' => __('Enabled', WP_ADMINIFY_TD),
193 'text_off' => __('Disabled', WP_ADMINIFY_TD),
194 'text_width' => 100,
195 'default' => $this->get_default_field('post_duplicator'),
196 );
197
198 $modules_fields[] = array(
199 'id' => 'admin_pages',
200 'type' => 'switcher',
201 'title' => __('Admin Pages', WP_ADMINIFY_TD),
202 'subtitle' => __('Custom Admin Pages hooks on Top/Sub Menu', WP_ADMINIFY_TD),
203 'text_on' => __('Enabled', WP_ADMINIFY_TD),
204 'text_off' => __('Disabled', WP_ADMINIFY_TD),
205 'text_width' => 100,
206 'default' => $this->get_default_field('admin_pages'),
207 );
208
209
210 $modules_fields[] = array(
211 'id' => 'sidebar_generator',
212 'type' => 'switcher',
213 'title' => __('Sidebar Generator', WP_ADMINIFY_TD),
214 'subtitle' => __('Create Custom Sidebar Widgets', WP_ADMINIFY_TD),
215 'text_on' => __('Enabled', WP_ADMINIFY_TD),
216 'text_off' => __('Disabled', WP_ADMINIFY_TD),
217 'text_width' => 100,
218 'default' => $this->get_default_field('sidebar_generator'),
219 );
220
221 $modules_fields[] = array(
222 'id' => 'post_types_order',
223 'type' => 'switcher',
224 'title' => __('Post Types Order', WP_ADMINIFY_TD),
225 'subtitle' => __('Post Types and Taxonomy Order', WP_ADMINIFY_TD),
226 'text_on' => __('Enabled', WP_ADMINIFY_TD),
227 'text_off' => __('Disabled', WP_ADMINIFY_TD),
228 'text_width' => 100,
229 'default' => $this->get_default_field('post_types_order'),
230 );
231
232
233 $modules_fields[] = array(
234 'id' => 'server_info',
235 'type' => 'switcher',
236 'title' => __('Server Info', WP_ADMINIFY_TD),
237 'subtitle' => __('Server Info menu Module', WP_ADMINIFY_TD),
238 'text_on' => __('Enabled', WP_ADMINIFY_TD),
239 'text_off' => __('Disabled', WP_ADMINIFY_TD),
240 'text_width' => 100,
241 'default' => $this->get_default_field('server_info'),
242 );
243
244 $modules_fields[] = array(
245 'id' => 'disable_comments',
246 'type' => 'switcher',
247 'title' => __('Disable Comments', WP_ADMINIFY_TD),
248 'subtitle' => __('Disable Comments for Post/Pages/Post Types etc', WP_ADMINIFY_TD),
249 'text_on' => __('Enabled', WP_ADMINIFY_TD),
250 'text_off' => __('Disabled', WP_ADMINIFY_TD),
251 'text_width' => 100,
252 'default' => $this->get_default_field('disable_comments'),
253 );
254 }
255
256 public function jltwp_adminify_general_options()
257 {
258 if (!class_exists('ADMINIFY')) {
259 return;
260 }
261
262 $modules_fields = [];
263 $this->module_fields($modules_fields);
264
265 // Modules Section
266 \ADMINIFY::createSection($this->prefix, array(
267 'title' => __('Modules', WP_ADMINIFY_TD),
268 'icon' => 'fas fa-layer-group',
269 'class' => 'wp-adminify-two-columns aminify-title-width-65',
270 'fields' => $modules_fields
271 ));
272 }
273 }
274 }
275