Link the posts count on taxonomy list table for non-public taxonomies. Instead check if the post type has show_ui => true as we're linking to the post list table. Fixes #18722.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
duck_ 2011-11-21 20:44:48 +00:00
parent c69a246602
commit 16cce52b9f
1 changed files with 7 additions and 3 deletions

View File

@ -283,13 +283,16 @@ class WP_Terms_List_Table extends WP_List_Table {
}
function column_posts( $tag ) {
global $taxonomy, $post_type;
global $taxonomy;
$count = number_format_i18n( $tag->count );
$tax = get_taxonomy( $taxonomy );
if ( ! $tax->public )
$post_type = get_current_screen()->post_type;
$ptype_object = get_post_type_object( $post_type );
if ( ! $ptype_object->show_ui )
return $count;
if ( $tax->query_var ) {
@ -298,7 +301,8 @@ class WP_Terms_List_Table extends WP_List_Table {
$args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug );
}
$args['post_type'] = $post_type;
if ( 'post' != $post_type )
$args['post_type'] = $post_type;
return "<a href='" . esc_url ( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
}