Paulund
2012-05-15 #wordpress

Add Additional Links To The Wordpress Plugin Admin

When you activate a plugin in Wordpress the author can place links in the plugin dashboard screen to show the users of the plugin links back to the plugin homepage, support page, FAQs or a way to contact the creator of the plugin.

By default Wordpress will add the name of the author and a link back to the plugin homepage. Using this snippet you can add extra links to this section like the image below from the Antivirus Wordpress plugin.

All you have to do is add the following in your plugin file and it will create new links for plugin.

add_filter('plugin_row_meta',  'Register_Plugins_Links', 10, 2);
function Register_Plugins_Links ($links, $file) {
               $base = plugin_basename(__FILE__);
               if ($file == $base) {
                       $links[] = '<a href="admin.php?page=settings_plugin">' . __('Settings') . '</a>';
                       $links[] = '<a href="http://domain.com/FAQ/">' . __('FAQ') . '</a>';
                       $links[] = '<a href="http://domain.com/contact-us">' . __('Support') . '</a>';
                       $links[] = '<a href="https://plus.google.com/u/0/b/104753541785944238696/">' . __('Google Plus Page') . '</a>';
               }
               return $links;
       }

Plugin Action Links

If you have a settings page for your plugin then it could be useful to add a link to the settings page from the plugin menu.

The below Wordpress snippet will allow you to add links to the left side menu on the plugin screen.

add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'link_action_on_plugin' );
function link_action_on_plugin( $links ) {
	return array_merge(array('settings' => '<a href="' . admin_url( '/wp-admin/tools.php?page=the-plugin-settings-page.php' ) . '">' . __( 'Settings', 'domain' ) . '</a>'), $links);
}

UpChecker

Reliable uptime monitoring and instant alerts for any website downtime.

  • Uptime Monitoring
  • Performance Monitoring
  • SSL Certificate Alerts
  • Domain Monitoring
  • DNS Checker
  • XML Sitemap Monitoring