Changeset 13198
- Timestamp:
- 02/18/2010 08:01:10 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r13172 r13198 229 229 } 230 230 231 $total_posts = array_sum( (array) $num_posts ) - $num_posts->trash; 231 $total_posts = array_sum( (array) $num_posts ); 232 233 // Subtract post types that are not included in the admin all list. 234 foreach ( get_post_stati( array('show_in_admin_all_list' => false) ) as $state ) 235 $total_posts -= $num_posts->$state; 236 232 237 $class = empty($class) && empty($_GET['post_status']) ? ' class="current"' : ''; 233 238 $status_links[] = "<li><a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>'; -
trunk/wp-includes/post.php
r13192 r13198 1426 1426 $count = $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A ); 1427 1427 1428 $stats = array ( 'publish' => 0, 'private' => 0, 'draft' => 0, 'pending' => 0, 'future' => 0, 'trash' => 0);1429 foreach ( (array) $count as $row_num => $row ) {1428 $stats = array_fill_keys( get_post_stati(), 0); 1429 foreach ( (array) $count as $row_num => $row ) 1430 1430 $stats[$row['post_status']] = $row['num_posts']; 1431 }1432 1431 1433 1432 $stats = (object) $stats;
Note: See TracChangeset
for help on using the changeset viewer.