PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.0.5.4
Adminify – White Label, Admin Menu Editor, Login Customizer v4.0.5.4
4.3.2 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 All 165 releases
← All changes | Inc/Admin/Options/Performance.php +54 -54 4.3.24.0.5.4 View file →
@@ -1,10 +1,10 @@
1 1 <?php
2 2
3 -namespace PXLBSAdminify\Inc\Admin\Options;
3 +namespace WPAdminify\Inc\Admin\Options;
4 4
5 -use PXLBSAdminify\Inc\Utils;
6 -use PXLBSAdminify\Inc\Admin\AdminSettingsModel;
5 +use WPAdminify\Inc\Utils;
6 +use WPAdminify\Inc\Admin\AdminSettingsModel;
7 7
8 8
9 9 if (!defined('ABSPATH')) {
10 10 die;
@@ -25,9 +25,12 @@
25 25 {
26 26 return [
27 27 'performance' => [
28 28 'performance_enable' => true,
29 - 'performance_data' => []
29 + 'performance_data' => [
30 + 'version_strings',
31 + 'emoji',
32 + ]
30 33 ],
31 34 'disable_embeds' => false, // Gutenberg
32 35 // Gutenberg
33 36 'disable_gutenberg' => [
@@ -38,9 +41,9 @@
38 41 'enabled' => false,
39 42 'backend' => 'default',
40 43 'backend_modify' => 60,
41 44 'on_post_create' => 'default',
42 - 'on_post_create_modify' => 60,
45 + 'on_post_create_modify' => 15,
43 46 'on_frontend' => 'default',
44 47 'on_frontend_modify' => 60
45 48 ],
46 49 'adminify_assets' => [],
@@ -71,9 +74,9 @@
71 74 [
72 75 'id' => 'disable_gutenberg_enable',
73 76 'type' => 'switcher',
74 77 'class' => 'adminify-pl-0 adminify-pt-0',
75 - 'title' => '',
78 + 'title' => __('', 'adminify'),
76 79 'text_on' => __('Show', 'adminify'),
77 80 'text_off' => __('Hide', 'adminify'),
78 81 'text_width' => 80,
79 82 // 'default' => $this->get_default_field('disable_gutenberg')['disable_gutenberg_enable'],
@@ -80,9 +83,9 @@
80 83 ],
81 84 [
82 85 'id' => 'disable_for',
83 86 'type' => 'checkbox',
84 - 'title' => '',
87 + 'title' => __('', 'adminify'),
85 88 'class' => 'adminify-one-col',
86 89 'options' => $disable_gutenberg_for,
87 90 // 'default' => $this->get_default_field('disable_gutenberg')['disable_for'],
88 91 'dependency' => ['disable_gutenberg_enable', '==', 'true', true],
@@ -120,9 +123,9 @@
120 123 [
121 124 'id' => 'performance_enable',
122 125 'type' => 'switcher',
123 126 'class' => 'adminify-pl-0 adminify-pt-0',
124 - 'title' => '',
127 + 'title' => __('', 'adminify'),
125 128 'text_on' => __('Show', 'adminify'),
126 129 'text_off' => __('Hide', 'adminify'),
127 130 'text_width' => 80
128 131 ],
@@ -128,9 +131,9 @@
128 131 ],
129 132 [
130 133 'id' => 'performance_data',
131 134 'type' => 'checkbox',
132 - 'title' => '',
135 + 'title' => __('', 'adminify'),
133 136 'class' => 'adminify-one-col',
134 137 'options' => $performance_data,
135 138 'dependency' => ['performance_enable', '==', 'true', true],
136 139 ]
@@ -160,14 +163,14 @@
160 163 {
161 164 $disable_embeds[] = [
162 165 'id' => 'performance_subheading',
163 166 'type' => 'subheading',
164 - 'content' => Utils::help_urls(
167 + 'content' => Utils::adminfiy_help_urls(
165 168 '<span></span>',
166 169 'https://wpadminify.com/docs/adminify/performance/disable-embeds',
167 170 'https://www.youtube.com/watch?v=xALg4WWZ_bE',
168 171 'https://www.facebook.com/groups/jeweltheme',
169 - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url()
172 + \WPAdminify\Inc\Admin\AdminSettings::support_url()
170 173 ),
171 174 ];
172 175
173 176 $disable_embeds[] = [
@@ -173,10 +176,9 @@
173 176 $disable_embeds[] = [
174 177 'id' => 'disable_embeds',
175 178 'type' => 'switcher',
176 179 'class' => 'adminify-pro-fieldset adminify-pro-notice',
177 - /* translators: %s: pro upgrade badge HTML */
178 - 'title' => sprintf(__('Disable Embeds %s', 'adminify'), Utils::upgrade_pro_badge()),
180 + 'title' => sprintf(__('Disable Embeds %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
179 181 'subtitle' => __('Disable all Embeds from everywhere like - REST API, Head Tag, Tinymce Editor, Remote results etc.', 'adminify'),
180 182 'text_on' => __('Yes', 'adminify'),
181 183 'text_off' => __('No', 'adminify'),
182 184 'text_width' => 80,
@@ -184,37 +186,13 @@
184 186 ];
185 187 }
186 188
187 189 public function control_heartbit_api_settings(&$fields){
188 -
189 - /*
190 - * heartbeat.js accepts 1-3600 seconds, but core draws the safe line at 120.
191 - * Its own note on `minimalInterval` reads "setting it to longer than 120
192 - * seconds will limit or disable some of the functionality (like post locks)",
193 - * and the Heartbeat API handbook describes the tick as running "every 15-120
194 - * seconds". Anything past that is offered but labelled, and withheld entirely
195 - * on post screens - where the post lock and autosave live, and where core
196 - * deliberately disables idle suspension to keep the lock alive
197 - * (wp_heartbeat_set_suspension).
198 - */
199 - $safe_intervals = array(
200 - '15' => __('15 seconds', 'adminify'),
201 - '30' => __('30 seconds', 'adminify'),
202 - '60' => __('1 Minute', 'adminify'),
203 - '120' => __('2 Minute', 'adminify'),
204 - );
205 -
206 - $interval_options = $safe_intervals + array(
207 - '180' => __('3 Minute (not recommended)', 'adminify'),
208 - '300' => __('5 Minute (not recommended)', 'adminify'),
209 - '600' => __('10 Minute (not recommended)', 'adminify'),
210 - );
211 -
212 190 $fields[] = [
213 191 'id' => 'enabled',
214 192 'type' => 'switcher',
215 193 'class' => 'adminify-pt-0 adminify-pl-0',
216 - 'title' => '',
194 + 'title' => __('', 'adminify'),
217 195 'text_on' => __('Show', 'adminify'),
218 196 'text_off' => __('Hide', 'adminify'),
219 197 'text_width' => 80,
220 198 'default' => $this->get_default_field('heartbeat_api')['enabled'],
@@ -222,9 +200,9 @@
222 200 $fields[] = [
223 201 'id' => 'backend',
224 202 'type' => 'radio',
225 203 'inline' => true,
226 - 'class' => Utils::upgrade_pro_notice_class(),
204 + 'class' => Utils::upgrade_pro_class(),
227 205 'title' => __('WordPress Dashboard', 'adminify'),
228 206 'subtitle' => __('Backend Post Types', 'adminify'),
229 207 'options' => [
230 208 'default' => __('Default', 'adminify'),
@@ -237,10 +215,18 @@
237 215 $fields[] = [
238 216 'id' => 'backend_modify',
239 217 'type' => 'select',
240 218 'title' => __('Set interval to once every', 'adminify'),
241 - 'subtitle' => __('Default: 1 Minute. Intervals over 2 minutes can delay post locks.', 'adminify'),
242 - 'options' => $interval_options,
219 + 'subtitle' => __('Default: 1 Minute', 'adminify'),
220 + 'options' => array(
221 + '15' => __('15 seconds', 'adminify'),
222 + '30' => __('30 seconds', 'adminify'),
223 + '60' => __('1 Minute', 'adminify'),
224 + '120' => __('2 Minute', 'adminify'),
225 + '180' => __('3 Minute', 'adminify'),
226 + '300' => __('5 Minute', 'adminify'),
227 + '600' => __('10 Minute', 'adminify'),
228 + ),
243 229 'default' => $this->get_default_field('heartbeat_api')['backend_modify'],
244 230 'dependency' => ['enabled|backend', '==|==', 'true|modify', 'true'],
245 231 ];
246 232
@@ -246,9 +232,9 @@
246 232
247 233 $fields[] = [
248 234 'id' => 'on_post_create',
249 235 'type' => 'radio',
250 - 'class' => Utils::upgrade_pro_notice_class(),
236 + 'class' => Utils::upgrade_pro_class(),
251 237 'inline' => true,
252 238 'title' => __('Create Post Editor', 'adminify'),
253 239 'subtitle' => __('On post creation and edit screens', 'adminify'),
254 240 'options' => [
@@ -263,10 +249,18 @@
263 249 $fields[] = [
264 250 'id' => 'on_post_create_modify',
265 251 'type' => 'select',
266 252 'title' => __('Set interval to once every', 'adminify'),
267 - 'subtitle' => __('Default: 1 Minute. Capped at 2 minutes so post locks and autosave keep working.', 'adminify'),
268 - 'options' => $safe_intervals,
253 + 'subtitle' => __('Default: 15 seconds', 'adminify'),
254 + 'options' => array(
255 + '15' => __('15 seconds', 'adminify'),
256 + '30' => __('30 seconds', 'adminify'),
257 + '60' => __('1 Minute', 'adminify'),
258 + '120' => __('2 Minute', 'adminify'),
259 + '180' => __('3 Minute', 'adminify'),
260 + '300' => __('5 Minute', 'adminify'),
261 + '600' => __('10 Minute', 'adminify'),
262 + ),
269 263 'default' => $this->get_default_field('heartbeat_api')['on_post_create_modify'],
270 264 'dependency' => ['enabled|on_post_create', '==|==', 'true|modify', 'true'],
271 265 ];
272 266
@@ -272,9 +266,9 @@
272 266
273 267 $fields[] = [
274 268 'id' => 'on_frontend',
275 269 'type' => 'radio',
276 - 'class' => Utils::upgrade_pro_notice_class(),
270 + 'class' => Utils::upgrade_pro_class(),
277 271 'inline' => true,
278 272 'title' => __('Frontend', 'adminify'),
279 273 'subtitle' => __('Frontend Heartbits', 'adminify'),
280 274 'options' => [
@@ -289,10 +283,18 @@
289 283 $fields[] = [
290 284 'id' => 'on_frontend_modify',
291 285 'type' => 'select',
292 286 'title' => __('Set interval to once every', 'adminify'),
293 - 'subtitle' => __('Default: 1 Minute. Intervals over 2 minutes can delay post locks.', 'adminify'),
294 - 'options' => $interval_options,
287 + 'subtitle' => __('Default: 1 Minute', 'adminify'),
288 + 'options' => array(
289 + '15' => __('15 seconds', 'adminify'),
290 + '30' => __('30 seconds', 'adminify'),
291 + '60' => __('1 Minute', 'adminify'),
292 + '120' => __('2 Minute', 'adminify'),
293 + '180' => __('3 Minute', 'adminify'),
294 + '300' => __('5 Minute', 'adminify'),
295 + '600' => __('10 Minute', 'adminify'),
296 + ),
295 297 'default' => $this->get_default_field('heartbeat_api')['on_frontend_modify'],
296 298 'dependency' => ['enabled|on_frontend', '==|==', 'true|modify', 'true'],
297 299 ];
298 300 }
@@ -308,10 +310,9 @@
308 310 $fields[] = array(
309 311 'id' => 'heartbeat_api',
310 312 'type' => 'fieldset',
311 313 'class' => 'adminify-nopadding',
312 - /* translators: %s: pro upgrade badge HTML */
313 - 'title' => sprintf(__('Control Heartbeat API %s', 'adminify'), Utils::upgrade_pro_badge()),
314 + 'title' => sprintf(__('Control Heartbeat API %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
314 315 'class' => 'adminify-pro-fieldset',
315 316 'subtitle' => __('Modify the interval of the WordPress Heartbeat API or disable it on admin pages, post creation/edit screens, and the frontend to reduce CPU load on the server', 'adminify'),
316 317 'fields' => $heartbeat_settings
317 318 );
@@ -327,9 +328,9 @@
327 328 $revisions_settings[] = [
328 329 'id' => 'revisions_enable',
329 330 'type' => 'switcher',
330 331 'class' => 'adminify-p-0 adminify-pro-feature',
331 - 'title' => '',
332 + 'title' => __('', 'adminify'),
332 333 'text_on' => __('Show', 'adminify'),
333 334 'text_off' => __('Hide', 'adminify'),
334 335 'text_width' => 80,
335 336
@@ -350,9 +351,9 @@
350 351 'type' => 'checkbox',
351 352 'title' => __('Apply for Post Types', 'adminify'),
352 353 'class' => 'adminify-pro-feature adminify-pro-notice',
353 354 'subtitle' => __('Disable all Embeds from everywhere like - REST API, Head Tag, Tinymce Editor, Remote results etc.', 'adminify'),
354 - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types',
355 + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types',
355 356 'default' => $this->get_default_field('revisions')['post_types'],
356 357 'dependency' => ['revisions_enable', '==', 'true', 'true'],
357 358 ];
358 359
@@ -367,10 +368,9 @@
367 368
368 369 $fields[] = array(
369 370 'id' => 'revisions',
370 371 'type' => 'fieldset',
371 - /* translators: %s: pro upgrade badge HTML */
372 - 'title' => sprintf(__('Control Revisions %s', 'adminify'), Utils::upgrade_pro_badge()),
372 + 'title' => sprintf(__('Control Revisions %s', 'adminify'), Utils::adminify_upgrade_pro_badge()),
373 373 'subtitle' => __('Limit the number of revisions kept for post types supporting revisions to prevent database bloat.', 'adminify'),
374 374 'fields' => $revisions_settings,
375 375 'default' => $this->get_default_field('revisions'),
376 376 );
@@ -391,9 +391,9 @@
391 391 $this->performances( $fields );
392 392 $this->gutenberg_settings($fields);
393 393
394 394
395 - $fields = apply_filters('pxlbsadminify_settings/performance', $fields, $this);
395 + $fields = apply_filters('adminify_settings/performance', $fields, $this);
396 396
397 397 // Optimization Section
398 398 \ADMINIFY::createSection(
399 399 $this->prefix,