Add rewind_posts().

git-svn-id: http://svn.automattic.com/wordpress/trunk@2026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren
2004-12-31 21:49:48 +00:00
parent 3dae426318
commit 04d470cbbd
2 changed files with 13 additions and 0 deletions

View File

@@ -578,6 +578,13 @@ class WP_Query {
return false;
}
function rewind_posts() {
$this->current_post = -1;
if ($this->post_count > 0) {
$this->post = $this->posts[0];
}
}
function query($query) {
$this->parse_query($query);