From a8af90bcd1c323cf792c156f355db87767b9f7ab Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 25 Sep 2024 20:51:14 +0000 Subject: [PATCH] Administration: Fix increasing of the frequency of Heartbeat API requests. Props peterwilsoncc, azaozz. Fixes #61960. Built from https://develop.svn.wordpress.org/trunk@59092 git-svn-id: http://core.svn.wordpress.org/trunk@58488 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 7 ++++--- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index ac097f90b6..dea530e9fb 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -126,9 +126,10 @@ wp_add_inline_script( // 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' ); /* diff --git a/wp-includes/version.php b/wp-includes/version.php index e88031962f..97d30daf0c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59091'; +$wp_version = '6.7-alpha-59092'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.