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:
parent
ad6e83136d
commit
87e98f9f22
|
@ -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&post_type=$post_type'>$count</a>";
|
||||
return $count;
|
||||
}
|
||||
|
||||
function column_links( $tag ) {
|
||||
|
|
Loading…
Reference in New Issue