Plugin Action links are the links, such as Deactivate, that are displayed on the plugin entry in the WordPress plugins page. These links are extremely useful for helping your users find their way around the admin section of your plugin, as well as for providing helpful links such as Contact or Support.

This function should be placed in your plugins main file, or in a different file that is then included.

// add menu links to the plugin entry in the plugins menu
function pippin_plugin_action_links($links, $file) {
    static $this_plugin;
    if (!$this_plugin) {
        $this_plugin = plugin_basename(__FILE__);
    // check to make sure we are on the correct plugin
    if ($file == $this_plugin) {
		// link to what ever you want
        $plugin_links[] = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/themes.php">My Link</a>';
        $plugin_links[] = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/widgets.php">Widgets</a>';
        // add the links to the list of links already there
		foreach($plugin_links as $link) {
			array_unshift($links, $link);
    return $links;
add_filter('plugin_action_links', 'pippin_plugin_action_links', 10, 2);
  1. Keely

    Good post.

    I want to add some basic help for my plugin – just some text explaining the plugin can be used by adding a shortcode to a page or post.

    How do I do this step.

    I have searched everywhere and haven’t found anyone who has explained this final step.

    Thanks Pippin

    • Pippin

      Do you have a thought for where you want to add the help text? Does your plugin have a settings page already?

  2. Keely


    Having never done this before … where do I want to add the help text … anywhere I guess?
    But isn’t it good practice to not put it into the main file?

    The plugin doesn’t have a settings page. This is my first attempt at creating a settings page and I’m bumbling and fumbling around … any help appreciated … thnx 😉

    • Pippin

      When you say “not in the main file”, do you mean the code is not placed in the main file, or the help text itself is not displayed in the main file?

    • Pippin

      My plugin reviews is pretty much the same thin as plugin checks 🙂

      Do you want to create a settings page for the plugin?

  3. Keely

    While I’m talking about this … do you do plugin ‘checking’ for people as opposed to plugin reviews?
    Being fairly new to writing plugins I would really like my plugins to be checked before they’re published.

    Thanks Pippin

  4. Keely

    My previous posts > no I don’t have a settings page. Just want the settings link to go somewhere that displays that to use the plugin you add the shortcode in a page or post. Fairly straightforward.

  5. Keely

    Would love to know how to do this. Paid membership but no ideas?

    • Pippin

      If your plugin doesn’t have a settings page, then I highly recommend against creating a page just for showing the help text. It sounds like your plugin is pretty simple (just a short code or two), so the best thing to do is include documentation on the plugin’s home page. If this is the plugin repository, then place instructions in the “Installation” tab. If it’s hosted on your own site, then place instructions there.

  6. Keely

    Thanks for the reply – I agree it’s probably overkill, but I would like to know how to do it. Can you post something here? Otherwise I’ll be scouring the net for another week looking for a WordPress plugin forum to post my question. It will also be a big help for learning, and for future plugins. Thanks. (btw – not getting email notifications of replies – have bookmarked this page and come back every so often)

  7. Keely

    Thanks Pippin.
    Will go through that series. Hope that settings beast will be tamed!

    Yes – have checked spam – first thing I did – and did check the boxes.
    Bit of a mystery as to why I’m not getting the emails.

    • Pippin

      That is odd . . . When you first did it, did you get a confirmation email about your subscription?

Comments are closed.