Changeset 2716
- Timestamp:
- 07/17/2005 04:58:13 PM (20 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r2635 r2716 10 10 var $post_count = 0; 11 11 var $current_post = -1; 12 var $in_the_loop = false; 12 13 var $post; 13 14 … … 56 57 $this->post_count = 0; 57 58 $this->current_post = -1; 59 $this->in_the_loop = false; 58 60 } 59 61 … … 594 596 function the_post() { 595 597 global $post; 598 $this->in_the_loop = true; 596 599 $post = $this->next_post(); 597 600 setup_postdata($post); … … 601 604 if ($this->current_post + 1 < $this->post_count) { 602 605 return true; 603 } 604 606 } elseif ($this->current_post + 1 == $this->post_count) { 607 // Do some cleaning up after the loop 608 $this->rewind_posts(); 609 } 610 611 $this->in_the_loop = false; 605 612 return false; 606 613 } -
trunk/wp-includes/functions.php
r2715 r2716 1414 1414 } 1415 1415 1416 function in_the_loop() { 1417 global $wp_query; 1418 1419 return $wp_query->in_the_loop; 1420 } 1421 1416 1422 function get_query_var($var) { 1417 1423 global $wp_query;
Note: See TracChangeset
for help on using the changeset viewer.