WordPress.org

Make WordPress Core

Ticket #9944: 9944.diff

File 9944.diff, 1015 bytes (added by Denis-de-Bernardy, 9 years ago)
  • wp-includes/query.php

     
    23852385        function the_post() {
    23862386                global $post;
    23872387                $this->in_the_loop = true;
     2388
     2389                if ( $this->current_post == -1 ) // loop has just started
     2390                        do_action_ref_array('loop_start', array(&$this));
     2391
    23882392                $post = $this->next_post();
    23892393                setup_postdata($post);
    2390 
    2391                 if ( $this->current_post == 0 ) // loop has just started
    2392                         do_action_ref_array('loop_start', array(&$this));
    23932394        }
    23942395
    23952396        /**
     
    26612662function setup_postdata($post) {
    26622663        global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages;
    26632664
    2664         do_action_ref_array('the_post', array(&$post));
    2665 
    26662665        $id = (int) $post->ID;
    26672666
    26682667        $authordata = get_userdata($post->post_author);
     
    26892688                $pages[0] = $post->post_content;
    26902689                $multipage = 0;
    26912690        }
     2691
     2692        do_action_ref_array('the_post', array(&$post));
     2693       
    26922694        return true;
    26932695}
    26942696