Check public flag instead of query_var to decide if counts should be linked. See #15573

git-svn-id: https://develop.svn.wordpress.org/trunk@16579 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-11-25 01:39:34 +00:00
parent 853d2537c7
commit 9de282e670

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 ) {