[wp-trac] [WordPress Trac] #18265: Use load_template in template-loader.php
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 27 22:59:05 UTC 2011
#18265: Use load_template in template-loader.php
-------------------------+----------------------
Reporter: elyobo | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Template | Version:
Severity: normal | Resolution: wontfix
Keywords: has-patch |
-------------------------+----------------------
Comment (by elyobo):
Globalising variables would work, and is effectively doing the same as
what extracting the query vars in the template loader would have done, but
nacin is right that we don't need need even more globals floating around.
I feel pain every time I'm forced to use an exit or die statement; it
makes unit testing a pain and feels like a hack. That said, it looks like
simply returning a value that evaluates to false will stop the original
load from happening, without having to resort to a die statement, so it
seems like a workable approach; all that needs to be done is to remove the
die statement from scribu's suggestion.
Thanks for the help.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18265#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list