Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 21078)
+++ wp-includes/link-template.php	(working copy)
@@ -2059,6 +2059,36 @@
 }
 
 /**
+ * Retrieve the url of the highest priority template file that exists.
+ *
+ * Searches in the stylesheet directory before the template directory so themes
+ * which inherit from a parent theme can just overload one file.
+ *
+ * @since 3.5
+ *
+ * @param string|array $template_names Template file(s) to search for, in order.
+ * @return string The URI of the file if one is located.
+ */
+function theme_url( $template_names ) {
+	$located = null;
+
+	foreach ( (array) $template_names as $template_name ) {
+		$template_name = ltrim( $template_name, '/' );
+		if ( ! $template_name )
+			continue;
+		if ( file_exists( get_stylesheet_directory() . '/' . $template_name ) ) {
+			$located = get_stylesheet_directory_uri() . '/' . $template_name;
+			break;
+		} elseif ( file_exists( get_template_directory() . '/' . $template_name ) ) {
+			$located = get_template_directory_uri() . '/' . $template_name;
+			break;
+		}
+	}
+
+	return $located;
+}
+
+/**
  * Retrieve the site url for the current network.
  *
  * Returns the site url with the appropriate protocol, 'https' if
