Skip to content

Commit

Permalink
Administration: Fix increasing of the frequency of Heartbeat API requ…
Browse files Browse the repository at this point in the history
…ests.

Props peterwilsoncc, azaozz.
Fixes #61960.

git-svn-id: https://develop.svn.wordpress.org/trunk@59092 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
azaozz committed Sep 25, 2024
1 parent 9e29083 commit b071c28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wp-admin/edit-form-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ static function ( $classes ) {
// Set Heartbeat interval to 10 seconds, used to refresh post locks.
wp_add_inline_script(
'heartbeat',
'if ( window.wp && window.wp.heartbeat ) {
window.wp.heartbeat.interval( 10 );
}'
'jQuery( function() {
wp.heartbeat.interval( 10 );
} );',
'after'
);

/*
Expand Down

0 comments on commit b071c28

Please sign in to comment.