Make WordPress Core

Ticket #5660: 5660.diff

File 5660.diff, 4.4 KB (added by DD32, 18 years ago)
  • wp-admin/plugins.php

     
    8181        <thead>
    8282        <tr>
    8383                <th><?php _e('Plugin'); ?></th>
    84                 <th style="text-align: center"><?php _e('Version'); ?></th>
    8584                <th><?php _e('Description'); ?></th>
    86                 <th style="text-align: center"<?php if ( current_user_can('edit_plugins') ) echo ' colspan="2"'; ?>><?php _e('Action'); ?></th>
     85                <th style="text-align: center"><?php _e('Actions'); ?></th>
    8786        </tr>
    8887        </thead>
    8988<?php
     
    9190
    9291        foreach($plugins as $plugin_file => $plugin_data) {
    9392                $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';
    94 
     93                $actions = array();
     94               
    9595                if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) {
    96                         $toggle = "<a href='" . wp_nonce_url("plugins.php?action=deactivate&amp;plugin=$plugin_file", 'deactivate-plugin_' . $plugin_file) . "' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>";
     96                        $actions[] = '<a href="' . wp_nonce_url("plugins.php?action=deactivate&amp;plugin=$plugin_file", 'deactivate-plugin_' . $plugin_file) . '" title="'.__('Deactivate this plugin').'" class="delete">'.__('Deactivate').'</a>';
    9797                        $plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>";
    9898                        $style .= $style == 'alternate' ? ' active' : 'active';
    9999                } else {
    100                         $toggle = "<a href='" . wp_nonce_url("plugins.php?action=activate&amp;plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . "' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>";
     100                        $actions[] = '<a href="' . wp_nonce_url("plugins.php?action=activate&amp;plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . '" title="'.__('Activate this plugin').'" class="edit">'.__('Activate').'</a>';
    101101                }
    102102
    103103                $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
     
    111111                if ( $style != '' )
    112112                        $style = 'class="' . $style . '"';
    113113                if ( is_writable(ABSPATH . PLUGINDIR . '/' . $plugin_file) )
    114                         $edit = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>";
    115                 else
    116                         $edit = '';
     114                        $actions[] = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>";
    117115
    118116                $author = ( empty($plugin_data['Author']) ) ? '' :  ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>';
    119117
     118                $actions = apply_filters('plugin_row_actions', $actions, $plugin_file);
     119
    120120                echo "
    121121        <tr $style>
    122                 <td class='name'>{$plugin_data['Title']}</td>
    123                 <td class='vers'>{$plugin_data['Version']}</td>
     122                <td class='name'>{$plugin_data['Title']} <span class='vers'>{$plugin_data['Version']}</span></td>
    124123                <td class='desc'><p>{$plugin_data['Description']}$author</p></td>
    125                 <td class='togl'>$toggle</td>";
    126                 if ( current_user_can('edit_plugins') )
    127                 echo "
    128                 <td>$edit</td>";
    129                 echo"
     124                <td class='actions'>";
     125                echo implode(' | ', $actions);
     126                echo "</td>
    130127        </tr>";
    131128        do_action( 'after_plugin_row', $plugin_file );
    132129        }
    133130?>
    134131
    135132<tr>
    136         <td colspan="3">&nbsp;</td>
    137         <td colspan="2" style="width:12em;">
     133        <td colspan="2">&nbsp;</td>
     134        <td style="width:12em; text-align:center;">
    138135        <?php
    139136        $active = get_option('active_plugins');
    140137        $inactive = get_option('deactivated_plugins');
     
    148145        <?php
    149146        } // endif active/inactive plugin check
    150147        ?>
     148        </td>
    151149</tr>
    152150
    153151</table>
  • wp-admin/wp-admin.css

     
    5454        font-size: 16px;
    5555}
    5656
     57.plugins a.edit, .plugins  a.delete, .plugins  a.view:hover, .plugins  a.edit:hover, .plugins a.delete:hover{
     58        display: inline;
     59}
     60
    5761.import-system {
    5862        font-size: 16px;
    5963}
     
    345349
    346350table .vers {
    347351        text-align: center;
     352        color:#666666;
    348353}
    349354
     355table .actions{
     356        font-weight: bold;
     357}
     358
    350359textarea.all-options, input.all-options {
    351360        width: 250px;
    352361}
     
    561570        font-size: 15px;
    562571}
    563572
    564 .plugins p {
    565 }
    566573
    567574#login .fullwidth {
    568575        width: 320px;