﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
21676	Pass a variable to get_template_part()	sc0ttkclark		"Having the ability to pass a variable into get_template_part would be invaluable, it would really clean up the issues with using globals and to further cement it's use rather than the alternative of a normal PHP include/require.

It would be the third variable passed into get_template_part, which I could pass it a string, array, object, or whatever I want really. Here's an example of passing all the current scope's variables:

{{{
<?php get_template_part( 'twitter', 'feed', compact( array_keys( get_defined_vars() ) ) ); ?>
}}}

and then catching them in my feed-twitter.php file:

{{{
if ( !empty( $_data ) && is_array( $_data ) )
	extract( $_data, EXTR_SKIP );
}}}

I can pass other things in, but that's a really valuable example in my uses for this new variable."	enhancement	new	normal	Awaiting Review	Template	3.4.1	normal		has-patch close	knut@… xoodrew@… geertdd@… contact@… giulio.mainardi@… johnzanussi ian_dunn@… lol@…
