• Hostgator in responding to issues over Heartbeat suggested I add the following –

    add_action( ‘init’, ‘kill_heartbeat’, 1 );
    function kill_heartbeat() {
    global $pagenow;
    wp_deregister_script(‘heartbeat’);
    }
    A good bit of controvery is where to add this. I dug through more the coding, and I found the answer is two places. One being the functions.php file of the current theme, and one being within the wp-includes/plugin.php file. This ensures it always is working, regardless of what is called. The functions.php file of the them “might” be good enough. But I found it sometimes is not. The plugin.php is something always called, so that is a safe bet to run it. Since you cannot call a deregister function twice, you will probably want to place it somewhere that is called quite often. The theme’s functions.php is called 90% of the time on the site, as is the plugin.php of the wp-includes folder. My go-to (as it were) is the theme’s functions.php, but if that doesn’t work for you (or the theme doesn’t have one), then the wp-includes/plugin.php should work just fine.

Viewing 1 replies (of 1 total)
  • Never de-register core WordPress scripts! I think your hosts gave you some pretty bad advice and you need to go back to them about this.

Viewing 1 replies (of 1 total)

The topic ‘Kill Heartbeat’ is closed to new replies.