Make WordPress Core

Ticket #4969: 4969.patch

File 4969.patch, 1.9 KB (added by pishmishy, 18 years ago)

Revised patch

  • wp-includes/post-template.php

     
    304304                'date_format' => get_option('date_format'),
    305305                'child_of' => 0, 'exclude' => '',
    306306                'title_li' => __('Pages'), 'echo' => 1,
    307                 'authors' => '', 'sort_column' => 'menu_order, post_title'
     307                'authors' => '', 'sort_column' => 'menu_order, post_title',
     308                'before' => '<li class="pagenav">', 'after' => '</li>'
    308309        );
    309310
    310311        $r = wp_parse_args( $args, $defaults );
     
    325326
    326327        if ( !empty($pages) ) {
    327328                if ( $r['title_li'] )
    328                         $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
     329                        $output .= $r['before'] . $r['title_li'] . '<ul>';
    329330
    330331                global $wp_query;
    331332                if ( is_page() || $wp_query->is_posts_page )
     
    333334                $output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
    334335
    335336                if ( $r['title_li'] )
    336                         $output .= '</ul></li>';
     337                        $output .= '</ul>'. $r['after'];
    337338        }
    338339
    339340        $output = apply_filters('wp_list_pages', $output);
  • wp-includes/general-template.php

     
    359359        $defaults = array(
    360360                'type' => 'monthly', 'limit' => '',
    361361                'format' => 'html', 'before' => '',
    362                 'after' => '', 'show_post_count' => false
     362                'after' => '', 'show_post_count' => false,
     363                'title_li' => '' , 'before' => '',
     364                'after' => ''
    363365        );
    364 
     366       
    365367        $r = wp_parse_args( $args, $defaults );
    366368        extract( $r, EXTR_SKIP );
    367369
     370        if ( $r[$before] )
     371                        echo $r[$before];
     372        if ( $r['title_li'] )
     373            $r['title_li'] . '<ul>';
     374
    368375        if ( '' == $type )
    369376                $type = 'monthly';
    370377
     
    516523                        }
    517524                }
    518525        }
     526        if ( $r['title_li'] )
     527                echo '</ul>';
     528        if ( $r['after'])
     529                $r['after'];
    519530}
    520531
    521532