Skip to content

Commit

Permalink
Don't try and bulk-install plugins which are already installed.
Browse files Browse the repository at this point in the history
Fixes #496.
  • Loading branch information
jrfnl committed Jan 4, 2016
1 parent 15843bc commit 1ad7aed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions class-tgm-plugin-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2674,6 +2674,11 @@ public function process_bulk_actions() {
continue;
}

// For install: make sure this is a plugin we *can* install and not one already installed.
if ( 'install' === $install_type && true === $this->tgmpa->is_plugin_installed( $slug ) ) {
unset( $plugins_to_install[ $key ] );
}

// For updates: make sure this is a plugin we *can* update (update available and WP version ok).
if ( 'update' === $install_type && ( $this->tgmpa->is_plugin_installed( $slug ) && ( false === $this->tgmpa->does_plugin_have_update( $slug ) || ! $this->tgmpa->can_plugin_update( $slug ) ) ) ) {
unset( $plugins_to_install[ $key ] );
Expand Down

0 comments on commit 1ad7aed

Please sign in to comment.