Index: wp-includes/post-template.php
===================================================================
--- wp-includes/post-template.php	(revision 25201)
+++ wp-includes/post-template.php	(working copy)
@@ -867,33 +867,32 @@
 }
 
 /**
- * Display or retrieve list of pages with optional home link.
+ * Displays or returns a menu with all pages and an optional home link.
  *
- * The arguments are listed below and part of the arguments are for {@link
- * wp_list_pages()} function. Check that function for more info on those
- * arguments.
+ * Optional $args contents:
  *
- * <ul>
- * <li><strong>sort_column</strong> - How to sort the list of pages. Defaults
- * to 'menu_order, post_title'. Use column for posts table.</li>
- * <li><strong>menu_class</strong> - Class to use for the div ID which contains
- * the page list. Defaults to 'menu'.</li>
- * <li><strong>echo</strong> - Whether to echo list or return it. Defaults to
- * echo.</li>
- * <li><strong>link_before</strong> - Text before show_home argument text.</li>
- * <li><strong>link_after</strong> - Text after show_home argument text.</li>
- * <li><strong>show_home</strong> - If you set this argument, then it will
- * display the link to the home page. The show_home argument really just needs
- * to be set to the value of the text of the link.</li>
- * </ul>
+ * sort_column - How to sort the list of pages. Defaults to 'menu_order, post_title'. See {@link get_pages()} function for arguments.
+ * menu_class - CSS class to use for the div which contains the menu. Defaults to 'menu'.
+ * ul_class - CSS class to use for the ul element which forms the menu. Defaults to blank.
+ * echo - Whether to echo the menu or return it. Defaults to echo.
+ * link_before - Text before the link.
+ * link_after - Text after the link.
+ * show_home - Whether to display a link to the homepage as first menu element. Pass 'true' to use the default link text of 'Home' or pass your own text to use.
  *
  * @since 2.7.0
  *
  * @param array|string $args
- * @return string html menu
+ * @return string HTML content, if not displaying.
  */
 function wp_page_menu( $args = array() ) {
-	$defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
+	$defaults = array(
+		'sort_column' => 'menu_order, post_title',
+		'menu_class'  => 'menu',
+		'ul_class'    => '',
+		'echo'        => true,
+		'link_before' => '',
+		'link_after'  => '',
+	);
 	$args = wp_parse_args( $args, $defaults );
 	$args = apply_filters( 'wp_page_menu_args', $args );
 
@@ -902,35 +901,38 @@
 	$list_args = $args;
 
 	// Show Home in the menu
-	if ( ! empty($args['show_home']) ) {
+	if ( ! empty( $args['show_home'] ) ) {
 		if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] )
-			$text = __('Home');
+			$text = __( 'Home' );
 		else
 			$text = $args['show_home'];
 		$class = '';
-		if ( is_front_page() && !is_paged() )
+		if ( is_front_page() && ! is_paged() )
 			$class = 'class="current_page_item"';
-		$menu .= '<li ' . $class . '><a href="' . home_url( '/' ) . '" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';
+		$menu .= '<li ' . $class . '><a href="' . home_url( '/' ) . '" title="' . esc_attr( $text ) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';
 		// If the front page is a page, add it to the exclude list
-		if (get_option('show_on_front') == 'page') {
-			if ( !empty( $list_args['exclude'] ) ) {
+		if ( 'page' == get_option( 'show_on_front' ) ) {
+			if ( ! empty( $list_args['exclude'] ) ) {
 				$list_args['exclude'] .= ',';
 			} else {
 				$list_args['exclude'] = '';
 			}
-			$list_args['exclude'] .= get_option('page_on_front');
+			$list_args['exclude'] .= get_option( 'page_on_front' );
 		}
 	}
 
 	$list_args['echo'] = false;
 	$list_args['title_li'] = '';
-	$menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages($list_args) );
+	$menu .= str_replace( array( "\r", "\n", "\t" ), '', wp_list_pages( $list_args ) );
 
-	if ( $menu )
-		$menu = '<ul>' . $menu . '</ul>';
+	if ( $menu ) {
+		$ul_class = $args['ul_class'] ? ' class="' . esc_attr( $args['ul_class'] ) . '"' : '';
+		$menu = '<ul'. $ul_class . '>' . $menu . '</ul>';
+	}
 
-	$menu = '<div class="' . esc_attr($args['menu_class']) . '">' . $menu . "</div>\n";
+	$menu = '<div class="' . esc_attr( $args['menu_class'] ) . '">' . $menu . "</div>\n";
 	$menu = apply_filters( 'wp_page_menu', $menu, $args );
+
 	if ( $args['echo'] )
 		echo $menu;
 	else
Index: wp-includes/nav-menu-template.php
===================================================================
--- wp-includes/nav-menu-template.php	(revision 25201)
+++ wp-includes/nav-menu-template.php	(working copy)
@@ -186,9 +186,13 @@
 	 *  - Otherwise, bail.
 	 */
 	if ( ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) && !$args->theme_location ) )
-		&& $args->fallback_cb && is_callable( $args->fallback_cb ) )
-			return call_user_func( $args->fallback_cb, (array) $args );
+		&& $args->fallback_cb && is_callable( $args->fallback_cb ) ) {
+                if ( $args->menu_class )
+                        $args->ul_class = $args->menu_class;
 
+                        return call_user_func( $args->fallback_cb, (array) $args );
+		}
+
 	if ( ! $menu || is_wp_error( $menu ) )
 		return false;
 
