More hooks, fixes #1535

git-svn-id: https://develop.svn.wordpress.org/trunk@2741 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-08-03 00:28:09 +00:00
parent 42b54bdd1c
commit 7eb46808e7
1 changed files with 4 additions and 0 deletions

View File

@ -598,12 +598,16 @@ class WP_Query {
$this->in_the_loop = true;
$post = $this->next_post();
setup_postdata($post);
if ( $this->current_post == 0 ) // loop has just started
do_action('loop_start');
}
function have_posts() {
if ($this->current_post + 1 < $this->post_count) {
return true;
} elseif ($this->current_post + 1 == $this->post_count) {
do_action('loop_end');
// Do some cleaning up after the loop
$this->rewind_posts();
}