[wp-trac] [WordPress Trac] #18265: Use load_template in template-loader.php
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 27 12:42:07 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):
Ah, my wordpress ignorance showing through :) Should have looked up
wp_array_slice_assoc.
Anyhow, I have to sleep. Thanks for the discussion folks. I guess we'll
have to wait for an elegant solution to the problem to turn up. Would
there be any interest in me opening a feature request to make it possible
to do what I want (injecting variables into templates)?
In the meantime, I think I'll just add something like the following line
at the top of my templates and use this to inject the data I want into
each template; it requires me to modify each template, but it prevents the
front end guys from having to learn stuff about the internals of how the
data is generated, so it's most of the way there.
<?php extract(apply_filters('template_data', array()), EXTR_SKIP); ?>
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18265#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list