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