Make WordPress Core

Ticket #11123: wp-includes--post.php.diff

File wp-includes--post.php.diff, 582 bytes (added by josephscott, 15 years ago)
  • wp-includes/post.php

     
    15081508                $limit = "LIMIT $num";
    15091509        }
    15101510
    1511         $sql = "SELECT * FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC $limit";
     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";
    15121512        $result = $wpdb->get_results($sql,ARRAY_A);
    15131513
    15141514        return $result ? $result : array();