mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-11 10:59:07 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@28293 git-svn-id: http://core.svn.wordpress.org/trunk@28121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
28d98a89f3
commit
970477d25e
@ -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 '<td ' . $attributes . '>';
|
||||
if ( $terms = get_the_terms( $post->ID, $taxonomy ) ) {
|
||||
$out = array();
|
||||
|
Loading…
Reference in New Issue
Block a user