Changeset 8600 for trunk/wp-includes/classes.php
- Timestamp:
- 08/09/2008 05:36:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r8572 r8600 430 430 call_user_func_array(array(&$this, 'start_el'), $cb_args); 431 431 432 $id = $element->$id_field; 433 432 $id = $element->$id_field; 433 434 434 // descend only the depth is right and there are chilrens for this element 435 if ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) { 435 if ( ($max_depth == 0 || $max_depth > $depth+1 ) && isset( $children_elements[$id]) ) { 436 436 437 437 foreach( $children_elements[ $id ] as $child ){ 438 438 439 439 if ( !isset($newlevel) ) { 440 440 $newlevel = true; … … 445 445 $this->display_element( $child, $children_elements, $max_depth, $depth + 1, $args, $output ); 446 446 } 447 unset( $children_elements[ $id ] ); 447 unset( $children_elements[ $id ] ); 448 448 } 449 449 … … 491 491 * need to display in hierarchical order 492 492 * seperate elements into two buckets: top level and children elements 493 * children_elements is two dimensional array, eg. 494 * children_elements[10][] contains all sub-elements whose parent is 10. 493 * children_elements is two dimensional array, eg. 494 * children_elements[10][] contains all sub-elements whose parent is 10. 495 495 */ 496 496 $top_level_elements = array(); … … 510 510 511 511 $root = $elements[0]; 512 512 513 513 $top_level_elements = array(); 514 514 $children_elements = array(); … … 534 534 $this->display_element( $op, $empty_array, 1, 0, $args, $output ); 535 535 } 536 536 537 537 return $output; 538 538 }
Note: See TracChangeset
for help on using the changeset viewer.