The plugin_row_meta WordPress PHP filter allows you to modify the row meta data for each plugin in the Plugins list table.
Usage
add_filter('plugin_row_meta', 'your_custom_function', 10, 4); function your_custom_function($plugin_meta, $plugin_file, $plugin_data, $status) { // Your custom code here return $plugin_meta; }
Parameters
$plugin_meta
(string[]): An array of the plugin’s metadata, including version, author, author URI, and plugin URI.$plugin_file
(string): Path to the plugin file relative to the plugins directory.$plugin_data
(array): An array of plugin data.$status
(string): Status filter currently applied to the plugin list.
More information
See WordPress Developer Resources: plugin_row_meta
Examples
Add custom support link
Add a custom support link to the plugin row meta.
add_filter('plugin_row_meta', 'add_custom_support_link', 10, 2); function add_custom_support_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $support_link = '<a href="https://yoursupport.com" target="_blank">Support</a>'; $plugin_meta[] = $support_link; } return $plugin_meta; }
Add custom documentation link
Add a custom documentation link to the plugin row meta.
add_filter('plugin_row_meta', 'add_custom_documentation_link', 10, 2); function add_custom_documentation_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $documentation_link = '<a href="https://yourdocs.com" target="_blank">Documentation</a>'; $plugin_meta[] = $documentation_link; } return $plugin_meta; }
Change author link
Change the author link in the plugin row meta.
add_filter('plugin_row_meta', 'change_author_link', 10, 2); function change_author_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $plugin_meta[1] = '<a href="https://yournewauthorlink.com" target="_blank">Your Name</a>'; } return $plugin_meta; }
Add custom row meta based on plugin status
Add a custom row meta item based on the plugin’s status (active or inactive).
add_filter('plugin_row_meta', 'add_custom_row_meta_based_on_status', 10, 4); function add_custom_row_meta_based_on_status($plugin_meta, $plugin_file, $plugin_data, $status) { if ('your-plugin/your-plugin.php' == $plugin_file) { if ('active' == $status) { $plugin_meta[] = 'This plugin is currently active'; } else { $plugin_meta[] = 'This plugin is currently inactive'; } } return $plugin_meta; }
Add a custom link to plugin settings
Add a custom link to the plugin settings page in the plugin row meta.
add_filter('plugin_row_meta', 'add_custom_settings_link', 10, 2); function add_custom_settings_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $settings_link = '<a href="' . admin_url('options-general.php?page=your-plugin-settings') . '">Settings</a>'; $plugin_meta[] = $settings_link; } return $plugin_meta; }
Add a custom donation link
Add a custom donation link to the plugin row meta.
add_filter('plugin_row_meta', 'add_custom_donation_link', 10, 2); function add_custom_donation_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $donation_link = '<a href="https://yourdonationlink.com" target="_blank">Donate</a>'; $plugin_meta[] = $donation_link; } return $plugin_meta; }
Add a custom link to the plugin’s GitHub repository
Add a custom link to the plugin’s GitHub repository in the plugin row meta.
add_filter('plugin_row_meta', 'add_custom_github_link', 10, 2); function add_custom_github_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $github_link = '<a href="https://github.com/yourusername/your-plugin" target="_blank">GitHub</a>'; $plugin_meta[] = $github_link; } return $plugin_meta; }
Add custom row meta for multiple plugins
Add custom row meta for multiple plugins by checking the $plugin_file
parameter.
add_filter('plugin_row_meta', 'add_custom_row_meta_for_multiple_plugins', 10, 2); function add_custom_row_meta_for_multiple_plugins($plugin_meta, $plugin_file) { if ('plugin-1/plugin-1.php' == $plugin_file) { $plugin_meta[] = 'Custom Meta for Plugin 1'; } elseif ('plugin-2/plugin-2.php' == $plugin_file) { $plugin_meta[] = 'Custom Meta for Plugin 2'; } return $plugin_meta; }
Example 10: Add a custom contact link
Add a custom contact link to the plugin row meta.
add_filter('plugin_row_meta', 'add_custom_contact_link', 10, 2); function add_custom_contact_link($plugin_meta, $plugin_file) { if ('your-plugin/your-plugin.php' == $plugin_file) { $contact_link = '<a href="https://yourcontactlink.com" target="_blank">Contact</a>'; $plugin_meta[] = $contact_link; } return $plugin_meta; }