When an user searches for a plugin from the WP Admin’s Add Plugin area, I want to add a link/button to every plugin’s listing area.
Which hook should I use?
The location where I want the link is marked in the screenshot below.
Thanks in advance.
When an user searches for a plugin from the WP Admin’s Add Plugin area, I want to add a link/button to every plugin’s listing area.
Which hook should I use?
The location where I want the link is marked in the screenshot below.
Thanks in advance.
This is the filter: "plugin_install_action_links"
.
You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php
(currently) at line 434:
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
Use it like:
add_filter( 'plugin_install_action_links', 'my_custom_links', 10, 2 );
function my_custom_links( $action_links, $plugin ){
$action_links[] = '<a href="">......</a>';
return $action_links;
}