Make WordPress Core

Ticket #8091: consistent_start_el_args.diff

File consistent_start_el_args.diff, 1.4 KB (added by filosofo, 18 years ago)
  • wp-includes/post-template.php

     
    687687 * @since 2.1.0
    688688 * @see Walker_Page::walk() for parameters and return description.
    689689 */
    690 function walk_page_tree() {
     690function walk_page_tree($pages, $depth, $current_page, $r) {
    691691        $walker = new Walker_Page;
    692         $args = func_get_args();
     692        $args = array($pages, $depth, $r, $current_page);
    693693        return call_user_func_array(array(&$walker, 'walk'), $args);
    694694}
    695695
  • wp-includes/classes.php

     
    822822                $id_field = $this->db_fields['id'];
    823823
    824824                //display this element
    825                 if ( ! empty( $args[0] ) )
     825                if ( is_array( $args[0] ) )
    826826                        $args[0]['has_children'] = ! empty( $children_elements[$element->$id_field] );
    827827                $cb_args = array_merge( array(&$output, $element, $depth), $args);
    828828                call_user_func_array(array(&$this, 'start_el'), $cb_args);
    … …  
    11521152         * @param int $current_page Page ID.
    11531153         * @param array $args
    11541154         */
    1155         function start_el(&$output, $page, $depth, $current_page, $args) {
     1155        function start_el(&$output, $page, $depth, $args, $current_page) {
    11561156                if ( $depth )
    11571157                        $indent = str_repeat("\t", $depth);
    11581158                else