Index: wp-includes/nav-menu-template.php
===================================================================
--- wp-includes/nav-menu-template.php	(revision 16880)
+++ wp-includes/nav-menu-template.php	(working copy)
@@ -358,6 +358,29 @@
 			$active_parent_object_ids[] = (int) $menu_item->post_parent;
 			$active_object = $menu_item->object;
 
+		// Allow plugin to force selection
+		} elseif ( apply_filters( 'nav_menu_selected', false, $menu_item ) ) {
+			$classes[] = 'current-menu-item';
+			$menu_items[$key]->current = true;
+			$_anc_id = (int) $menu_item->db_id;
+
+			while(
+				( $_anc_id = get_post_meta( $_anc_id, '_menu_item_menu_item_parent', true ) ) &&
+				! in_array( $_anc_id, $active_ancestor_item_ids )
+			) {
+				$active_ancestor_item_ids[] = $_anc_id;
+			}
+
+			if ( in_array( home_url(), array( untrailingslashit( $current_url ), untrailingslashit( $_indexless_current ) ) ) ) {
+				// Back compat for home link to match wp_page_menu()
+				$classes[] = 'current_page_item';
+			}
+			$active_parent_item_ids[] = (int) $menu_item->menu_item_parent;
+			$active_parent_object_ids[] = (int) $menu_item->post_parent;
+			$active_object = $menu_item->object;
+
+			if ( untrailingslashit($item_url) == home_url() )
+				$classes[] = 'menu-item-home';
 		// if the menu item corresponds to the currently-requested URL
 		} elseif ( 'custom' == $menu_item->object ) {
 			$current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
