Make WordPress Core

Ticket #18762: fix_reverse_order_pagination.diff

File fix_reverse_order_pagination.diff, 895 bytes (added by gburtini, 13 years ago)

Patch to fix strange sort order.

  • class-wp-walker.php

     
    292292                        if ( !empty($args[0]['reverse_top_level']) ) {
    293293                                $elements = array_reverse( $elements );
    294294                                $oldstart = $start;
     295                                $end = $total_top - $oldstart;
    295296                                $start = $total_top - $end;
    296                                 $end = $total_top - $oldstart;
    297297                        }
    298298
    299299                        $empty_array = array();
     
    331331                if ( !empty($args[0]['reverse_top_level']) ) {
    332332                        $top_level_elements = array_reverse( $top_level_elements );
    333333                        $oldstart = $start;
     334                        $end = $total_top - $oldstart;
    334335                        $start = $total_top - $end;
    335                         $end = $total_top - $oldstart;
    336336                }
    337337                if ( !empty($args[0]['reverse_children']) ) {
    338338                        foreach ( $children_elements as $parent => $children )
     
    396396        }
    397397}
    398398
    399 ?>
    400  No newline at end of file
     399?>