From 4bfdef5908bfd481a1c05fb7c7dd3bace43d590b Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sat, 12 Feb 2005 05:25:09 +0000 Subject: [PATCH] Don't show pages or objects in recent posts. git-svn-id: https://develop.svn.wordpress.org/trunk@2281 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();