Ticket #1657: 1657.diff
| File 1657.diff, 2.3 KB (added by davidhouse, 6 years ago) |
|---|
-
wp-admin/plugins.php
83 83 <th><?php _e('Plugin'); ?></th> 84 84 <th><?php _e('Version'); ?></th> 85 85 <th><?php _e('Description'); ?></th> 86 <th ><?php _e('Action'); ?></th>86 <th colspan="2"><?php _e('Action'); ?></th> 87 87 </tr> 88 88 <?php 89 89 $style = ''; … … 98 98 $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate'; 99 99 100 100 if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) { 101 $ action= "<a href='plugins.php?action=deactivate&plugin=$plugin_file' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>";101 $toggle = "<a href='plugins.php?action=deactivate&plugin=$plugin_file' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 102 102 $plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>"; 103 103 $style .= $style == 'alternate' ? ' active' : 'active'; 104 104 } else { 105 $ action= "<a href='plugins.php?action=activate&plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>";105 $toggle = "<a href='plugins.php?action=activate&plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 106 106 } 107 107 $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()) ); ; 108 108 if ($style != '') $style = 'class="' . $style . '"'; 109 if (current_user_can('edit_plugins') && is_writable(ABSPATH . 'wp-content/plugins/' . $plugin_file)) { 110 $edit = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>"; 111 } 109 112 echo " 110 113 <tr $style> 111 114 <td class='name'>{$plugin_data['Title']}</td> 112 115 <td class='vers'>{$plugin_data['Version']}</td> 113 116 <td class='desc'>{$plugin_data['Description']} <cite>".sprintf(__('By %s'), $plugin_data['Author']).".</cite></td> 114 <td class='togl'>$action</td> 117 <td class='togl'>$toggle</td> 118 <td>$edit</td> 115 119 </tr>"; 116 120 } 117 121 ?>
