Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 27026)
+++ wp-includes/post.php	(working copy)
@@ -3513,7 +3513,7 @@
  *
  * @param string $page_path Page path
  * @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. Default OBJECT.
- * @param string $post_type Optional. Post type. Default page.
+ * @param string|Array $post_type Optional. Post type or array of post types. Default page.
  * @return WP_Post|null WP_Post on success or null on failure
  */
 function get_page_by_path($page_path, $output = OBJECT, $post_type = 'page') {
@@ -3527,9 +3527,19 @@
 	$parts = array_map( 'sanitize_title_for_query', $parts );
 
 	$in_string = "'". implode( "','", $parts ) . "'";
-	$post_type_sql = esc_sql( $post_type );
-	$pages = $wpdb->get_results( "SELECT ID, post_name, post_parent, post_type FROM $wpdb->posts WHERE post_name IN ($in_string) AND (post_type = '$post_type_sql' OR post_type = 'attachment')", OBJECT_K );
 
+	if ( is_array( $post_type ) ) {
+		$post_types = $post_type;
+	}
+	else {
+		$post_types = array( $post_type, 'attachment' );
+	}
+	$post_types = esc_sql( $post_types );
+
+	$post_type_in_string = "'" . implode( "','", $post_types ) . "'";
+
+	$pages = $wpdb->get_results( $sql = "SELECT ID, post_name, post_parent, post_type FROM $wpdb->posts WHERE post_name IN ($in_string) AND post_type IN ($post_type_in_string)", OBJECT_K );
+
 	$revparts = array_reverse( $parts );
 
 	$foundid = 0;
@@ -3567,16 +3577,29 @@
  *
  * @param string $page_title Page title
  * @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A. Default OBJECT.
- * @param string $post_type Optional. Post type. Default page.
+ * @param string|Array $post_type Optional. Post type or array of post types. Default page.
  * @return WP_Post|null WP_Post on success or null on failure
  */
 function get_page_by_title($page_title, $output = OBJECT, $post_type = 'page' ) {
 	global $wpdb;
-	$page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type ) );
-	if ( $page )
-		return get_post( $page, $output );
 
-	return null;
+	if ( is_array( $post_type ) ) {
+		$post_type = esc_sql( $post_type );
+		$post_type_in_string = "'" . implode( "','", $post_type ) . "'";
+
+		$sql = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type IN ($post_type_in_string)", $page_title );
+	}
+	else {
+		$sql = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type );
+	}
+
+	$page = $wpdb->get_var( $sql );
+
+	if ( ! $page ) {
+		return null;
+	}
+
+	return get_post( $page, $output );
 }
 
 /**
