[wp-trac] [WordPress Trac] #12491: add a pre_template_include filter, so as to allow caching of the template file

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 3 03:42:16 UTC 2010


#12491: add a pre_template_include filter, so as to allow caching of the template
file
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:           
     Type:  enhancement        |      Status:  new      
 Priority:  normal             |   Milestone:  3.0      
Component:  Optimization       |     Version:  3.0      
 Severity:  normal             |    Keywords:  has-patch
-------------------------------+--------------------------------------------

Comment(by Denis-de-Bernardy):

 re 404, the point would be to write a plugin that looks up the available
 template files, caches that accordingly, and knows, based on what the WP
 Query tells it, what file to use without needing to do a file_exists()
 call.

 template_redirect works fine too for this, up to a point:

  - it would mean the plugin needs to handle robots, feeds, etc. it would
 also mean the plugin would need to manage whatever we add in there in the
 future.
  - it would re-introduce the inflexibility that led us to introduce the
 2nd hook in the first place, i.e. the plugin itself would not be plugin-
 able.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12491#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list