[wp-trac] [WordPress Trac] #16128: WordPress Template System Override
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 6 22:16:43 UTC 2011
#16128: WordPress Template System Override
-----------------------------------------+-----------------------------
Reporter: pearsonified | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: Themes | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion close |
-----------------------------------------+-----------------------------
Comment (by pearsonified):
Replying to [comment:9 duck_]:
> Replying to [comment:8 pearsonified]:
> > Nacin, the problem with not changing anything is that you cannot
prevent the rest of the template-loader.php file from running, as Nathan
mentioned in his response to duck_ above.
> >
> > Any thoughts on that end of things?
>
> "include a template and die"
>
> untested:
> {{{
> add_action( 'template_redirect', 'this_is_a_silly_example' );
> function this_is_a_silly_example() {
> if ( is_single() ) {
> include( TEMPLATEPATH . '/path/to/my/template.php' );
> exit;
> }
> }
> }}}
IMO, exits and breaks (except when used in switch statements) are not
elegant, and generally speaking, you can find ways to write workable code
without the need to force anything in this manner.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16128#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list