Changeset 13198 for trunk/wp-includes/post.php
- Timestamp:
- 02/18/2010 08:01:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.