从我的插件中提取的代码,根据需要进行调整。
add_filter( \'plugin_action_links\', \'wpse_25030_settings_plugin_link\', 10, 2 );
function wpse_25030_settings_plugin_link( $links, $file )
{
if ( $file == plugin_basename(dirname(__FILE__) . \'/many-tips-together.php\') )
{
/*
* Insert the link at the beginning
*/
$in = \'<a href="options-general.php?page=many-tips-together">\' . __(\'Settings\',\'mtt\') . \'</a>\';
array_unshift($links, $in);
/*
* Insert at the end
*/
// $links[] = \'<a href="options-general.php?page=many-tips-together">\'.__(\'Settings\',\'mtt\').\'</a>\';
}
return $links;
}