[wp-trac] [WordPress Trac] #33859: Custom variables in get_template_part
WordPress Trac
noreply at wordpress.org
Mon Sep 14 11:49:59 UTC 2015
#33859: Custom variables in get_template_part
------------------------------+------------------------------
Reporter: sebastian.pisula | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 4.3
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by nofearinc):
I like the idea of being able to make template parts more dynamic without
introducing global variables or perform numerous checks (including
database calls in the "views").
However I don't think that `extract` is a good idea though since it
pollutes the current symbol table and could lead to various issues. It has
been gradually removed from Core in #22400. Probably working with the
$params array directly would do just fine.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33859#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list