Index: wp-includes/template.php
===================================================================
--- wp-includes/template.php	(revision 33637)
+++ wp-includes/template.php	(working copy)
@@ -26,7 +26,15 @@
 	if ( empty( $templates ) )
 		$templates = array("{$type}.php");
 
-	$template = locate_template( $templates );
+	/**
+	 * Filter the list of templates that should be passed to locate_template().
+	 *
+	 * The last element in the array should always be the fallback template for this query type.
+	 *
+	 * @param array $templates A list of template candidates, in ascending order of priority.
+	 */
+	$templates = apply_filters( "{$type}_template_hierarchy", $templates );
+	$template  = locate_template( $templates );
 
 	/**
 	 * Filter the path of the queried template by type.
