Index: wp-includes/template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/template.php	(revision 23342)
+++ wp-includes/template.php	(revision )
@@ -363,9 +363,10 @@
  * @param string|array $template_names Template file(s) to search for, in order.
  * @param bool $load If true the template file will be loaded if it is found.
  * @param bool $require_once Whether to require_once or require. Default true. Has no effect if $load is false.
+ * @param array $args An array of arguments to control template handling.
  * @return string The template filename if one is located.
  */
-function locate_template($template_names, $load = false, $require_once = true ) {
+function locate_template($template_names, $load = false, $require_once = true, $args = array() ) {
 	$located = '';
 	foreach ( (array) $template_names as $template_name ) {
 		if ( !$template_name )
@@ -380,7 +381,7 @@
 	}
 
 	if ( $load && '' != $located )
-		load_template( $located, $require_once );
+		load_template( $located, $require_once, $args );
 
 	return $located;
 }
@@ -396,9 +397,13 @@
  *
  * @param string $_template_file Path to template file.
  * @param bool $require_once Whether to require_once or require. Default true.
+ * @param array $args An array of arguments to control template handling.
  */
-function load_template( $_template_file, $require_once = true ) {
+function load_template( $_template_file, $require_once = true, $args = array() ) {
 	global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
+
+	if ( is_array( $args ) && isset( $args[ 'data' ] ) && is_array( $args[ 'data' ] ) )
+		extract( $args[ 'data' ], EXTR_SKIP );
 
 	if ( is_array( $wp_query->query_vars ) )
 		extract( $wp_query->query_vars, EXTR_SKIP );
Index: wp-includes/general-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/general-template.php	(revision 23342)
+++ wp-includes/general-template.php	(revision )
@@ -115,9 +115,10 @@
  *
  * @param string $slug The slug name for the generic template.
  * @param string $name The name of the specialised template.
+ * @param array $args An array of arguments to control template handling.
  */
-function get_template_part( $slug, $name = null ) {
-	do_action( "get_template_part_{$slug}", $slug, $name );
+function get_template_part( $slug, $name = null, $args = array() ) {
+	do_action( "get_template_part_{$slug}", $slug, $name, $args );
 
 	$templates = array();
 	if ( isset($name) )
@@ -125,7 +126,7 @@
 
 	$templates[] = "{$slug}.php";
 
-	locate_template($templates, true, false);
+	locate_template($templates, true, false, $args);
 }
 
 /**
