Ticket #15811: patch
| File patch, 1.8 KB (added by lewebmobile, 2 years ago) |
|---|
-
wp-includes/post-template.php
805 805 'title_li' => __('Pages'), 'echo' => 1, 806 806 'authors' => '', 'sort_column' => 'menu_order, post_title', 807 807 'link_before' => '', 'link_after' => '', 'walker' => '', 808 'self_link' => 1 808 809 ); 809 810 810 811 $r = wp_parse_args( $args, $defaults ); … … 871 872 * @param array|string $args 872 873 */ 873 874 function wp_page_menu( $args = array() ) { 874 $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '' );875 $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '', 'self_link' => 1); 875 876 $args = wp_parse_args( $args, $defaults ); 876 877 $args = apply_filters( 'wp_page_menu_args', $args ); 877 878 … … 1033 1034 1034 1035 $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page)); 1035 1036 1036 $output .= $indent . '<li class="' . $css_class . '"> <a href="' . get_permalink($page->ID) . '" title="' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page->post_title, $page->ID ) ) ) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>';1037 $output .= $indent . '<li class="' . $css_class . '">' . ( $page->ID != $current_page || $self_link ? '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr( wp_strip_all_tags( apply_filters( 'the_title', $page->post_title, $page->ID ) ) ) . '">' : '' ). $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . ( $page->ID != $current_page || $self_link ? '</a>' : '' ); 1037 1038 1038 1039 if ( !empty($show_date) ) { 1039 1040 if ( 'modified' == $show_date )
