This page redirects to an external site: https://developer.wordpress.org/reference/hooks/plugin_row_meta/
The plugin_row_meta filter hook is used to add additional links below each plugin on the plugins page.
This hook should return an array.
The basic usage is as follows...
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;
}
This hook passes two parameters, $links and $file. The $links array variable contains the default links for the plugin. The $file variable is the name of the plugin file. So you need to check it against the actual plugin file name within the if condition.
The plugin_row_meta hook is located in wp-admin/includes/class-wp-plugins-list-table.php within single_row function.
Return to Plugin API/Filter Reference