Fix number formatting in dashboard stats for numbers > 999. http://mosquito.wordpress.org/view.php?id=1074 Hat tip: dougal

git-svn-id: http://svn.automattic.com/wordpress/trunk@2433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-03-11 16:53:16 +00:00
parent c21410812f
commit 15209b94c2
4 changed files with 26 additions and 13 deletions

View File

@ -81,7 +81,7 @@ if (0 < $numcomms) $numcomms = number_format($numcomms);
$numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories");
if (0 < $numcats) $numcats = number_format($numcats);
?>
<p><?php printf(__('There are currently %1$d <a href="%2$s" title="Posts">posts</a> and %3$d <a href="%4$s" title="Comments">comments</a>, contained within %5$d <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p>
<p><?php printf(__('There are currently %1$s <a href="%2$s" title="Posts">posts</a> and %3$s <a href="%4$s" title="Comments">comments</a>, contained within %5$s <a href="%6$s" title="categories">categories</a>.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?></p>
</div>
<?php

View File

@ -72,22 +72,24 @@ if (empty($plugins)) {
<?php
$style = '';
foreach($plugins as $plugin_file => $plugin_data) {
$style = ('class="alternate"' == $style) ? '' : 'class="alternate"';
$style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';
if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) {
$action = "<a href='plugins.php?action=deactivate&amp;plugin=$plugin_file' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>";
$plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>";
$style .= $style == 'alternate' ? ' active' : 'active';
} else {
$action = "<a href='plugins.php?action=activate&amp;plugin=$plugin_file' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>";
}
$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()) ); ;
if ($style != '') $style = 'class="' . $style . '"';
echo "
<tr $style>
<td>{$plugin_data['Title']}</td>
<td>{$plugin_data['Version']}</td>
<td>{$plugin_data['Author']}</td>
<td>{$plugin_data['Description']}</td>
<td>$action</td>
<td class=\"name\">{$plugin_data['Title']}</td>
<td class=\"vers\">{$plugin_data['Version']}</td>
<td class=\"auth\">{$plugin_data['Author']}</td>
<td class=\"desc\">{$plugin_data['Description']}</td>
<td class=\"togl\">$action</td>
</tr>";
}
?>

View File

@ -65,7 +65,7 @@ $current_stylesheet = $themes[$current_theme]['Stylesheet'];
<th></th>
</tr>
<?php
$theme = '';
$style = '';
$theme_names = array_keys($themes);
natcasesort($theme_names);
@ -86,17 +86,20 @@ $current_stylesheet = $themes[$current_theme]['Stylesheet'];
$current = false;
}
$theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"';
$style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate';
if ($current) $style .= $style == 'alternate' ? ' active' : 'active';
if ($style != '') $style = 'class="' . $style . '"';
echo "
<tr $theme>";
<tr $style>";
if ( $current )
echo "<td><strong>$title $version</strong></td>";
else
echo "<td>$title $version</td>";
echo "
<td align='center'>$author</td>
<td>$description</td>
<td align='center'>$action</td>
<td class=\"auth\">$author</td>
<td class=\"desc\">$description</td>
<td class=\"togl\">$action</td>
</tr>";
}
?>

View File

@ -541,3 +541,11 @@ textarea, input, select {
margin: 0 0 .3em .6em;
padding: 0 0 0 .6em;
}
/* emeyer additions */
.active td {background: #BEB;}
.active .name {background: #9C9;}
.active.alternate td {background: #ADA;}
.active.alternate .name {background: #8B8;}