I am coding a plugin for WordPress. When Iām using the function register_activation_hook, I get the following error:
The plugin generated 28 characters of unexpected output during activation.
If you notice "headers already sent" messages,
problems with syndication feeds or other issues,
try deactivating or removing this plugin.
Relevant code:
register_activation_hook(__FILE__, function(){
echo "<script>alert('ok')</script>";
});