Default to 'post' in WP_Terms_List_Table. props filosofo, fixes #15351.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-11-09 06:38:53 +00:00
parent dc07485821
commit 21da8738a2
1 changed files with 3 additions and 2 deletions

View File

@ -90,7 +90,7 @@ class WP_Terms_List_Table extends WP_List_Table {
}
function get_columns() {
global $taxonomy;
global $taxonomy, $typenow;
$columns = array(
'cb' => '<input type="checkbox" />',
@ -102,7 +102,8 @@ class WP_Terms_List_Table extends WP_List_Table {
if ( 'link_category' == $taxonomy ) {
$columns['links'] = __( 'Links' );
} else {
$post_type_object = get_post_type_object( $GLOBALS['typenow'] );
$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' );
}