Ticket #27802: 27802.2.diff
File 27802.2.diff, 641 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['unknown'] = $row['num_posts']; 2281 } else { 2282 $counts[ $row['post_mime_type'] ] = $row['num_posts']; 2283 } 2280 2284 } 2281 2285 $counts['trash'] = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status = 'trash' $and"); 2282 2286