From db5af22ed9cf83e573b741b433d3776058208dc3 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 9 Nov 2010 00:59:49 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-terms-list-table.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index 94bd6a25fe..568b218cad 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -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; }