Home Add a WordPress Plugin settings link to your WordPress Plugin listing
Post
Cancel

Add a WordPress Plugin settings link to your WordPress Plugin listing

Here is a cool little snippet that will add a link to your settings for your plugin directly from the plugin listing. Yeah, sounds way to complicated, let me just show you:

and the code in this case for the Simple Aweber Integration:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<pre lang="php">// Add settings link on plugin page

function your_plugin_settings_link($links) { 

  $settings_link = '<a href="options-general.php?page=simple-aweber-integration.php">Settings</a>'; 

  array_unshift($links, $settings_link); 

  return $links; 

}

$plugin = plugin_basename(__FILE__); 

add_filter("plugin_action_links_$plugin", 'your_plugin_settings_link' );

The only thing you have to do is replace simple-aweber-integration.php with your plugins options page. Just visit your plugins page and it will show you what that page is called.

This post is licensed under CC BY 4.0 by the author.
Trending Tags