mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
wp_page_menu() echo fixes. see #7914
git-svn-id: http://svn.automattic.com/wordpress/trunk@9246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6baaa2300d
commit
a4f5971898
@ -664,16 +664,19 @@ function wp_page_menu( $args = array() ) {
|
||||
$class = '';
|
||||
if ( is_home() && !is_paged() )
|
||||
$class = 'class="current_page_item"';
|
||||
$menu = '<li ' . $class . '><a href="' . get_option('home') . '">' . $text . '</a></li>';
|
||||
$menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $text . '</a></li>';
|
||||
}
|
||||
|
||||
$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 = '<ul>' . $menu . '</ul>';
|
||||
|
||||
$menu = '<div id="' . $args['menu_class'] . '">' . $menu . "</div>\n";
|
||||
$menu = apply_filters( 'wp_page_menu', $menu );
|
||||
$menu = apply_filters( 'wp_page_menu', $menu, $args );
|
||||
if ( $args['echo'] )
|
||||
echo $menu;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user