Changeset 4564

Show
Ignore:
Timestamp:
12/01/06 00:38:25 (2 years ago)
Author:
ryan
Message:

Close previous element when depth is hit. fixes #3080

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/classes.php

    r4495 r4564  
    431431                    $cb_args = array_merge( array($output, $depth - 1), $args); 
    432432                    $output = call_user_func_array(array(&$this, 'start_lvl'), $cb_args); 
     433                } else {  // If we've reached depth, end the previous element. 
     434                    $cb_args = array_merge( array($output, $previous_element, $depth - 1), $args); 
     435                    $output = call_user_func_array(array(&$this, 'end_el'), $cb_args); 
    433436                } 
    434437            } else if ( $element->$parent_field == $previous_element->$parent_field) {