WordPress.org

Make WordPress Core

Changeset 16249


Ignore:
Timestamp:
11/09/2010 12:59:49 AM (10 years ago)
Author:
nacin
Message:

Use the name of the corresponding post type in the edit-tags column. TODO, typenow should be accessible from the current_screen object on edit-tags. see #14886 for current_screen, [15664] for previous TODO note.

File:
1 edited

Legend:

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

    r16235 r16249  
    100100        );
    101101
    102         if ( 'link_category' == $taxonomy )
     102        if ( 'link_category' == $taxonomy ) {
    103103            $columns['links'] = __( 'Links' );
    104         else
    105             $columns['posts'] = __( 'Posts' );
     104        } else {
     105            $post_type_object = get_post_type_object( $GLOBALS['typenow'] );
     106            $columns['posts'] = $post_type_object ? $post_type_object->labels->name : __( 'Posts' );
     107        }
    106108
    107109        return $columns;
Note: See TracChangeset for help on using the changeset viewer.