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: https://develop.svn.wordpress.org/trunk@19383 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3a5d241fd5
commit
3504002abe
|
@ -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>";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue