From 853d2537c7271077b72c18824888a78bac4fa404 Mon Sep 17 00:00:00 2001 From: scribu Date: Wed, 24 Nov 2010 23:29:13 +0000 Subject: [PATCH] Don't link post counts if taxonomy isn't queryable. Fixes #15573 git-svn-id: https://develop.svn.wordpress.org/trunk@16578 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-terms-list-table.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index c21e7abd6e..84e6604bf1 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -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 " $post_type ), 'edit.php' ) . "'>$count"; } - return "$count"; + return $count; } function column_links( $tag ) {