Skip to content

Instantly share code, notes, and snippets.

/heartbeat-api.php
Created Mar 17, 2016

Embed
What would you like to do?
Heartbeat-Schnittstelle von WordPress abschalten
<?php
// Heartbeat-Schnittstelle komplett abschalten
add_action('init', 'stop_heartbeat', 1);
function stop_heartbeat()
{
wp_deregister_script('heartbeat');
}
// Heartbeat-Schnittstelle außerhalb der Beiträge abschalten
add_action('init', 'stop_heartbeat', 1);
function stop_heartbeat()
{
global $pagenow;
if ($pagenow != 'post.php' && $pagenow != 'post-new.php') wp_deregister_script('heartbeat');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.