PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.3.2
Adminify – White Label, Admin Menu Editor, Login Customizer v4.3.2
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 +32 -35 4.2.54.3.2 View file →
@@ -25,12 +25,9 @@
25 25 {
26 26 return [
27 27 'performance' => [
28 28 'performance_enable' => true,
29 - 'performance_data' => [
30 - 'version_strings',
31 - 'emoji',
32 - ]
29 + 'performance_data' => []
33 30 ],
34 31 'disable_embeds' => false, // Gutenberg
35 32 // Gutenberg
36 33 'disable_gutenberg' => [
@@ -41,9 +38,9 @@
41 38 'enabled' => false,
42 39 'backend' => 'default',
43 40 'backend_modify' => 60,
44 41 'on_post_create' => 'default',
45 - 'on_post_create_modify' => 15,
42 + 'on_post_create_modify' => 60,
46 43 'on_frontend' => 'default',
47 44 'on_frontend_modify' => 60
48 45 ],
49 46 'adminify_assets' => [],
@@ -187,8 +184,32 @@
187 184 ];
188 185 }
189 186
190 187 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 +
191 212 $fields[] = [
192 213 'id' => 'enabled',
193 214 'type' => 'switcher',
194 215 'class' => 'adminify-pt-0 adminify-pl-0',
@@ -216,18 +237,10 @@
216 237 $fields[] = [
217 238 'id' => 'backend_modify',
218 239 'type' => 'select',
219 240 'title' => __('Set interval to once every', 'adminify'),
220 - 'subtitle' => __('Default: 1 Minute', 'adminify'),
221 - 'options' => array(
222 - '15' => __('15 seconds', 'adminify'),
223 - '30' => __('30 seconds', 'adminify'),
224 - '60' => __('1 Minute', 'adminify'),
225 - '120' => __('2 Minute', 'adminify'),
226 - '180' => __('3 Minute', 'adminify'),
227 - '300' => __('5 Minute', 'adminify'),
228 - '600' => __('10 Minute', 'adminify'),
229 - ),
241 + 'subtitle' => __('Default: 1 Minute. Intervals over 2 minutes can delay post locks.', 'adminify'),
242 + 'options' => $interval_options,
230 243 'default' => $this->get_default_field('heartbeat_api')['backend_modify'],
231 244 'dependency' => ['enabled|backend', '==|==', 'true|modify', 'true'],
232 245 ];
233 246
@@ -250,18 +263,10 @@
250 263 $fields[] = [
251 264 'id' => 'on_post_create_modify',
252 265 'type' => 'select',
253 266 'title' => __('Set interval to once every', 'adminify'),
254 - 'subtitle' => __('Default: 15 seconds', 'adminify'),
255 - 'options' => array(
256 - '15' => __('15 seconds', 'adminify'),
257 - '30' => __('30 seconds', 'adminify'),
258 - '60' => __('1 Minute', 'adminify'),
259 - '120' => __('2 Minute', 'adminify'),
260 - '180' => __('3 Minute', 'adminify'),
261 - '300' => __('5 Minute', 'adminify'),
262 - '600' => __('10 Minute', 'adminify'),
263 - ),
267 + 'subtitle' => __('Default: 1 Minute. Capped at 2 minutes so post locks and autosave keep working.', 'adminify'),
268 + 'options' => $safe_intervals,
264 269 'default' => $this->get_default_field('heartbeat_api')['on_post_create_modify'],
265 270 'dependency' => ['enabled|on_post_create', '==|==', 'true|modify', 'true'],
266 271 ];
267 272
@@ -284,18 +289,10 @@
284 289 $fields[] = [
285 290 'id' => 'on_frontend_modify',
286 291 'type' => 'select',
287 292 'title' => __('Set interval to once every', 'adminify'),
288 - 'subtitle' => __('Default: 1 Minute', 'adminify'),
289 - 'options' => array(
290 - '15' => __('15 seconds', 'adminify'),
291 - '30' => __('30 seconds', 'adminify'),
292 - '60' => __('1 Minute', 'adminify'),
293 - '120' => __('2 Minute', 'adminify'),
294 - '180' => __('3 Minute', 'adminify'),
295 - '300' => __('5 Minute', 'adminify'),
296 - '600' => __('10 Minute', 'adminify'),
297 - ),
293 + 'subtitle' => __('Default: 1 Minute. Intervals over 2 minutes can delay post locks.', 'adminify'),
294 + 'options' => $interval_options,
298 295 'default' => $this->get_default_field('heartbeat_api')['on_frontend_modify'],
299 296 'dependency' => ['enabled|on_frontend', '==|==', 'true|modify', 'true'],
300 297 ];
301 298 }