From ba1915af0f495b6a2cda8c59bdd27708abc4d1c8 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 18 Oct 2008 21:15:20 +0000 Subject: [PATCH] wp_page_menu() echo fixes. see #7914 git-svn-id: https://develop.svn.wordpress.org/trunk@9246 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post-template.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index d99ba2aa92..9028b10fa5 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -664,16 +664,19 @@ function wp_page_menu( $args = array() ) { $class = ''; if ( is_home() && !is_paged() ) $class = 'class="current_page_item"'; - $menu = '
  • ' . $text . '
  • '; + $menu .= '
  • ' . $text . '
  • '; } - $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($args) ); + $list_args = $args; + $list_args['echo'] = false; + $list_args['title_li'] = ''; + $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) ); if ( $menu ) $menu = ''; $menu = '
    ' . $menu . "
    \n"; - $menu = apply_filters( 'wp_page_menu', $menu ); + $menu = apply_filters( 'wp_page_menu', $menu, $args ); if ( $args['echo'] ) echo $menu; else