Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 22005)
+++ wp-includes/link-template.php	(working copy)
@@ -2429,3 +2429,48 @@
 		echo $before, $link, $after;
 	}
 }
+
+/**
+ * Retrieve the url of a file in the theme.
+ *
+ * Searches in the stylesheet directory before the template directory so themes
+ * which inherit from a parent theme can just override one file.
+ *
+ * @since 3.5.0
+ *
+ * @param string $file File to search for in the stylesheet directory.
+ * @return string The URL of the file.
+ */
+function theme_url( $file = '' ) {
+	$file = ltrim( $file, '/' );
+
+	if ( empty( $file ) ) {
+		$url = get_stylesheet_directory_uri();
+	} elseif( is_child_theme() && file_exists( get_stylesheet_directory() . "/$file" ) {
+		$url = get_stylesheet_directory_uri() . "/$file";
+	} else {
+		$url = get_template_directory_uri() . "/$file";
+	}
+
+	return apply_filters( 'theme_url', $url, $file );
+}
+
+/**
+ * Retrieve the url of a file in the parent theme.
+ *
+ * @since 3.5.0
+ *
+ * @param string $file File to return the url for in the template directory.
+ * @return string The URL of the file.
+ */
+function parent_theme_url( $file = '' ) {
+	$file = ltrim( $file, '/' );
+
+	if ( empty( $file ) ) {
+		$url = get_template_directory_uri();
+	} else {
+		$url = get_template_directory_uri() . "/$file";
+	}
+
+	return apply_filters( 'parent_theme_url', $url, $file );
+}
