diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index e9edea2b4a..737fe19931 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -84,7 +84,7 @@ function wp_get_recent_posts($num = 10) { $limit = "LIMIT $num"; } - $sql = "SELECT * FROM $wpdb->posts ORDER BY post_date DESC $limit"; + $sql = "SELECT * FROM $wpdb->posts WHERE post_status IN ('publish', 'draft', 'private') ORDER BY post_date DESC $limit"; $result = $wpdb->get_results($sql,ARRAY_A); return $result?$result:array();