[wp-trac] [WordPress Trac] #13239: Filter locate_template template_names variable

WordPress Trac noreply at wordpress.org
Sun Mar 9 18:14:43 UTC 2014


#13239: Filter locate_template template_names variable
--------------------------+-----------------------------
 Reporter:  chrisbliss18  |       Owner:
     Type:  enhancement   |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Themes        |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by nacin):

 * milestone:  3.9 => Future Release


Comment:

 I still have mixed feelings about this filter. As I mentioned in IRC, the
 a root question is whether the template hierarchy should be something you
 can butcher.

 As I've also argued previously (elsewhere, apparently), a huge benefit of
 the template hierarchy in WordPress is that it's predictable. You can open
 up any theme and understand how it works. It's one of the most important
 and easy-to-understand concepts in WordPress.

 That said, rmccue has been kicking around an alternative idea that would
 allow one to filter the directories in which a file is searched. See
 #27322 . Now that's interesting, because it simply adds a layer on top of
 the parent/child relationship, versus munging the well-established
 template hierarchies. Between that and the template_include filter, and
 the existing other filters (such as in get_query_template()), should be a
 significant amount of power.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/13239#comment:71>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list