From 22efd75722d657ebfbaa35fa41e65cf46f19b05f Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 4 Feb 2019 14:13:23 -0500 Subject: [PATCH] Plugin: Remove jQuery heartbeat-to-hooks proxying (#13576) --- lib/client-assets.php | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index 8f8ca34ccb7cda..1178d245ed875a 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -851,48 +851,13 @@ function gutenberg_get_available_image_sizes() { * @param string $hook Screen name. */ function gutenberg_editor_scripts_and_styles( $hook ) { - global $wp_scripts, $wp_meta_boxes; - - // Add "wp-hooks" as dependency of "heartbeat". - $heartbeat_script = $wp_scripts->query( 'heartbeat', 'registered' ); - if ( $heartbeat_script && ! in_array( 'wp-hooks', $heartbeat_script->deps ) ) { - $heartbeat_script->deps[] = 'wp-hooks'; - } + global $wp_meta_boxes; // Enqueue heartbeat separately as an "optional" dependency of the editor. // Heartbeat is used for automatic nonce refreshing, but some hosts choose // to disable it outright. wp_enqueue_script( 'heartbeat' ); - // Transforms heartbeat jQuery events into equivalent hook actions. This - // avoids a dependency on jQuery for listening to the event. - $heartbeat_hooks = <<