Skip to content

Commit

Permalink
Merge pull request #344 from ernilambar/343-fix-dropdown
Browse files Browse the repository at this point in the history
Remove default select option from dropdown
  • Loading branch information
felixarntz authored Dec 21, 2023
2 parents 3b15ece + 73ae270 commit 72f3eb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/admin-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
</h2>

<select id="plugin-check__plugins-dropdown" name="plugin_check_plugins">
<option value=""><?php esc_html_e( 'Select Plugin', 'plugin-check' ); ?></option>
<?php if ( 1 !== count( $available_plugins ) ) { ?>
<option value=""><?php esc_html_e( 'Select Plugin', 'plugin-check' ); ?></option>
<?php } ?>
<?php foreach ( $available_plugins as $plugin_basename => $available_plugin ) { ?>
<option value="<?php echo esc_attr( $plugin_basename ); ?>"<?php selected( $selected_plugin_basename, $plugin_basename ); ?>>
<?php echo esc_html( $available_plugin['Name'] ); ?>
Expand Down

0 comments on commit 72f3eb3

Please sign in to comment.