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

WordPress Trac noreply at wordpress.org
Sun Mar 21 18:46:02 UTC 2021


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

 * keywords:  has-patch => has-patch dev-feedback


Comment:

 Can anybody provide any insight or help into this at all?  What do we need
 to do to get *something* into core that would allow us to manage this.
 Even if it's just adding an action AFTER loaded so developers can use
 buffering to hack together something to deal with this.

 Right now there is zero way to do this without having to manage the ENTIRE
 template through `template_include` as mentioned above, which is kind of
 crazy when it comes to WordPress

 @johnbillion closed #47563 as duplicate, even though that one is
 `get_template_part` whereas this one is `locate_template` (which yes ends
 up calling `locate_template`) ... but in the end, this has been open for
 over 10+ years and is the "crutch" for closing other tickets, but this one
 has clearly died :(

 Can someone from core dev team provide some kind of guidance, this is
 something so simple but seems it's been made out to be much more
 complicated than necessary.

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


More information about the wp-trac mailing list