The other day I posted about showing plugin developers appreciation and how it’s actually really easy to do. The problem, as was pointed out to me, is that writing reviews, donations, etc. are all only accessible from the plugin page on the repo and there’s no quick way to get there from the WordPress dashboard.
All is not lost, however! It is possible to add custom links to the plugin list table alongside the default links that point to the author’s website and the plugin details page. By default those links will look something like this:

That’s all well and good, but there’s a simple filter that allows you to add any additional links (or markup) to that section that you wish: plugin_row_meta
.
So, in light of my previous post, I thought it would be handy to provide a snippet that allows you to easily add these links into your plugin. This snippet will work for any plugin that is hosted on the official plugin repo. The only items that you will need to change are the $plugin_slug
and $donate_link
variables along with the text-domain
string – everything else is pulled dynamically from the plugin information that WordPress provides:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'plugin_row_meta', 'plugin_appreciation_links', 10, 4 ); | |
function plugin_appreciation_links ( $plugin_meta = array(), $plugin_file = '', $plugin_data = array(), $status = '' ) { | |
$plugin_slug = 'seriously-simple-podcasting'; | |
$donate_link = 'http://www.hughlashbrooke.com/donate'; | |
if( ! isset( $plugin_data['slug'] ) || $plugin_slug != $plugin_data['slug'] ) { | |
return $plugin_meta; | |
} | |
$plugin_meta['review'] = '<a href="https://wordpress.org/support/view/plugin-reviews/' . $plugin_data['slug'] . '?rate=5#postform" target="_blank">' . __( 'Write a review', 'text-domain' ) . '</a>'; | |
$plugin_meta['donate'] = '<a href="' . esc_url( $donate_link ) . '" target="_blank">' . __( 'Donate', 'text-domain' ) . '</a>'; | |
if( isset( $plugin_data['Version'] ) ) { | |
global $wp_version; | |
$plugin_meta['compatibility'] = '<a href="https://wordpress.org/plugins/' . $plugin_data['slug'] . '/?compatibility%5Bversion%5D=' . $wp_version . '&compatibility%5Btopic_version%5D=' . $plugin_data['Version'] . '&compatibility%5Bcompatible%5D=1" target="_blank">' . __( 'Confirm compatibility', 'text-domain' ) . '</a>'; | |
} | |
return $plugin_meta; | |
} | |
?> |
Once you have added (and customised) this snippet, the plugin record will now look like this:
