Skip to content

Commit 6974b99

Browse files
Coding Standards: Remove extra conditional in get_plugins().
Follow-up to [1894], [5152], [55990]. Props abhijitrakas, mukesh27. Fixes #44853. git-svn-id: https://develop.svn.wordpress.org/trunk@58067 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f9e5c6f commit 6974b99

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/wp-admin/includes/plugin.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,8 @@ function get_plugins( $plugin_folder = '' ) {
319319

320320
closedir( $plugins_subdir );
321321
}
322-
} else {
323-
if ( str_ends_with( $file, '.php' ) ) {
324-
$plugin_files[] = $file;
325-
}
322+
} elseif ( str_ends_with( $file, '.php' ) ) {
323+
$plugin_files[] = $file;
326324
}
327325
}
328326

0 commit comments

Comments
 (0)