Last active
January 2, 2017 09:03
-
-
Save Gkiokan/c812105ea74d259a0ae7b753a7a3a32d to your computer and use it in GitHub Desktop.
WP Error Handling on Plugins
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
/* | |
GistName: WP Error Handling | |
Author: Gkiokan Sali | |
Url: www.gkiokan.net | |
Description: | |
Use this for debugging activision errors. | |
Create a error_activation.txt error log in the spezific plugin directory. | |
*/ | |
if(WP_DEBUG) | |
add_action('activated_plugin','my_save_error'); | |
function my_save_error() { | |
$error = ob_get_contents(); | |
if(empty($error)) return; | |
file_put_contents(dirname(__file__).'/error_activation.txt', ob_get_contents()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment