Last active
June 19, 2016 08:13
-
-
Save MatthieuScarset/648f6c0ad111a712829b to your computer and use it in GitHub Desktop.
WordPress - Show 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
function show_activation_error() { | |
update_option( 'plugin_error', ob_get_contents() ); | |
$error = get_option( 'plugin_error' ); | |
wp_die($error); | |
} | |
add_action( 'activated_plugin', 'show_activation_error' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment