Created
March 17, 2016 12:57
-
-
Save anonymous/63bb4db6a00eb4359d88 to your computer and use it in GitHub Desktop.
Heartbeat-Schnittstelle von WordPress abschalten
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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