Ticket #27802: 27802.diff
File 27802.diff, 586 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/post.php
2276 2276 2277 2277 $counts = array(); 2278 2278 foreach( (array) $count as $row ) { 2279 $counts[ $row['post_mime_type'] ] = $row['num_posts']; 2279 if ( ! empty( $row['post_mime_type'] ) ) { 2280 $counts[ $row['post_mime_type'] ] = $row['num_posts']; 2281 } 2280 2282 } 2281 2283 $counts['trash'] = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status = 'trash' $and"); 2282 2284