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: http://svn.automattic.com/wordpress/trunk@16249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-11-09 00:59:49 +00:00
parent 7e8670bb01
commit db5af22ed9
1 changed files with 5 additions and 3 deletions

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;
}