Changeset 13531 for trunk/wp-admin/includes/dashboard.php
- Timestamp:
- 03/01/2010 12:32:00 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/dashboard.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r13519 r13531 213 213 $num_comm = wp_count_comments( ); 214 214 215 echo "\n\t".'< p class="sub">' . __('At a Glance') . '</p>';216 echo "\n\t".'< div class="table">'."\n\t".'<table>';215 echo "\n\t".'<div class="table table_content">'."\n\t".'<table>'; 216 echo "\n\t".'<p class="sub">' . __('Content') . '</p>'; 217 217 echo "\n\t".'<tr class="first">'; 218 218 … … 226 226 echo '<td class="first b b-posts">' . $num . '</td>'; 227 227 echo '<td class="t posts">' . $text . '</td>'; 228 229 echo '</tr><tr>'; 228 230 /* TODO: Show status breakdown on hover 229 231 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can … … 242 244 } 243 245 */ 244 245 // Total Comments246 $num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';247 $text = _n( 'Comment', 'Comments', $num_comm->total_comments );248 if ( current_user_can( 'moderate_comments' ) ) {249 $num = "<a href='edit-comments.php'>$num</a>";250 $text = "<a href='edit-comments.php'>$text</a>";251 }252 echo '<td class="b b-comments">' . $num . '</td>';253 echo '<td class="last t comments">' . $text . '</td>';254 255 echo '</tr><tr>';256 246 257 247 // Pages … … 265 255 echo '<td class="t pages">' . $text . '</td>'; 266 256 257 echo '</tr><tr>'; 258 259 // Categories 260 $num = number_format_i18n( $num_cats ); 261 $text = _n( 'Category', 'Categories', $num_cats ); 262 if ( current_user_can( 'manage_categories' ) ) { 263 $num = "<a href='edit-tags.php?taxonomy=category'>$num</a>"; 264 $text = "<a href='edit-tags.php?taxonomy=category'>$text</a>"; 265 } 266 echo '<td class="first b b-cats">' . $num . '</td>'; 267 echo '<td class="t cats">' . $text . '</td>'; 268 269 echo '</tr><tr>'; 270 271 // Tags 272 $num = number_format_i18n( $num_tags ); 273 $text = _n( 'Tag', 'Tags', $num_tags ); 274 if ( current_user_can( 'manage_categories' ) ) { 275 $num = "<a href='edit-tags.php'>$num</a>"; 276 $text = "<a href='edit-tags.php'>$text</a>"; 277 } 278 echo '<td class="first b b-tags">' . $num . '</td>'; 279 echo '<td class="t tags">' . $text . '</td>'; 280 281 echo "</tr>"; 282 echo "\n\t</table>\n\t</div>"; 283 284 285 echo "\n\t".'<div class="table table_discussion">'."\n\t".'<table>'; 286 echo "\n\t".'<p class="sub">' . __('Discussion') . '</p>'; 287 echo "\n\t".'<tr class="first">'; 288 289 // Total Comments 290 $num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>'; 291 $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); 292 echo '<td class="b b-comments"><a href="edit-comments.php">' . $num . '</a></td>'; 293 echo '<td class="last t comments"><a href="edit-comments.php">' . $text . '</a></td>'; 294 295 echo '</tr><tr>'; 296 267 297 // Approved Comments 268 298 $num = '<span class="approved-count">' . number_format_i18n($num_comm->approved) . '</span>'; … … 277 307 echo "</tr>\n\t<tr>"; 278 308 279 // Categories280 $num = number_format_i18n( $num_cats );281 $text = _n( 'Category', 'Categories', $num_cats );282 if ( current_user_can( 'manage_categories' ) ) {283 $num = "<a href='edit-tags.php?taxonomy=category'>$num</a>";284 $text = "<a href='edit-tags.php?taxonomy=category'>$text</a>";285 }286 echo '<td class="first b b-cats">' . $num . '</td>';287 echo '<td class="t cats">' . $text . '</td>';288 289 309 // Pending Comments 290 310 $num = '<span class="pending-count">' . number_format_i18n($num_comm->moderated) . '</span>'; … … 298 318 299 319 echo "</tr>\n\t<tr>"; 300 301 // Tags302 $num = number_format_i18n( $num_tags );303 $text = _n( 'Tag', 'Tags', $num_tags );304 if ( current_user_can( 'manage_categories' ) ) {305 $num = "<a href='edit-tags.php'>$num</a>";306 $text = "<a href='edit-tags.php'>$text</a>";307 }308 echo '<td class="first b b-tags">' . $num . '</td>';309 echo '<td class="t tags">' . $text . '</td>';310 320 311 321 // Spam Comments
Note: See TracChangeset
for help on using the changeset viewer.