WordPress.org

Make WordPress Core

Changeset 9246


Ignore:
Timestamp:
10/18/2008 09:15:20 PM (10 years ago)
Author:
ryan
Message:

wp_page_menu() echo fixes. see #7914

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r9245 r9246  
    665665        if ( is_home() && !is_paged() )
    666666            $class = 'class="current_page_item"';
    667         $menu = '<li ' . $class . '><a href="' . get_option('home') . '">' . $text . '</a></li>';
    668     }
    669 
    670     $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($args) );
     667        $menu .= '<li ' . $class . '><a href="' . get_option('home') . '">' . $text . '</a></li>';
     668    }
     669
     670    $list_args = $args;
     671    $list_args['echo'] = false;
     672    $list_args['title_li'] = '';
     673    $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) );
    671674
    672675    if ( $menu )
     
    674677
    675678    $menu = '<div id="' . $args['menu_class'] . '">' . $menu . "</div>\n";
    676     $menu = apply_filters( 'wp_page_menu', $menu );
     679    $menu = apply_filters( 'wp_page_menu', $menu, $args );
    677680    if ( $args['echo'] )
    678681        echo $menu;
Note: See TracChangeset for help on using the changeset viewer.