Ticket #24122: #24122_fix_logic_mt8biz.diff
File #24122_fix_logic_mt8biz.diff, 1.2 KB (added by , 10 years ago) |
---|
-
src/wp-admin/plugin-editor.php
197 197 <strong><label for="plugin"><?php _e('Select plugin to edit:'); ?> </label></strong> 198 198 <select name="plugin" id="plugin"> 199 199 <?php 200 201 if ( strpos( $plugin, '/' ) !== FALSE ) { 202 $plugin_path = explode( '/', $plugin ); 203 $plugin_root_path = $plugin_path[0]; 204 } else { 205 $plugin_root_path = ''; 206 } 207 200 208 foreach ( $plugins as $plugin_key => $a_plugin ) { 201 209 $plugin_name = $a_plugin['Name']; 202 if ( $plugin_key == $plugin ) 203 $selected = " selected='selected'"; 204 else 205 $selected = ''; 210 211 if ( $plugin_root_path !== '' ) { 212 if ( strpos( $plugin_key, $plugin_root_path ) === 0 ) 213 $selected = " selected='selected'"; 214 else 215 $selected = ''; 216 } else { 217 if ( $plugin_key == $plugin ) 218 $selected = " selected='selected'"; 219 else 220 $selected = ''; 221 } 222 206 223 $plugin_name = esc_attr($plugin_name); 207 224 $plugin_key = esc_attr($plugin_key); 208 225 echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>";