diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index ac097f90b6931..dea530e9fb9f2 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -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' ); /*