Changeset 12237
- Timestamp:
- 11/20/2009 03:01:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r12222 r12237 1505 1505 // Set the limit clause, if we got a limit 1506 1506 $num = (int) $num; 1507 if ( $num) {1507 if ( $num ) { 1508 1508 $limit = "LIMIT $num"; 1509 1509 } 1510 1510 1511 $sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC $limit";1512 $result = $wpdb->get_results($sql, ARRAY_A);1511 $sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'post' AND post_status IN ( 'draft', 'publish', 'future', 'pending', 'private' ) ORDER BY post_date DESC $limit"; 1512 $result = $wpdb->get_results($sql, ARRAY_A); 1513 1513 1514 1514 return $result ? $result : array();
Note: See TracChangeset
for help on using the changeset viewer.