Make WordPress Core

Ticket #15573: 15573.diff

File 15573.diff, 803 bytes (added by scribu, 14 years ago)

Use 'taxonomy' => 'foo', 'term' => 'bar'

  • wp-admin/includes/class-wp-terms-list-table.php

     
    276276
    277277                $tax = get_taxonomy( $taxonomy );
    278278                if ( $tax->query_var ) {
    279                         return "<a href='" . add_query_arg( array( $tax->query_var => $tag->slug, 'post_type' => $post_type ), 'edit.php' ) . "'>$count</a>";           
     279                        $args = array( $tax->query_var => $tag->slug );
     280                } else {
     281                        $args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug );
    280282                }
    281283
    282                 return $count;
     284                $args['post_type'] = $post_type;
     285
     286                return "<a href='" . add_query_arg( $args, 'edit.php' ) . "'>$count</a>";               
    283287        }
    284288
    285289        function column_links( $tag ) {