WordPress.org

Make WordPress Core

Changeset 16579


Ignore:
Timestamp:
11/25/10 01:39:34 (4 years ago)
Author:
scribu
Message:

Check public flag instead of query_var to decide if counts should be linked. See #15573

File:
1 edited

Legend:

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

    r16578 r16579  
    276276 
    277277        $tax = get_taxonomy( $taxonomy ); 
     278 
     279        if ( ! $tax->public ) 
     280            return $count; 
     281 
    278282        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>";        
    280         } 
    281  
    282         return $count; 
     283            $args = array( $tax->query_var => $tag->slug ); 
     284        } else { 
     285            $args = array( 'taxonomy' => $tax->name, 'term' => $tag->slug ); 
     286        } 
     287 
     288        $args['post_type'] = $post_type; 
     289 
     290        return "<a href='" . add_query_arg( $args, 'edit.php' ) . "'>$count</a>";        
    283291    } 
    284292 
Note: See TracChangeset for help on using the changeset viewer.