Settings link in WordPress plugin

To be clear what I am talking about see the image below. It has nice Settings link which leads to plugin settings  from plugin list. Why I think this is important? Usually plugin creates new submenu in Settings, but sometimes it uses different name and it is not easy to find one. In case 20+ plugins are installed, which is a real case, it is not easy to remember where all these settings are stored. I consider Settings link  as a must have thing when developing plugin and its pretty easy to add it, see below Probably in your plugin you already added setup page through add_submenu_page function. Next thing is to add Settings menu to plugin page:
   'plugin_action_links_' . plugin_basename(__FILE__),  
function wp_action_links($links) {
   $settings_link = '<a href="' . menu_page_url('plugin_setup', false) . '">'. esc_html(__('Settings')) . '</a>';
   array_unshift($links, $settings_link);
   return $links;

1 comment

  1. Greetings from BC, Canada! I agree with you on the idea of a Settings menu and the need to get correct Settings options very quickly. I am not a developer (I found your site because I’m interested in WordPress Plugins) so I have quickly deleted plugins that did not have a very obvious way of getting to the settings. Some plugins do not have settings, well for us users, that is even more reason to add a settings page anyway, on the page you could explain why there are no settings.

    Sometimes, if i can’t figure out the settings I will go to the Plugin Authors website, if they still don’t have settings info there and if they don’t use the plugin on their own site, then I will definitely delete the plugin.

    My objective in writing. This comment is to help developers create better wordpress plugins so I can figure out how plugins can work quickly and be more productive with the time I spent in making a better wordpress website.

Leave a Reply

Your email address will not be published.