[wp-trac] [WordPress Trac] #21891: Need ability to filter page templates

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 8 13:13:01 UTC 2012


#21891: Need ability to filter page templates
-------------------------------------+------------------------------
 Reporter:  mrwweb                   |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Template                 |     Version:  3.4.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------

Comment (by mrwweb):

 That's an interesting thought to make it just a removal filter. Are there
 other places in WordPress that do that or would this be more in the
 direction of creating some function like `wp_remove_template( $templates
 );`?

 One other possible use case of this filter (which I haven't confirmed but
 want to play with) would be the ability to "create" templates without
 associated files. I think I can be talked into thinking this is a bad
 idea, but I've always dreamed of the ability to let people use the
 "Template" select interface to trigger changes that only require filters
 or actions done on `page.php`. (I also described this idea
 [http://wordpress.stackexchange.com/questions/51572/create-file-less-page-
 template-in-functions-php here].)

 I'm almost sure that the current patch would be insufficient for this use
 case, but maybe it's worth considering for now or down the road.

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


More information about the wp-trac mailing list