0
votes

i created a wordpress plugin .when i activated the plugin i got "plugin activated" flash msg. actually i want to customize this message to "connect to my-plugin" and also provide a link to this plugin settings page. i try

add_action( 'admin_notices', 'your_custom_function' );

function your_custom_function() {

   echo "connect to my-plugin";

    if( $error ) {
        // Put everything here
    }

}

results connect to my-plugin msg shown on every page in admin panel.i just want to show my custom msg only at the time of activation on plugins page only also i got an error The plugin generated 2 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.

1

1 Answers

1
votes

I guess the one filter hook you are looking for is plugin_action_links_(plugin_file_name) which allows you to add custom links to your plugin entry on the Plugins page.

To display an activation message, see this tutorial.

You could have found these two with some research on your own.