Ticket #9458: 9458.diff
| File 9458.diff, 1.3 KB (added by , 17 years ago) |
|---|
-
Users/denis/Sites/sem-pro/wp-includes/query.php
2369 2369 */ 2370 2370 function the_post() { 2371 2371 global $post; 2372 $this->in_the_loop = true; 2372 global $wp_the_query; 2373 if ( $this === $wp_the_query ) 2374 $this->in_the_loop = true; 2373 2375 $post = $this->next_post(); 2374 2376 setup_postdata($post); 2375 2377 2376 if ( $this->current_post == 0 ) // loop has just started2378 if ( $this->current_post == 0 && $this === $wp_the_query ) // loop has just started 2377 2379 do_action('loop_start'); 2378 2380 } 2379 2381 … … 2389 2391 * @return bool True if posts are available, false if end of loop. 2390 2392 */ 2391 2393 function have_posts() { 2394 global $wp_the_query; 2392 2395 if ($this->current_post + 1 < $this->post_count) { 2393 2396 return true; 2394 2397 } elseif ($this->current_post + 1 == $this->post_count && $this->post_count > 0) { 2395 do_action('loop_end'); 2398 if ( $this === $wp_the_query ) 2399 do_action('loop_end'); 2396 2400 // Do some cleaning up after the loop 2397 2401 $this->rewind_posts(); 2398 2402 } 2399 2403 2400 $this->in_the_loop = false; 2404 if ( $this === $wp_the_query ) 2405 $this->in_the_loop = false; 2401 2406 return false; 2402 2407 } 2403 2408
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)