Skip to content

Instantly share code, notes, and snippets.

@salcode
Created August 26, 2014 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salcode/5705178aac565aace788 to your computer and use it in GitHub Desktop.
Save salcode/5705178aac565aace788 to your computer and use it in GitHub Desktop.
Code snippet to add a "Settings" link to your plugin on the plugins page
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'salcode_add_plugin_page_settings_link');
function salcode_add_plugin_page_settings_link( $links ) {
$links[] = '<a href="' .
admin_url( 'options-general.php?page=my-plugin' ) .
'">' . __('Settings') . '</a>';
return $links;
}
@shoaib-karim-ali
Copy link

Thank you for sharing this quick snippet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment