Index: /trunk/wp-admin/edit.php
===================================================================
--- /trunk/wp-admin/edit.php (revision 13197)
+++ /trunk/wp-admin/edit.php (revision 13198)
@@ -229,5 +229,10 @@
}
-$total_posts = array_sum( (array) $num_posts ) - $num_posts->trash;
+$total_posts = array_sum( (array) $num_posts );
+
+// Subtract post types that are not included in the admin all list.
+foreach ( get_post_stati( array('show_in_admin_all_list' => false) ) as $state )
+ $total_posts -= $num_posts->$state;
+
$class = empty($class) && empty($_GET['post_status']) ? ' class="current"' : '';
$status_links[] = "
" . sprintf( _nx( 'All (%s)', 'All (%s)', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '';
Index: /trunk/wp-includes/post.php
===================================================================
--- /trunk/wp-includes/post.php (revision 13197)
+++ /trunk/wp-includes/post.php (revision 13198)
@@ -1426,8 +1426,7 @@
$count = $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A );
- $stats = array( 'publish' => 0, 'private' => 0, 'draft' => 0, 'pending' => 0, 'future' => 0, 'trash' => 0 );
- foreach( (array) $count as $row_num => $row ) {
+ $stats = array_fill_keys( get_post_stati(), 0);
+ foreach ( (array) $count as $row_num => $row )
$stats[$row['post_status']] = $row['num_posts'];
- }
$stats = (object) $stats;