Fix [16249]. $typenow is considered empty on edit-tags screens, rather than displaying the parent post type. Switch to the $post_type global for now, which is set in the terms list table constructor. see #14886.

git-svn-id: http://svn.automattic.com/wordpress/trunk@19043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-23 17:48:58 +00:00
parent 53d8de7408
commit 1a37559654

View File

@ -93,7 +93,7 @@ class WP_Terms_List_Table extends WP_List_Table {
}
function get_columns() {
global $taxonomy, $typenow;
global $taxonomy, $post_type;
$columns = array(
'cb' => '<input type="checkbox" />',
@ -105,7 +105,6 @@ class WP_Terms_List_Table extends WP_List_Table {
if ( 'link_category' == $taxonomy ) {
$columns['links'] = __( 'Links' );
} else {
$post_type = empty( $typenow ) ? 'post' : $typenow;
$post_type_object = get_post_type_object( $post_type );
$columns['posts'] = $post_type_object ? $post_type_object->labels->name : __( 'Posts' );
}