[wp-trac] [WordPress Trac] #21676: Pass a variable to get_template_part()
WordPress Trac
noreply at wordpress.org
Thu Jan 24 19:26:02 UTC 2013
#21676: Pass a variable to get_template_part()
-------------------------------------------------+-------------------------
Reporter: sc0ttkclark | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future
Component: Template | Release
Severity: normal | Version: 3.4.1
Keywords: has-patch needs-testing dev- | Resolution:
feedback 2nd-opinion |
-------------------------------------------------+-------------------------
Comment (by sc0ttkclark):
Just attached a new patch which proposes a slightly different and more
future-proof approach. It uses an $args array, to provide the ability to
add additional features later on down the road, instead of merely adding
another $var to the parameters list.
As part of the new $args array, if you set $args[ 'data' ] to an array of
'key' => 'value', then it will extract() that (like the previous patches).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21676#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list