Make WordPress Core

Ticket #5950: r6967_plugin_editor.diff

File r6967_plugin_editor.diff, 2.8 KB (added by ffemtcj, 18 years ago)

Plugin Editor

  • wp-admin/plugin-editor.php

     
    66
    77wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file'));
    88
     9add_action( 'admin_head', 'theme_editor_css' );
     10function theme_editor_css(){
     11        wp_admin_css( 'css/theme-editor' );
     12}
     13
    914$plugins = get_plugins();
    1015$plugin_files = array_keys($plugins);
    1116
     
    9398 <div id="message" class="updated fade"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p></div>
    9499<?php endif; ?>
    95100 <div class="wrap">
    96         <?php
     101<div class="bordertitle">
     102        <h2 style="border: none; padding-bottom: 0px;"><?php _e('Plugin Editor'); ?></h2>
     103</div>
     104<br style="clear: both;" />
     105<div class="tablenav" style="margin-right: 210px;">
     106<div style="float: left;">
     107<big><strong><?php
    97108        if ( in_array($file, (array) get_option('active_plugins')) ) {
    98109                if (is_writeable($real_file)) {
    99                         echo '<h2>' . sprintf(__('Editing <strong>%s</strong> (active)'), $file) . '</h2>';
     110                        echo sprintf(__('Editing <strong>%s</strong> (active)'), $file);
    100111                } else {
    101                 echo '<h2>' . sprintf(__('Browsing <strong>%s</strong> (active)'), $file) . '</h2>';
     112                echo sprintf(__('Browsing <strong>%s</strong> (active)'), $file);
    102113                }
    103114        } else {
    104115                if (is_writeable($real_file)) {
    105                         echo '<h2>' . sprintf(__('Editing <strong>%s</strong> (inactive)'), $file) . '</h2>';
     116                        echo sprintf(__('Editing <strong>%s</strong> (inactive)'), $file);
    106117                } else {
    107                 echo '<h2>' . sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file) . '</h2>';
     118                echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file);
    108119                }
    109120        }
    110         ?>
     121        ?></strong></big>
     122</div>
     123<br style="clear: both;" />
     124</div>
     125<br style="clear: both;" />
    111126        <div id="templateside">
    112 <h3><?php _e('Plugin files') ?></h3>
     127        <h3 id="bordertitle" style="margin-bottom: 10px;"><?php _e("Plugin Files"); ?></h3>
    113128
    114 <?php
    115 if ($plugin_files) :
    116 ?>
     129        <h4 style="margin-bottom: 0px;"><?php _e('Plugins'); ?></h4>
    117130        <ul>
    118         <?php foreach($plugin_files as $plugin_file) : ?>
    119                  <li><a href="plugin-editor.php?file=<?php echo "$plugin_file"; ?>"><?php echo $plugins[$plugin_file]['Name']; ?></a></li>
    120         <?php endforeach; ?>
     131<?php foreach($plugin_files as $plugin_file) : ?>
     132                <li><a href="plugin-editor.php?file=<?php echo "$plugin_file"; ?>"><?php echo $plugins[$plugin_file]['Name']; ?></a></li>
     133<?php endforeach; ?>
    121134        </ul>
    122 <?php endif; ?>
    123 </div>
     135        </div>
    124136<?php   if (!$error) { ?>
    125137        <form name="template" id="template" action="plugin-editor.php" method="post">
    126138        <?php wp_nonce_field('edit-plugin_' . $file) ?>
     
    154166<?php
    155167break;
    156168}
    157 
    158 include("admin-footer.php") ?>
     169include("admin-footer.php") ?>
     170 No newline at end of file