diff --git a/wp-includes/classes.php b/wp-includes/classes.php index a55123ae53..47593959ff 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -1168,7 +1168,7 @@ class Walker_Page extends Walker { $css_class .= ' current_page_parent'; } - $output .= $indent . '
  • ' . apply_filters('the_title', $page->post_title) . ''; + $output .= $indent . '
  • ' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . ''; if ( !empty($show_date) ) { if ( 'modified' == $show_date ) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index c7d612bd12..6d23e7e3cb 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -595,7 +595,8 @@ function wp_list_pages($args = '') { 'date_format' => get_option('date_format'), 'child_of' => 0, 'exclude' => '', 'title_li' => __('Pages'), 'echo' => 1, - 'authors' => '', 'sort_column' => 'menu_order, post_title' + 'authors' => '', 'sort_column' => 'menu_order, post_title', + 'link_before' => '', 'link_after' => '' ); $r = wp_parse_args( $args, $defaults ); @@ -643,7 +644,7 @@ function wp_list_pages($args = '') { * @param array|string $args */ function wp_page_menu( $args = array() ) { - $defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true); + $defaults = array('sort_column' => 'post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => ''); $args = wp_parse_args( $args, $defaults ); $args = apply_filters( 'wp_page_menu_args', $args ); @@ -658,7 +659,7 @@ function wp_page_menu( $args = array() ) { $class = ''; if ( is_home() && !is_paged() ) $class = 'class="current_page_item"'; - $menu .= '
  • ' . $text . '
  • '; + $menu .= '
  • ' . $link_before . $text . $link_after . '
  • '; } $list_args = $args;