From 2c190706cd6419e75dfecddf1263473889e5e92c Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 21 Dec 2006 23:40:16 +0000 Subject: [PATCH] Categories with zero posts and posts with no comments no longer link to those empty views in the admin. fixes #3493 git-svn-id: https://develop.svn.wordpress.org/trunk@4659 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-functions.php | 3 ++- wp-admin/edit.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 2d50a104c0..7bf35055cd 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -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 ) ? "$category->category_count" : $category->category_count; return " $category->cat_ID " . ( $name_override ? $name_override : $pad . ' ' . $category->cat_name ) . " $category->category_description - $category->category_count + $posts_count $category->link_count $edit\n\t\n"; } diff --git a/wp-admin/edit.php b/wp-admin/edit.php index d9ad85bc0c..205f528394 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -195,9 +195,9 @@ foreach($posts_columns as $column_name=>$column_display_name) { case 'comments': ?> - - - + + " . __('1') . '', "" . __('%') . '') ?> +