Skip to content

Instantly share code, notes, and snippets.

@WordBits
Created June 24, 2018 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WordBits/6e18a8cfdf27cd917ff06d09fda9fde3 to your computer and use it in GitHub Desktop.
Save WordBits/6e18a8cfdf27cd917ff06d09fda9fde3 to your computer and use it in GitHub Desktop.
Completely removes the WordPress Heartbeat by deregistering the script.
<?php
// Download this snippet as a plugin and more at: https://wordbits.io/snippet/completely-remove-the-wordpress-heartbeat/
// Created by: jeffmatson
?>
<?php
// Fire the action on init.
add_action( 'init', 'kill_wp_heartbeat' );
function kill_wp_heartbeat() {
// Deregister the script.
wp_deregister_script('heartbeat');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment