I have successfully found out how to show a custom message when my plugin is activated, but I don’t the default message to appear. Is there a way to do is?
function plugin_activate() {
add_option('plugin_activated', true);
} register_activation_hook(__FILE__, 'plugin_activate');
function plugin_activated() {
if(get_option('plugin_activated', false)) {
delete_option('plugin_activated');
add_action('admin_notices', create_function('', 'echo
\'<div class="updated fade"><p>My plugin is <strong>activated</strong>. <a href="options-general.php?my-plugin">Configure it →</a></div>\';'));
}
} add_action('admin_init', 'plugin_activated');
I have come to the conclusion that this is not necessary nor user-friendly as one can activate multiple plugins at the same time and the personalised message is added as a tooltip.