Categories with zero posts and posts with no comments no longer link to those empty views in the admin. fixes #3493
git-svn-id: http://svn.automattic.com/wordpress/trunk@4659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a678f3841
commit
dc17d069c0
|
@ -760,11 +760,12 @@ function _cat_row( $category, $level, $name_override = false ) {
|
|||
|
||||
$category->category_count = number_format( $category->category_count );
|
||||
$category->link_count = number_format( $category->link_count );
|
||||
$posts_count = ( $category->category_count > 0 ) ? "<a href='edit.php?cat=$category->cat_ID'>$category->category_count</a>" : $category->category_count;
|
||||
return "<tr id='cat-$category->cat_ID'$class>
|
||||
<th scope='row' style='text-align: center'>$category->cat_ID</th>
|
||||
<td>" . ( $name_override ? $name_override : $pad . ' ' . $category->cat_name ) . "</td>
|
||||
<td>$category->category_description</td>
|
||||
<td align='center'><a href='edit.php?cat=$category->cat_ID'>$category->category_count</a></td>
|
||||
<td align='center'>$posts_count</td>
|
||||
<td align='center'>$category->link_count</td>
|
||||
<td>$edit</td>\n\t</tr>\n";
|
||||
}
|
||||
|
|
|
@ -195,9 +195,9 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
|||
|
||||
case 'comments':
|
||||
?>
|
||||
<td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&c=1">
|
||||
<?php comments_number(__('0'), __('1'), __('%')) ?>
|
||||
</a></td>
|
||||
<td style="text-align: center">
|
||||
<?php comments_number(__('0'), "<a href='edit.php?p=$id&c=1'>" . __('1') . '</a>', "<a href='edit.php?p=$id&c=1'>" . __('%') . '</a>') ?>
|
||||
</td>
|
||||
<?php
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue