WordPress.org

Make WordPress Core

Ticket #11461: the_post.2.patch

File the_post.2.patch, 571 bytes (added by bsdeluxe, 6 years ago)

Patch to fix scope issue on the_post

  • query.php

    old new  
    23872387         * @uses do_action_ref_array() Calls 'loop_start' if loop has just started 
    23882388         */ 
    23892389        function the_post() { 
    2390                 global $post; 
    23912390                $this->in_the_loop = true; 
    23922391 
    23932392                if ( $this->current_post == -1 ) // loop has just started 
    23942393                        do_action_ref_array('loop_start', array(&$this)); 
    23952394 
    2396                 $post = $this->next_post(); 
    2397                 setup_postdata($post); 
     2395                $this->post = $this->next_post(); 
     2396                setup_postdata($this->post); 
    23982397        } 
    23992398 
    24002399        /**