Index: post.php
===================================================================
--- post.php	(revision 27026)
+++ 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,20 @@
 	$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 );
+	}
+	$post_types[] = '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;
