Created
January 16, 2013 14:49
-
-
Save rachelbaker/4547618 to your computer and use it in GitHub Desktop.
Debug WordPress plugin activation errors
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
/** | |
* Find unexpected output error during plugin activation. | |
* Writes file to /uploads/debug_report.html with buffer output. | |
* | |
* @author Rachel Baker <[email protected]> | |
*/ | |
function debugActivationError(){ | |
file_put_contents(ABSPATH. 'wp-content/uploads/debug_report.html', ob_get_contents()); | |
} | |
add_action('activated_plugin','debugActivationError'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment