Ticket #15351: default-to-post-type.diff
| File default-to-post-type.diff, 832 bytes (added by filosofo, 3 years ago) |
|---|
-
wp-admin/includes/class-wp-terms-list-table.php
90 90 } 91 91 92 92 function get_columns() { 93 global $taxonomy ;93 global $taxonomy, $typenow; 94 94 95 95 $columns = array( 96 96 'cb' => '<input type="checkbox" />', … … 102 102 if ( 'link_category' == $taxonomy ) { 103 103 $columns['links'] = __( 'Links' ); 104 104 } else { 105 $post_type_object = get_post_type_object( $GLOBALS['typenow'] ); 105 $post_type = empty( $typenow ) ? 'post' : $typenow; 106 $post_type_object = get_post_type_object( $post_type ); 106 107 $columns['posts'] = $post_type_object ? $post_type_object->labels->name : __( 'Posts' ); 107 108 } 108 109
