Index: wp-includes/template.php
--- wp-includes/template.php
+++ wp-includes/template.php
@@ -365,15 +365,23 @@
  */
 function locate_template($template_names, $load = false, $require_once = true ) {
 	$located = '';
-	foreach ( (array) $template_names as $template_name ) {
-		if ( !$template_name )
+
+	foreach ( (array) get_template_stack() as $template_location ) {
+
+		// Continue if $template_location is empty
+		if ( empty( $template_location ) )
 			continue;
-		if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
-			$located = STYLESHEETPATH . '/' . $template_name;
-			break;
-		} else if ( file_exists(TEMPLATEPATH . '/' . $template_name) ) {
-			$located = TEMPLATEPATH . '/' . $template_name;
-			break;
+
+		foreach ( (array) $template_names as $template_name ) {
+
+			// Continue if $template_name is empty
+			if ( empty( $template_name ) )
+				continue;
+
+			if ( file_exists( trailingslashit( $template_location ) . $template_name ) ) {
+				$located = trailingslashit( $template_location ) . $template_name;
+				break;
+			}
 		}
 	}
 
@@ -407,3 +415,80 @@
 		require( $_template_file );
 }
 
+
+/**
+ * This function registers a new template stack location, using WordPress's
+ * built-in filters API.
+ *
+ * This allows for templates to live in places beyond just the parent/child
+ * relationship, to allow for custom template locations. Used in conjunction
+ * with locate_template(), this allows for easy template overrides.
+ *
+ * @package WordPress
+ * @since 3.6
+ *
+ * @param string $location Callback function that returns the 
+ * @param int $priority
+ */
+function register_template_stack( $location_callback = '', $priority = 10 ) {
+
+	// Bail if no location, or function does not exist
+	if ( empty( $location_callback ) || ! function_exists( $location_callback ) )
+		return false;
+
+	// Add location callback to template stack
+	add_filter( 'template_stack', $location_callback, (int) $priority );
+}
+
+/**
+ * Call the functions added to the 'template_stack' filter hook, and return
+ * an array of the template locations.
+ *
+ * @see register_template_stack()
+ *
+ * @package WordPress
+ * @since 3.6
+ *
+ * @global array $wp_filter Stores all of the filters
+ * @global array $merged_filters Merges the filter hooks using this function.
+ * @global array $wp_current_filter stores the list of current filters with the current one last
+ *
+ * @return array The filtered value after all hooked functions are applied to it.
+ */
+function get_template_stack() {
+	global $wp_filter, $merged_filters, $wp_current_filter;
+
+	// Setup some default variables
+	$tag  = 'template_stack';
+	$args = $stack = array();
+
+	// Add 'template_stack' to the current filter array
+	$wp_current_filter[] = $tag;
+
+	// Sort
+	if ( ! isset( $merged_filters[ $tag ] ) ) {
+		ksort( $wp_filter[$tag] );
+		$merged_filters[ $tag ] = true;
+	}
+
+	// Ensure we're always at the beginning of the filter array
+	reset( $wp_filter[ $tag ] );
+
+	// Loop through 'template_stack' filters, and call callback functions
+	while ( next( $wp_filter[$tag] ) !== false ) {
+		foreach( (array) current( $wp_filter[$tag] ) as $the_ ) {
+			if ( ! is_null( $the_['function'] ) ) {
+				$args[1] = $stack;
+				$stack[] = call_user_func_array( $the_['function'], array_slice( $args, 1, (int) $the_['accepted_args'] ) );
+			}
+		}
+	};
+
+	// Remove 'template_stack' from the current filter array
+	array_pop( $wp_current_filter );
+
+	// Remove empties and duplicates
+	$stack = array_unique( array_filter( $stack ) );
+
+	return (array) apply_filters( 'get_template_stack', $stack ) ;
+}
Index: wp-settings.php
--- wp-settings.php
+++ wp-settings.php
@@ -268,6 +268,10 @@
 // Define the template related constants.
 wp_templating_constants(  );
 
+// Register the parent/child template stack
+register_template_stack( 'get_stylesheet_directory', 10 );
+register_template_stack( 'get_template_directory',   12 );
+
 // Load the default text localization domain.
 load_default_textdomain();
 
