Last active
December 23, 2015 12:29
-
-
Save jdevalk/6635587 to your computer and use it in GitHub Desktop.
How to die(); without NextGen Gallery annoying you with more output.
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 | |
/** | |
* Prevent stupid plugins from running shutdown scripts when we're obviously not outputting HTML. | |
*/ | |
function really_die() { | |
global $wp_filter; | |
unset( $wp_filter['wp_footer'], $wp_filter['shutdown'] ); | |
$wp_filter['wp_footer'] = 1; | |
die(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment