Ticket #5950: r6967_plugin_editor.diff
| File r6967_plugin_editor.diff, 2.8 KB (added by , 18 years ago) |
|---|
-
wp-admin/plugin-editor.php
6 6 7 7 wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file')); 8 8 9 add_action( 'admin_head', 'theme_editor_css' ); 10 function theme_editor_css(){ 11 wp_admin_css( 'css/theme-editor' ); 12 } 13 9 14 $plugins = get_plugins(); 10 15 $plugin_files = array_keys($plugins); 11 16 … … 93 98 <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> 94 99 <?php endif; ?> 95 100 <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 97 108 if ( in_array($file, (array) get_option('active_plugins')) ) { 98 109 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); 100 111 } else { 101 echo '<h2>' . sprintf(__('Browsing <strong>%s</strong> (active)'), $file) . '</h2>';112 echo sprintf(__('Browsing <strong>%s</strong> (active)'), $file); 102 113 } 103 114 } else { 104 115 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); 106 117 } else { 107 echo '<h2>' . sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file) . '</h2>';118 echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file); 108 119 } 109 120 } 110 ?> 121 ?></strong></big> 122 </div> 123 <br style="clear: both;" /> 124 </div> 125 <br style="clear: both;" /> 111 126 <div id="templateside"> 112 <h3><?php _e('Plugin files')?></h3>127 <h3 id="bordertitle" style="margin-bottom: 10px;"><?php _e("Plugin Files"); ?></h3> 113 128 114 <?php 115 if ($plugin_files) : 116 ?> 129 <h4 style="margin-bottom: 0px;"><?php _e('Plugins'); ?></h4> 117 130 <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; ?> 121 134 </ul> 122 <?php endif; ?> 123 </div> 135 </div> 124 136 <?php if (!$error) { ?> 125 137 <form name="template" id="template" action="plugin-editor.php" method="post"> 126 138 <?php wp_nonce_field('edit-plugin_' . $file) ?> … … 154 166 <?php 155 167 break; 156 168 } 157 158 include("admin-footer.php") ?> 169 include("admin-footer.php") ?> 170 No newline at end of file