diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php
index ccdd832e86..402965e50c 100644
|
a
|
b
|
if ( ! is_file( $real_file ) ) { |
| 218 | 218 | <strong><label for="plugin"><?php _e( 'Select plugin to edit:' ); ?> </label></strong> |
| 219 | 219 | <select name="plugin" id="plugin"> |
| 220 | 220 | <?php |
| | 221 | $p_active = ''; |
| | 222 | $p_notactive = ''; |
| 221 | 223 | foreach ( $plugins as $plugin_key => $a_plugin ) { |
| 222 | 224 | $plugin_name = $a_plugin['Name']; |
| | 225 | $active_p = is_plugin_active( $plugin_key ); |
| 223 | 226 | if ( $plugin_key == $plugin ) { |
| 224 | 227 | $selected = " selected='selected'"; |
| 225 | 228 | } else { |
| … |
… |
foreach ( $plugins as $plugin_key => $a_plugin ) { |
| 227 | 230 | } |
| 228 | 231 | $plugin_name = esc_attr( $plugin_name ); |
| 229 | 232 | $plugin_key = esc_attr( $plugin_key ); |
| 230 | | echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>"; |
| | 233 | if ( $active_p ) { |
| | 234 | $p_active .= "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>"; |
| | 235 | } else { |
| | 236 | $p_notactive .= "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>"; |
| | 237 | } |
| 231 | 238 | } |
| | 239 | echo $p_active ? sprintf( "\n\t<option disabled value=\"active-plugins\">%s</option>", __( 'Active' ) ) . $p_active : ''; |
| | 240 | echo $p_notactive ? sprintf( "\n\t<option disabled value=\"not-active-plugins\">%s</option>", __( 'Not Active' ) ) . $p_notactive : ''; |
| 232 | 241 | ?> |
| 233 | 242 | </select> |
| 234 | 243 | <?php submit_button( __( 'Select' ), '', 'Submit', false ); ?> |