From 4e87af0b1fe91af0c2d0e12f05d9309281f11439 Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 25 Nov 2010 01:39:34 +0000 Subject: [PATCH] Check public flag instead of query_var to decide if counts should be linked. See #15573 git-svn-id: http://svn.automattic.com/wordpress/trunk@16579 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-terms-list-table.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index 84e6604bf1..76d094be2b 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -275,11 +275,19 @@ class WP_Terms_List_Table extends WP_List_Table { $count = number_format_i18n( $tag->count ); $tax = get_taxonomy( $taxonomy ); + + if ( ! $tax->public ) + return $count; + if ( $tax->query_var ) { - return " $post_type ), 'edit.php' ) . "'>$count"; + $args = array( $tax->query_var => $tag->slug ); + } else { + $args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug ); } - return $count; + $args['post_type'] = $post_type; + + return "$count"; } function column_links( $tag ) {