]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/plugin-editor.php
Wordpress 2.7.1
[autoinstalls/wordpress.git] / wp-admin / plugin-editor.php
index a9c534c5bd4830d15858df1dce4c43a5a9a67c8c..b807de895b7b777363de6cf4a0d1ae74a907fda2 100644 (file)
@@ -1,4 +1,12 @@
 <?php
+/**
+ * Edit plugin editor administration panel.
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
+
+/** WordPress Administration Bootstrap */
 require_once('admin.php');
 
 $title = __("Edit Plugins");
@@ -6,10 +14,7 @@ $parent_file = 'plugins.php';
 
 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);
@@ -18,7 +23,7 @@ if (empty($file))
        $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) {
 
@@ -71,7 +76,7 @@ default:
 
        require_once('admin-header.php');
 
-       update_recently_edited(PLUGINDIR . "/$file");
+       update_recently_edited(WP_PLUGIN_DIR . '/' . $file);
 
        if ( ! is_file($real_file) )
                $error = 1;
@@ -90,13 +95,13 @@ default:
        <?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);
@@ -108,7 +113,7 @@ default:
                else
                        echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file);
        }
-       ?></strong></big>
+       ?></big>
 </div>
 <br class="clear" />
 </div>
@@ -137,9 +142,9 @@ default:
        <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 : ?>