Make WordPress Core

Ticket #1060: patch.txt

File patch.txt, 2.7 KB (added by EricMeyer, 20 years ago)
Line 
1Index: themes.php
2===================================================================
3--- themes.php  (revision 2420)
4+++ themes.php  (working copy)
5@@ -65,7 +65,7 @@
6                <th></th>
7        </tr>
8 <?php
9-       $theme = '';
10+       $style = '';
11 
12        $theme_names = array_keys($themes);
13        natcasesort($theme_names);
14@@ -86,17 +86,20 @@
15                        $current = false;
16                }
17 
18-               $theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"';
19+               $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';
20+               if ($current) $style .= $style == 'alternate' ? ' active' : 'active';
21+               if ($style != '') $style = 'class="' . $style . '"';
22+
23                echo "
24-         <tr $theme>";
25+         <tr $style>";
26 if ( $current )
27        echo "<td><strong>$title $version</strong></td>";
28 else
29        echo "<td>$title $version</td>";
30 echo "
31-            <td align='center'>$author</td>
32-            <td>$description</td>
33-            <td align='center'>$action</td>
34+            <td class=\"auth\">$author</td>
35+            <td class=\"desc\">$description</td>
36+            <td class=\"togl\">$action</td>
37          </tr>";
38        }
39 ?>
40Index: plugins.php
41===================================================================
42--- plugins.php (revision 2420)
43+++ plugins.php (working copy)
44@@ -72,22 +72,24 @@
45 <?php
46        $style = '';
47        foreach($plugins as $plugin_file => $plugin_data) {
48-               $style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
49+               $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';
50 
51                if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) {
52                        $action = "<a href='plugins.php?action=deactivate&amp;plugin=$plugin_file' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>";
53                        $plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>";
54+                       $style .= $style == 'alternate' ? ' active' : 'active';
55                } else {
56                        $action = "<a href='plugins.php?action=activate&amp;plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>";
57                }
58                $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()) ); ;
59+               if ($style != '') $style = 'class="' . $style . '"';
60                echo "
61        <tr $style>
62-               <td>{$plugin_data['Title']}</td>
63-               <td>{$plugin_data['Version']}</td>
64-               <td>{$plugin_data['Author']}</td>
65-               <td>{$plugin_data['Description']}</td>
66-               <td>$action</td>
67+               <td class=\"name\">{$plugin_data['Title']}</td>
68+               <td class=\"vers\">{$plugin_data['Version']}</td>
69+               <td class=\"auth\">{$plugin_data['Author']}</td>
70+               <td class=\"desc\">{$plugin_data['Description']}</td>
71+               <td class=\"togl\">$action</td>
72        </tr>";
73        }
74 ?>