mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-02 19:39:32 +00:00
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:
parent
dc07485821
commit
21da8738a2
@ -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' );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user