WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/09/2010 06:38:53 AM (8 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-terms-list-table.php

    r16249 r16254  
    9191
    9292    function get_columns() {
    93         global $taxonomy;
     93        global $taxonomy, $typenow;
    9494
    9595        $columns = array(
     
    103103            $columns['links'] = __( 'Links' );
    104104        } 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 );
    106107            $columns['posts'] = $post_type_object ? $post_type_object->labels->name : __( 'Posts' );
    107108        }
Note: See TracChangeset for help on using the changeset viewer.