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
This commit is contained in:
scribu 2010-11-25 01:39:34 +00:00
parent 87e98f9f22
commit 4e87af0b1f
1 changed files with 10 additions and 2 deletions

View File

@ -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 "<a href='" . add_query_arg( array( $tax->query_var => $tag->slug, 'post_type' => $post_type ), 'edit.php' ) . "'>$count</a>";
$args = array( $tax->query_var => $tag->slug );
} else {
$args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug );
}
return $count;
$args['post_type'] = $post_type;
return "<a href='" . add_query_arg( $args, 'edit.php' ) . "'>$count</a>";
}
function column_links( $tag ) {