[wp-trac] [WordPress Trac] #61960: Heartbeat API: consider changing the min allowed time
WordPress Trac
noreply at wordpress.org
Mon Sep 16 01:01:26 UTC 2024
#61960: Heartbeat API: consider changing the min allowed time
----------------------------+----------------------------
Reporter: annezazu | Owner: peterwilsoncc
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.7
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
----------------------------+----------------------------
Comment (by peterwilsoncc):
Replacing the code in `src/wp-admin/edit-form-blocks.php` with the
following works:
{{{#!php
<?php
// Set Heartbeat interval to 10 seconds, used to refresh post locks.
wp_add_inline_script(
'heartbeat',
'heartbeatSettings = heartbeatSettings || {};
heartbeatSettings.interval = 10;',
'before'
);
}}}
@azaozz if possible I'd prefer to use the `heartbeat_settings` filter but
adding it to `src/wp-admin/includes/admin-filters.php` caused the code to
run too late. As an aside, this appears to affect
`wp_heartbeat_set_suspension()` too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61960#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list