Make WordPress Core

Changeset 19383


Ignore:
Timestamp:
11/21/2011 08:44:48 PM (15 years ago)
Author:
duck_
Message:

Link the posts count on taxonomy list table for non-public taxonomies. Instead check if the post type has show_ui => true as we're linking to the post list table. Fixes #18722.

File:
1 edited

Legend:

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

    r19089 r19383  
    284284
    285285        function column_posts( $tag ) {
    286                 global $taxonomy, $post_type;
     286                global $taxonomy;
    287287
    288288                $count = number_format_i18n( $tag->count );
     
    290290                $tax = get_taxonomy( $taxonomy );
    291291
    292                 if ( ! $tax->public )
     292                $post_type = get_current_screen()->post_type;
     293                $ptype_object = get_post_type_object( $post_type );
     294
     295                if ( ! $ptype_object->show_ui )
    293296                        return $count;
    294297
     
    299302                }
    300303
    301                 $args['post_type'] = $post_type;
     304                if ( 'post' != $post_type )
     305                        $args['post_type'] = $post_type;
    302306
    303307                return "<a href='" . esc_url ( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
Note: See TracChangeset for help on using the changeset viewer.