Index: src/wp-includes/nav-menu.php
===================================================================
--- src/wp-includes/nav-menu.php	(revision 31321)
+++ src/wp-includes/nav-menu.php	(working copy)
@@ -780,24 +780,36 @@
  * @since 3.0.0
  *
  * @param int $object_id The ID of the original object.
- * @param string $object_type The type of object, such as "taxonomy" or "post_type."
- * @param string $taxonomy If $object_type is "taxonomy", $taxonomy is the name of the tax that $object_id belongs to
- * @return array The array of menu item IDs; empty array if none;
+ * @param string $object_type The type of object, such as "taxonomy" or "post_type".
+ * @param string $taxonomy If $object_type is "taxonomy", $taxonomy is the name of the tax that $object_id belongs to.
+ * @param int $menu_id The ID of the menu to search into. "0" will search in all menus.
+ * @return array The array of menu item IDs; empty array if none.
  */
-function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_type', $taxonomy = '' ) {
+function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_type', $taxonomy = '', $menu_id = 0 ) {
 	$object_id = (int) $object_id;
 	$menu_item_ids = array();
 
+	$query_args = array(
+		'meta_key' => '_menu_item_object_id',
+		'meta_value' => $object_id,
+		'post_status' => 'any',
+		'post_type' => 'nav_menu_item',
+		'posts_per_page' => -1,
+	);
+
+	if ( $menu_id ) {
+		$term = get_term( $menu_id, 'nav_menu' );
+		if ( !$term || is_wp_error($term) ) {
+			return new WP_Error( 'invalid_menu_id', __( 'Invalid menu ID.' ) );
+		}
+
+		$query_args['taxonomy'] = 'nav_menu';
+		$query_args['term'] = $term->slug;
+	}
+
 	$query = new WP_Query;
-	$menu_items = $query->query(
-		array(
-			'meta_key' => '_menu_item_object_id',
-			'meta_value' => $object_id,
-			'post_status' => 'any',
-			'post_type' => 'nav_menu_item',
-			'posts_per_page' => -1,
-		)
-	);
+	$menu_items = $query->query($query_args);
+
 	foreach( (array) $menu_items as $menu_item ) {
 		if ( isset( $menu_item->ID ) && is_nav_menu_item( $menu_item->ID ) ) {
 			$menu_item_type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
Index: tests/phpunit/tests/post/nav-menu.php
===================================================================
--- tests/phpunit/tests/post/nav-menu.php	(revision 31268)
+++ tests/phpunit/tests/post/nav-menu.php	(working copy)
@@ -90,6 +90,55 @@
 	}
 
 	/**
+	 * @ticket 14439
+	 */
+	function test_wp_get_associated_nav_menu_items_menu_id() {
+
+		// Create the second menu
+		$menu_id_2 = wp_create_nav_menu( rand_str() );
+
+		// Create our post object
+		$post_id = $this->factory->post->create();
+
+		// Insert the menu item into the first menu
+		$post_insert_1 = wp_update_nav_menu_item( $this->menu_id, 0, array(
+			'menu-item-type' => 'post_type',
+			'menu-item-object' => 'post',
+			'menu-item-object-id' => $post_id,
+			'menu-item-status' => 'publish'
+		) );
+
+		// Insert the menu item into the second menu
+		$post_insert_2 = wp_update_nav_menu_item( $menu_id_2, 0, array(
+			'menu-item-type' => 'post_type',
+			'menu-item-object' => 'post',
+			'menu-item-object-id' => $post_id,
+			'menu-item-status' => 'publish'
+		) );
+
+		$post_items = wp_get_associated_nav_menu_items( $post_id, 'post_type', '', $menu_id_2);
+		$this->assertEqualSets( array( $post_insert_2 ), $post_items );
+	}
+
+	/**
+	 * @ticket 14439
+	 */
+	function test_wp_get_associated_nav_menu_items_wrong_menu_id() {
+
+		$post_id = $this->factory->post->create();
+
+		$post_insert = wp_update_nav_menu_item( $this->menu_id, 0, array(
+			'menu-item-type' => 'post_type',
+			'menu-item-object' => 'post',
+			'menu-item-object-id' => $post_id,
+			'menu-item-status' => 'publish'
+		) );
+
+		$post_items = wp_get_associated_nav_menu_items( $post_id, 'post_type', '', 12345678);
+		$this->assertInstanceOf( 'WP_Error', $post_items ); 
+	}
+
+	/**
 	 * @ticket 27113
 	 */
 	function test_orphan_nav_menu_item() {
