Ticket #4969: 4969-list-pages.diff
| File 4969-list-pages.diff, 1.2 KB (added by Otto42, 6 years ago) |
|---|
-
wp-includes/post-template.php
286 286 'date_format' => get_option('date_format'), 287 287 'child_of' => 0, 'exclude' => '', 288 288 'title_li' => __('Pages'), 'echo' => 1, 289 'authors' => '', 'sort_column' => 'menu_order, post_title' 289 'authors' => '', 'sort_column' => 'menu_order, post_title', 290 'style' => 'list', 'title_before' => '<h2>', 'title_after' => '</h2>', 291 'before' => '<li class="pagenav">', 'after' => '</li>', 290 292 ); 291 293 292 294 $r = wp_parse_args( $args, $defaults ); … … 305 307 $pages = get_pages($r); 306 308 307 309 if ( !empty($pages) ) { 308 if ( $r['title_li'] ) 309 $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>'; 310 $output .= $r['before'].$r['title_before'].$r['title_li'].$r['title_after'].'<ul>'; 310 311 311 312 global $wp_query; 312 313 if ( is_page() ) 313 314 $current_page = $wp_query->get_queried_object_id(); 315 314 316 $output .= walk_page_tree($pages, $r['depth'], $current_page, $r); 315 316 if ( $r['title_li'] ) 317 $output .= '</ul></li>'; 317 $output .= '</ul>'.$r['after']; 318 318 } 319 319 320 320 $output = apply_filters('wp_list_pages', $output);
