Skip to content

Instantly share code, notes, and snippets.

@afragen
Created October 9, 2013 01:29
Show Gist options
  • Save afragen/6894726 to your computer and use it in GitHub Desktop.
Save afragen/6894726 to your computer and use it in GitHub Desktop.
"The plugin generated x characters of unexpected output during activation" error during WP plugin activation. Add the code to your plugin to see where the error is.
<?php
add_action('activated_plugin','save_error');
function save_error(){
update_option('plugin_error', ob_get_contents());
}
echo get_option('plugin_error');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment