Skip to content

Instantly share code, notes, and snippets.

@trueqap
Created February 5, 2018 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trueqap/911e92da65df0145cd803f40446db57d to your computer and use it in GitHub Desktop.
Save trueqap/911e92da65df0145cd803f40446db57d to your computer and use it in GitHub Desktop.
plugin_row_meta
add_filter( 'plugin_row_meta', 'custom_plugin_row_meta', 10, 2 );
function custom_plugin_row_meta( $links, $file ) {
if ( strpos( $file, 'plugin-file-name.php' ) !== false ) {
$new_links = array(
'donate' => '<a href="donation_url" target="_blank">Donate</a>',
'doc' => '<a href="doc_url" target="_blank">Documentation</a>'
);
$links = array_merge( $links, $new_links );
}
return $links;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment