[wp-trac] [WordPress Trac] #18265: Use load_template in template-loader.php
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 27 12:19:36 UTC 2011
#18265: Use load_template in template-loader.php
-------------------------+-----------------------
Reporter: elyobo | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone:
Component: Template | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------
Comment (by elyobo):
nacin, yeah, that makes more sense.
That said, get_header(), get_footer() and get_sidebar() all call
locate_template with $load = true. While these are called from templates,
so may technically not be core, every site must have a template, so every
single site is seeing this behaviour already in their sidebars, headers
and footers... but not in their pages, errors, 404s etc which are loaded
by template-loader.php.
scribu, I'm not sure how extracting the query vars would break backwards
compatibility; if EXTR_SKIP is used it will not stomp on any other
variables and if the globalising approach was used all the expected
globals would be present - either solution should be backwards compatible.
nacin, the bbPress's version sounds like exactly what I was looking for
when I went digging in to find out how to inject my variables into theme
templates :) It seemed like the query_vars approach worked, but then I
discovered it only worked some of the time (as above) and not the rest,
which just seemed inconsistent.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18265#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list