If you're a more advanced user you, in most cases, know what you're doing in terms of determining which plugins a WordPress site will need.
It can be really annoying when you want to install lots of plugins on a WordPress site and you are being interrupted to confirm each plugin installation.
Of course folks that are good with the keyboard will hit space to confirm the prompt, others will use wp-cli. There are many options.
This is the code that we use at our qSandbox.com service to save a user a click.
You can insert it into functions.php or create an an mu-plugin.
[code]
/**
* Slavi Marinov | http://orbisius.com | http://qsandbox.com
*/
add_filter('plugin_install_action_links', 'orbisius_sandbox_disable_plugin_install_prompt', 10, 2);
function orbisius_sandbox_disable_plugin_install_prompt($action_links, $plugin ) {
/* array(2) (
[0] => (string) <a class="install-now button" href="http://orbclub.com.clients.com/wp-admin/update.php?action=install-plugin&plugin=theme-check&_wpnonce=8e477639f2" aria-label="Install Theme Check 20141222.1 now">Install Now</a>
[1] => (string) <a href="http://orbclub.com.clients.com/wp-admin/plugin-install.php?tab=plugin-information&plugin=theme-check&TB_iframe=true&width=600&height=550" class="thickbox" aria-label="More information about Theme Check 20141222.1" data-title="Theme Check 20141222.1">More Details</a>
)
*/
foreach ($action_links as $idx => $html_link) {
if ( stripos($html_link, 'install-now') !== false) {
// We can skip JS prompt by changing the install link's css
$html_link = str_ireplace('install-now', 'install-now-no-prompt', $html_link);
$action_links[ $idx ] = $html_link;
}
}
return $action_links;
}
[/code]