diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 99deacc22b..a16f123074 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1264,10 +1264,21 @@ function wp_page_menu( $args = array() ) { $list_args['title_li'] = ''; $menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) ); + $container = sanitize_text_field( $args['container'] ); + if ( $menu ) { + + // wp_nav_menu doesn't set before and after + if ( isset( $args['fallback_cb'] ) && + 'wp_page_menu' === $args['fallback_cb'] && + 'ul' !== $container ) { + $args['before'] = ''; + } + $menu = $args['before'] . $menu . $args['after']; } - $container = sanitize_text_field( $args['container'] ); + $attrs = ''; if ( ! empty( $args['menu_id'] ) ) { $attrs .= ' id="' . esc_attr( $args['menu_id'] ) . '"'; diff --git a/wp-includes/version.php b/wp-includes/version.php index 03cb22b229..34ef74f672 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34652'; +$wp_version = '4.4-alpha-34653'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.