diff --git a/lib/client-assets.php b/lib/client-assets.php index 96986825e9bc2..d628f703ada51 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 = <<