Make WordPress Core

Changeset 9830


Ignore:
Timestamp:
11/21/2008 05:17:18 PM (15 years ago)
Author:
westi
Message:

Make arguments to start_el consistent and ensure that page walking is consistent. Fixes #8303 and #8091 props filosofo.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r9812 r9830  
    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);
     
    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);
  • trunk/wp-includes/post-template.php

    r9816 r9830  
    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}
Note: See TracChangeset for help on using the changeset viewer.