<?php
+/**
+ * Edit plugin editor administration panel.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/** WordPress Administration Bootstrap */
require_once('admin.php');
$title = __("Edit Plugins");
wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file'));
-add_action( 'admin_head', 'theme_editor_css' );
-function theme_editor_css(){
- wp_admin_css( 'css/theme-editor' );
-}
+wp_admin_css( 'theme-editor' );
$plugins = get_plugins();
$plugin_files = array_keys($plugins);
$file = $plugin_files[0];
$file = validate_file_to_edit($file, $plugin_files);
-$real_file = get_real_file_to_edit( PLUGINDIR . "/$file");
+$real_file = WP_PLUGIN_DIR . '/' . $file;
switch($action) {
require_once('admin-header.php');
- update_recently_edited(PLUGINDIR . "/$file");
+ update_recently_edited(WP_PLUGIN_DIR . '/' . $file);
if ( ! is_file($real_file) )
$error = 1;
<?php } ?>
</div>
<?php endif; ?>
- <div class="wrap">
-<div class="bordertitle">
- <h2><?php _e('Plugin Editor'); ?></h2>
-</div>
+<div class="wrap">
+<?php screen_icon(); ?>
+<h2><?php echo wp_specialchars( $title ); ?></h2>
+
<div class="tablenav">
<div class="alignleft">
-<big><strong><?php
+<big><?php
if ( is_plugin_active($file) ) {
if ( is_writeable($real_file) )
echo sprintf(__('Editing <strong>%s</strong> (active)'), $file);
else
echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file);
}
- ?></strong></big>
+ ?></big>
</div>
<br class="clear" />
</div>
<p class="submit">
<?php
if ( isset($_GET['phperror']) )
- echo "<input type='hidden' name='phperror' value='1' /><input type='submit' name='submit' value='" . __('Update File and Attempt to Reactivate') . "' tabindex='2' />";
+ echo "<input type='hidden' name='phperror' value='1' /><input type='submit' name='submit' class='button-primary' value='" . __('Update File and Attempt to Reactivate') . "' tabindex='2' />";
else
- echo "<input type='submit' name='submit' value='" . __('Update File') . "' tabindex='2' />";
+ echo "<input type='submit' name='submit' class='button-primary' value='" . __('Update File') . "' tabindex='2' />";
?>
</p>
<?php else : ?>