Ticket #21534: 21534.diff
| File 21534.diff, 839 bytes (added by , 13 years ago) |
|---|
-
wp-includes/class-wp-walker.php
123 123 $id_field = $this->db_fields['id']; 124 124 125 125 //display this element 126 if ( isset( $args[0] ) && is_array( $args[0] ) ) 127 $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] ); 126 if ( isset( $args[0] ) ) { 127 if ( is_array( $args[0] ) ) 128 $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] ); 129 elseif ( is_object( $args[0] ) ) 130 $args[0]->has_children = ! empty( $children_elements[$element->$id_field] ); 131 } 132 128 133 $cb_args = array_merge( array(&$output, $element, $depth), $args); 129 134 call_user_func_array(array($this, 'start_el'), $cb_args); 130 135