WordPress.org

Make WordPress Core

Changeset 11399


Ignore:
Timestamp:
05/19/09 16:13:50 (6 years ago)
Author:
ryan
Message:

Pass query object to loop_start and loop_end actions. Props Denis-de-Bernardy. fixes #9854

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r11392 r11399  
    23722372     * @access public 
    23732373     * @uses $post 
    2374      * @uses do_action() Calls 'loop_start' if loop has just started 
     2374     * @uses do_action_ref_array() Calls 'loop_start' if loop has just started 
    23752375     */ 
    23762376    function the_post() { 
     
    23832383 
    23842384        if ( $this->current_post == 0 ) // loop has just started 
    2385             do_action('loop_start'); 
     2385            do_action_ref_array('loop_start', array(&$this)); 
    23862386    } 
    23872387 
     
    23932393     * @since 1.5.0 
    23942394     * @access public 
    2395      * @uses do_action() Calls 'loop_start' if loop has just started 
     2395     * @uses do_action_ref_array() Calls 'loop_end' if loop is ended 
    23962396     * 
    23972397     * @return bool True if posts are available, false if end of loop. 
     
    24012401            return true; 
    24022402        } elseif ($this->current_post + 1 == $this->post_count && $this->post_count > 0) { 
    2403             do_action('loop_end'); 
     2403            do_action_ref_array('loop_end', array(&$this)); 
    24042404            // Do some cleaning up after the loop 
    24052405            $this->rewind_posts(); 
Note: See TracChangeset for help on using the changeset viewer.