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

WordPress Trac noreply at wordpress.org
Mon Mar 10 01:20:29 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:
--------------------------+-----------------------------

Comment (by rmccue):

 Replying to [comment:73 MikeSchinkel]:
 > Or, maybe it's time to **consider adding more robust template parts
 hierarchy** to address complex use-cases?

 IMO, more complex cases like this are best handled by the theme itself.
 There's nothing stopping you adding a `mytheme_get_template_part` that
 handles any sort of use cases you need, backed by `locate_template` in the
 same way that the normal `get_template_part` is. Introducing more
 complicated part hierarchy into core removes the flexibility of doing it
 yourself.

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


More information about the wp-trac mailing list