Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 21271)
+++ wp-includes/link-template.php	(working copy)
@@ -2061,6 +2061,31 @@
 }
 
 /**
+ * Retrieve the url of the template file.
+ *
+ * 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 $template_names Template file to search for.
+ * @return string The URI of the file if one is located.
+ */
+function theme_url( $file ) {
+	$file = ltrim( $file, '/' );
+
+	if ( empty( $file ) || ( false !== strpos( $file, '..' ) ) ) {
+		$url = get_stylesheet_directory_uri();
+	} elseif ( is_child_theme() && file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
+		$url = trailingslashit( get_stylesheet_directory_uri() ) . $file;
+	} else {
+		$url = trailingslashit( get_template_directory_uri() ) . $file;
+	}
+
+	return apply_filters( 'theme_url', $url, $file );
+}
+
+/**
  * Retrieve the site url for the current network.
  *
  * Returns the site url with the appropriate protocol, 'https' if
