Don't link post counts if taxonomy isn't queryable. Fixes #15573

git-svn-id: http://svn.automattic.com/wordpress/trunk@16578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-11-24 23:29:13 +00:00
parent ad6e83136d
commit 87e98f9f22
1 changed files with 4 additions and 9 deletions

View File

@ -274,17 +274,12 @@ class WP_Terms_List_Table extends WP_List_Table {
$count = number_format_i18n( $tag->count );
if ( 'post_tag' == $taxonomy ) {
$tagsel = 'tag';
} elseif ( 'category' == $taxonomy ) {
$tagsel = 'category_name';
} elseif ( ! empty( $tax->query_var ) ) {
$tagsel = $tax->query_var;
} else {
$tagsel = $taxonomy;
$tax = get_taxonomy( $taxonomy );
if ( $tax->query_var ) {
return "<a href='" . add_query_arg( array( $tax->query_var => $tag->slug, 'post_type' => $post_type ), 'edit.php' ) . "'>$count</a>";
}
return "<a href='edit.php?$tagsel=$tag->slug&amp;post_type=$post_type'>$count</a>";
return $count;
}
function column_links( $tag ) {