### Eclipse Workspace Patch 1.0
#P wordpress
|
|
|
84 | 84 | } |
85 | 85 | |
86 | 86 | wp_enqueue_script( 'codepress' ); |
87 | | add_action( 'admin_print_footer_scripts', 'codepress_footer_js' ); |
88 | | require_once('admin-header.php'); |
89 | | |
| 87 | add_action( 'admin_print_footer_scripts', 'codepress_footer_js' ); |
| 88 | |
90 | 89 | update_recently_edited(WP_PLUGIN_DIR . '/' . $file); |
91 | 90 | |
92 | 91 | // List of allowable extensions |
… |
… |
|
106 | 105 | $error = __('Files of this type are not editable.'); |
107 | 106 | } |
108 | 107 | } |
| 108 | |
| 109 | if ($error) |
| 110 | wp_die(sprintf('<p>%s</p>', $error)); |
| 111 | |
| 112 | require_once('admin-header.php'); |
| 113 | |
109 | 114 | |
110 | 115 | if ( ! $error ) { |
111 | 116 | $content = file_get_contents( $real_file ); |
… |
… |
|
141 | 146 | <h2><?php echo wp_specialchars( $title ); ?></h2> |
142 | 147 | <div class="bordertitle"> |
143 | 148 | <form id="themeselector" action="plugin-editor.php" method="post"> |
144 | | <strong><label for="theme"><?php _e('Select plugin to edit:'); ?> </label></strong> |
| 149 | <strong><label for="plugin"><?php _e('Select plugin to edit:'); ?> </label></strong> |
145 | 150 | <select name="plugin" id="plugin"> |
146 | 151 | <?php |
147 | 152 | foreach ( $plugins as $plugin_key => $a_plugin ) { |
… |
… |
|
195 | 200 | continue; |
196 | 201 | } |
197 | 202 | ?> |
198 | | <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> |
| 203 | <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> |
199 | 204 | <?php endforeach; ?> |
200 | 205 | </ul> |
201 | 206 | </div> |
… |
… |
|
208 | 213 | <input type="hidden" name="plugin" value="<?php echo attr($plugin) ?>" /> |
209 | 214 | </div> |
210 | 215 | <?php if ( count( $functions ) ) : ?> |
211 | | <div id="documentation"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php _ea( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div> |
| 216 | <div id="documentation"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php _ea( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div> |
212 | 217 | <?php endif; ?> |
213 | 218 | <?php if ( is_writeable($real_file) ) : ?> |
214 | 219 | <?php if ( in_array($file, (array) get_option('active_plugins')) ) { ?> |
… |
… |
|
227 | 232 | <?php endif; ?> |
228 | 233 | </form> |
229 | 234 | <?php |
230 | | } else { |
231 | | echo '<div class="error"><p>' . $error . '</p></div>'; |
232 | 235 | } |
233 | 236 | ?> |
234 | 237 | <div class="clear"> </div> |