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: https://develop.svn.wordpress.org/trunk@19043 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-10-23 17:48:58 +00:00
parent eb1b0763e1
commit 79ff2e030c
1 changed files with 1 additions and 2 deletions

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