From 36abe7909c51b23565aa1a2148dd34b6d0223ea2 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 15:26:32 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@28293 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-media-list-table.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index 48e4363980..0a19848ce3 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -23,7 +23,7 @@ class WP_Media_List_Table extends WP_List_Table { } function prepare_items() { - global $lost, $wpdb, $wp_query, $post_mime_types, $avail_post_mime_types; + global $lost, $wp_query, $post_mime_types, $avail_post_mime_types; $q = $_REQUEST; @@ -133,8 +133,6 @@ class WP_Media_List_Table extends WP_List_Table { $posts_columns['title'] = _x( 'File', 'column name' ); $posts_columns['author'] = __( 'Author' ); - $taxonomies = array(); - $taxonomies = get_taxonomies_for_attachments( 'objects' ); $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' ); @@ -377,7 +375,6 @@ foreach ( $columns as $column_name => $column_display_name ) { $taxonomy = false; if ( $taxonomy ) { - $taxonomy_object = get_taxonomy( $taxonomy ); echo ''; if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) { $out = array();