Changeset 10627 for trunk/wp-admin/plugin-editor.php
- Timestamp:
- 02/22/2009 08:05:11 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/plugin-editor.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugin-editor.php
r10614 r10627 13 13 $parent_file = 'plugins.php'; 14 14 15 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file' ));15 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin')); 16 16 17 17 wp_admin_css( 'theme-editor' ); 18 18 19 19 $plugins = get_plugins(); 20 $plugin_files = array_keys($plugins); 20 21 if ( empty($plugin) ) { 22 $plugin = array_keys($plugins); 23 $plugin = $plugin[0]; 24 } 25 26 $plugin_files = get_plugin_files($plugin); 21 27 22 28 if (empty($file)) … … 116 122 <?php screen_icon(); ?> 117 123 <h2><?php echo wp_specialchars( $title ); ?></h2> 118 124 <div class="bordertitle"> 125 <form id="themeselector" action="plugin-editor.php" method="post"> 126 <strong><label for="theme"><?php _e('Select plugin to edit:'); ?> </label></strong> 127 <select name="plugin" id="plugin"> 128 <?php 129 foreach ($plugins as $plugin_key => $a_plugin) { 130 $plugin_name = $a_plugin['Name']; 131 if ($plugin_key == $plugin) $selected = " selected='selected'"; 132 else $selected = ''; 133 $plugin_name = attribute_escape($plugin_name); 134 echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>"; 135 } 136 ?> 137 </select> 138 <input type="submit" name="Submit" value="<?php _e('Select') ?>" class="button" /> 139 </form> 140 </div> 119 141 <div class="tablenav"> 120 142 <div class="alignleft"> 121 143 <big><?php 122 if ( is_plugin_active($ file) ) {144 if ( is_plugin_active($plugin) ) { 123 145 if ( is_writeable($real_file) ) 124 146 echo sprintf(__('Editing <strong>%s</strong> (active)'), $file); … … 139 161 <h3 id="bordertitle"><?php _e('Plugin Files'); ?></h3> 140 162 141 <h4><?php _e('Plugins'); ?></h4>142 163 <ul> 143 164 <?php foreach($plugin_files as $plugin_file) : ?> 144 <li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?> "><?php echo $plugins[$plugin_file]['Name'];?></a></li>165 <li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?>&plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li> 145 166 <?php endforeach; ?> 146 167 </ul> … … 152 173 <input type="hidden" name="action" value="update" /> 153 174 <input type="hidden" name="file" value="<?php echo $file ?>" /> 175 <input type="hidden" name="plugin" value="<?php echo $plugin ?>" /> 154 176 </div> 155 177 <?php if ( count( $functions ) ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.