X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/includes/class-wp-media-list-table.php diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index 2c2bf7c3..67fd187c 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -47,8 +47,7 @@ class WP_Media_List_Table extends WP_List_Table { $type_links = array(); $_num_posts = (array) wp_count_attachments(); $_total_posts = array_sum($_num_posts) - $_num_posts['trash']; - if ( !isset( $total_orphans ) ) - $total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" ); + $total_orphans = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent < 1" ); $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); foreach ( $matches as $type => $reals ) foreach ( $reals as $real ) @@ -176,7 +175,7 @@ class WP_Media_List_Table extends WP_List_Table { } function display_rows() { - global $post, $id; + global $post; add_filter( 'the_title','esc_html' ); $alt = ''; @@ -192,7 +191,7 @@ class WP_Media_List_Table extends WP_List_Table { $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other'; $att_title = _draft_or_post_title(); ?> - post_status ); ?>' valign="top"> + post_status ); ?>' valign="top"> get_column_info(); @@ -266,7 +265,12 @@ foreach ( $columns as $column_name => $column_display_name ) { case 'author': ?> - > + >%s', + esc_url( add_query_arg( array( 'author' => get_the_author_meta('ID') ), 'upload.php' ) ), + get_the_author() + ); + ?> $column_display_name ) { break; case 'parent': - if ( $post->post_parent > 0 ) { - if ( get_post( $post->post_parent ) ) { - $title =_draft_or_post_title( $post->post_parent ); - } + if ( $post->post_parent > 0 && get_post( $post->post_parent ) ) { + $title = _draft_or_post_title( $post->post_parent ); ?> > - post_parent ) ) { ?> + post_parent ) ) { ?> $column_display_name ) { } else { ?> >
- + @@ -375,7 +377,7 @@ foreach ( $columns as $column_name => $column_display_name ) { } ?> > - + ID ); ?>