[wp-trac] [WordPress Trac] #21676: Pass a variable to get_template_part()
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 14 21:09:42 UTC 2012
#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 |
-------------------------------------------------+-------------------------
Changes (by sc0ttkclark):
* keywords: has-patch needs-testing => has-patch needs-testing dev-
feedback 2nd-opinion
Comment:
I went ahead and refreshed the patch with extract / array usage as
discussed with @scribu
I think we should have another dev hop in on this conversation, it seems
like including a file with get_template_part or load_template and having
the ability to scope variables in, is something that people work around
with ''dirty'' global variables.
It would seem like this would improve usage of core theming functions like
these as opposed to include/require.
Even with @wonderboymusic's idea, that could work as a work-around, but
then everyone has to add that function and it'll be another thing every
themer bakes differently.
The inclusion of this patch seems rudimentary, it holds great value, and
I'd like to open this discussion up to any core developer or theme
developer who may have other points to make.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21676#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list