Ticket #1657: plugins-edit.diff

File plugins-edit.diff, 2.1 KB (added by davidhouse, 7 years ago)

1.6 diff

  • wp-admin/plugins.php

     
    7777                <th><?php _e('Plugin'); ?></th> 
    7878                <th><?php _e('Version'); ?></th> 
    7979                <th><?php _e('Description'); ?></th> 
    80                 <th><?php _e('Action'); ?></th> 
     80                <th colspan="2"><?php _e('Action'); ?></th> 
    8181        </tr> 
    8282<?php 
    8383        $style = ''; 
     
    8585                $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate'; 
    8686 
    8787                if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) { 
    88                         $action = "<a href='plugins.php?action=deactivate&amp;plugin=$plugin_file' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 
     88                        $toggle = "<a href='plugins.php?action=deactivate&amp;plugin=$plugin_file' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 
    8989                        $plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>"; 
    9090                        $style .= $style == 'alternate' ? ' active' : 'active'; 
    9191                } else { 
    92                         $action = "<a href='plugins.php?action=activate&amp;plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 
     92                        $toggle = "<a href='plugins.php?action=activate&amp;plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 
    9393                } 
    9494                $plugin_data['Description'] = wp_kses($plugin_data['Description'], array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()) ); ; 
    9595                if ($style != '') $style = 'class="' . $style . '"'; 
     96                $edit = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>"; 
    9697                echo " 
    9798        <tr $style> 
    9899                <td class='name'>{$plugin_data['Title']}</td> 
    99100                <td class='vers'>{$plugin_data['Version']}</td> 
    100101                <td class='desc'>{$plugin_data['Description']} <cite>By {$plugin_data['Author']}.</cite></td> 
    101                 <td class='togl'>$action</td> 
     102                <td class='togl'>$toggle</td> 
     103                <td>$edit</td> 
    102104        </tr>"; 
    103105        } 
    104106?>