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.

Screenshot

Thanks in advance.

1 Answer
1

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;
}

Leave a Reply

Your email address will not be published. Required fields are marked *