Definition:
function have_posts() {}
Whether current WordPress query has results to loop over.
Defined actions
- loop_end
do_action_ref_array('loop_end', array(&$this));
Source code
function have_posts() {
if ( $this->current_post + 1 < $this->post_count ) {
return true;
} elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
do_action_ref_array('loop_end', array(&$this));
// Do some cleaning up after the loop
$this->rewind_posts();
}
$this->in_the_loop = false;
return false;
}
1943

February 12, 2011 


No comments yet... Be the first to leave a reply!