David
  • 0

How to add a settings link for my plugin in plugin list page?

  • 0

I want to add a “Settings” link to my plugin options page. This link appear in plugin list page beside of Activate or Deactivate link. How can I achieve it?

1 Answer

  1. This answer was edited.

    To add a settings link in your plugin actions, you can use the plugin_action_links filter. Add the following code in your plugins main file.

    function add_settings_link($links)
    {
        $settings_link = '' . __('Settings') . '';
        array_push($links, $settings_link);
        return $links;
    }
    add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'add_settings_link');
    

    Replace ‘your-plugin-settings’ with the actual settings page slug for your plugin.

Leave an answer

You must login to add an answer.