Skip to content

Commit 1bcaadc

Browse files
committed
Remove superfluous plugin iteration
1 parent 8c0cc7b commit 1bcaadc

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Plugin_Command.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -964,11 +964,6 @@ public function delete( $args, $assoc_args = array() ) {
964964

965965
$successes = $errors = 0;
966966

967-
$plugins = $this->fetcher->get_many( $args );
968-
if ( count( $plugins ) < count( $args ) ) {
969-
$errors = count( $args ) - count( $plugins );
970-
}
971-
972967
foreach ( $this->fetcher->get_many( $args ) as $plugin ) {
973968
if ( $this->_delete( $plugin ) ) {
974969
WP_CLI::log( "Deleted '{$plugin->name}' plugin." );
@@ -1092,15 +1087,15 @@ protected function get_status( $file ) {
10921087

10931088
/**
10941089
* Gets the template path based on installation type.
1095-
*/
1090+
*/
10961091
private static function get_template_path( $template ) {
10971092
$command_root = Utils\phar_safe_path( dirname( __DIR__ ) );
10981093
$template_path = "{$command_root}/templates/{$template}";
1099-
1094+
11001095
if ( ! file_exists( $template_path ) ) {
11011096
WP_CLI::error( "Couldn't find {$template}" );
11021097
}
1103-
1098+
11041099
return $template_path;
11051100
}
11061101

0 commit comments

Comments
 (0)