Don't show pages or objects in recent posts.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-02-12 05:25:09 +00:00
parent b0db8dfc0b
commit fa0753801a
1 changed files with 1 additions and 1 deletions

View File

@ -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();