From 7eb46808e7f12e73ed5db5f7a20a83297b202b54 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Wed, 3 Aug 2005 00:28:09 +0000 Subject: [PATCH] More hooks, fixes #1535 git-svn-id: https://develop.svn.wordpress.org/trunk@2741 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 94f3e526a0..1c1e9207e5 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -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(); }