Skip to content

Commit

Permalink
Don't show pages or objects in recent posts.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@2281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
saxmatt committed Feb 12, 2005
1 parent b0db8df commit fa07538
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-includes/functions-post.php
Expand Up @@ -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();
Expand Down

0 comments on commit fa07538

Please sign in to comment.