PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 3.2.4.5
Adminify – White Label, Admin Menu Editor, Login Customizer v3.2.4.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 3.2.4.5, at Inc/Admin/Options/Modules.php

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