Make WordPress Core

Changeset 28293


Ignore:
Timestamp:
05/06/2014 03:26:32 PM (10 years ago)
Author:
wonderboymusic
Message:

In WP_Media_List_Table, remove dead code:

  • In ->prepare_items(), importing $wpdb is unnecessary.
  • In ->get_columns(), $taxonomies is set twice before it is used.
  • In ->display_rows(), $taxonomy_object is set and never used.

See #27882.

File:
1 edited

Legend:

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

    r27560 r28293  
    2424
    2525    function prepare_items() {
    26         global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types;
     26        global $lost, $wp_query, $post_mime_types, $avail_post_mime_types;
    2727
    2828        $q = $_REQUEST;
     
    133133        $posts_columns['title'] = _x( 'File', 'column name' );
    134134        $posts_columns['author'] = __( 'Author' );
    135 
    136         $taxonomies = array();
    137135
    138136        $taxonomies = get_taxonomies_for_attachments( 'objects' );
     
    378376
    379377        if ( $taxonomy ) {
    380             $taxonomy_object = get_taxonomy( $taxonomy );
    381378            echo '<td ' . $attributes . '>';
    382379            if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) {
Note: See TracChangeset for help on using the changeset viewer.