116 'title' => __('Overview'), |
116 'title' => __('Overview'), |
117 'content' => |
117 'content' => |
118 '<p>' . __('You can use the editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '</p>' . |
118 '<p>' . __('You can use the editor to make changes to any of your plugins’ individual PHP files. Be aware that if you make changes, plugins updates will overwrite your customizations.') . '</p>' . |
119 '<p>' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.') . '</p>' . |
119 '<p>' . __('Choose a plugin to edit from the menu in the upper right and click the Select button. Click once on any file name to load it in the editor, and make your changes. Don’t forget to save your changes (Update File) when you’re finished.') . '</p>' . |
120 '<p>' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Lookup takes you to a web page about that particular function.') . '</p>' . |
120 '<p>' . __('The Documentation menu below the editor lists the PHP functions recognized in the plugin file. Clicking Lookup takes you to a web page about that particular function.') . '</p>' . |
|
121 '<p id="newcontent-description">' . __('In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key.') . '</p>' . |
121 '<p>' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '</p>' . |
122 '<p>' . __('If you want to make changes but don’t want them to be overwritten when the plugin is updated, you may be ready to think about writing your own plugin. For information on how to edit plugins, write your own from scratch, or just better understand their anatomy, check out the links below.') . '</p>' . |
122 ( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' ) |
123 ( is_network_admin() ? '<p>' . __('Any edits to files from this screen will be reflected on all sites in the network.') . '</p>' : '' ) |
123 ) ); |
124 ) ); |
124 |
125 |
125 get_current_screen()->set_help_sidebar( |
126 get_current_screen()->set_help_sidebar( |
224 <?php endforeach; ?> |
225 <?php endforeach; ?> |
225 </ul> |
226 </ul> |
226 </div> |
227 </div> |
227 <form name="template" id="template" action="plugin-editor.php" method="post"> |
228 <form name="template" id="template" action="plugin-editor.php" method="post"> |
228 <?php wp_nonce_field('edit-plugin_' . $file) ?> |
229 <?php wp_nonce_field('edit-plugin_' . $file) ?> |
229 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> |
230 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea> |
230 <input type="hidden" name="action" value="update" /> |
231 <input type="hidden" name="action" value="update" /> |
231 <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" /> |
232 <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" /> |
232 <input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" /> |
233 <input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" /> |
233 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> |
234 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> |
234 </div> |
235 </div> |
241 <?php } ?> |
242 <?php } ?> |
242 <p class="submit"> |
243 <p class="submit"> |
243 <?php |
244 <?php |
244 if ( isset($_GET['phperror']) ) { |
245 if ( isset($_GET['phperror']) ) { |
245 echo "<input type='hidden' name='phperror' value='1' />"; |
246 echo "<input type='hidden' name='phperror' value='1' />"; |
246 submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); |
247 submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false ); |
247 } else { |
248 } else { |
248 submit_button( __( 'Update File' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); |
249 submit_button( __( 'Update File' ), 'primary', 'submit', false ); |
249 } |
250 } |
250 ?> |
251 ?> |
251 </p> |
252 </p> |
252 <?php else : ?> |
253 <?php else : ?> |
253 <p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p> |
254 <p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p> |
254 <?php endif; ?> |
255 <?php endif; ?> |
255 </form> |
256 </form> |
256 <br class="clear" /> |
257 <br class="clear" /> |
257 </div> |
258 </div> |
258 <script type="text/javascript"> |
259 <script type="text/javascript"> |
259 /* <![CDATA[ */ |
|
260 jQuery(document).ready(function($){ |
260 jQuery(document).ready(function($){ |
261 $('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); |
261 $('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); |
262 $('#newcontent').scrollTop( $('#scrollto').val() ); |
262 $('#newcontent').scrollTop( $('#scrollto').val() ); |
263 }); |
263 }); |
264 /* ]]> */ |
|
265 </script> |
264 </script> |
266 <?php |
265 <?php |
267 break; |
266 break; |
268 } |
267 } |
269 include(ABSPATH . "wp-admin/admin-footer.php"); |
268 include(ABSPATH . "wp-admin/admin-footer.php"); |