Use the name of the corresponding post type in the edit-tags column. TODO, typenow should be accessible from the current_screen object on edit-tags. see #14886 for current_screen, [15664] for previous TODO note.

git-svn-id: https://develop.svn.wordpress.org/trunk@16249 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-11-09 00:59:49 +00:00
parent 7be12299b7
commit 1d7a732588

View File

@@ -99,10 +99,12 @@ class WP_Terms_List_Table extends WP_List_Table {
'slug' => __( 'Slug' ),
);
if ( 'link_category' == $taxonomy )
if ( 'link_category' == $taxonomy ) {
$columns['links'] = __( 'Links' );
else
$columns['posts'] = __( 'Posts' );
} else {
$post_type_object = get_post_type_object( $GLOBALS['typenow'] );
$columns['posts'] = $post_type_object ? $post_type_object->labels->name : __( 'Posts' );
}
return $columns;
}