mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
b0db8dfc0b
commit
fa0753801a
@ -84,7 +84,7 @@ function wp_get_recent_posts($num = 10) {
|
|||||||
$limit = "LIMIT $num";
|
$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);
|
$result = $wpdb->get_results($sql,ARRAY_A);
|
||||||
|
|
||||||
return $result?$result:array();
|
return $result?$result:array();
|
||||||
|
Loading…
Reference in New Issue
Block a user