WordPress Snippets at WPcustoms

Add plugin settings link to plugins list table

Add a link to your plugin’s settings page on the plugin page. A handy quick access function which improves usability. Make sure to adjust the $settings_link variable.


/**
 * Snippet Name: Add plugin settings link to plugins list table
 * Snippet URL: http://www.wpcustoms.net/snippets/add-plugin-settings-link-plugins-list-table/
 */
 function plugin_add_settings_link( $links ) {
    $settings_link = '' . __( 'Settings' ) . '';
    array_push( $links, $settings_link );
  	return $links;
}
$plugin = plugin_basename( __FILE__ );
add_filter( "plugin_action_links_$plugin", 'plugin_add_settings_link' );