Add a settings link to your WordPress plugin
<?php
/**
* Add a settings link to your WordPress plugin on the plugin listing page.
*/
function add_settings_link( $links, $file ){
if( $file == plugin_basename(__FILE__) ){
$settings_link = '<a href="'.admin_url('admin.php?page=my-page').'">'.__('Settings', $this->textdomain).'</a>';
array_unshift( $links, $settings_link );
}
return $links;
}