[wp-trac] [WordPress Trac] #13239: Filter locate_template template_names variable
WordPress Trac
noreply at wordpress.org
Sat Sep 19 22:53:40 UTC 2020
#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 | Focuses:
-------------------------+-----------------------------
Comment (by tripflex):
So seeing as it has been 10+ years since this ticket was opened, and any
similar tickets are closed and referenced as dupes to this one, what needs
to be done to get something into core for this?
Does something need to be submitted to move this along at all?
Is the concern in adding a filter in the `locate_template` or
`load_template` functions?
Specifically my issue is trying to override a sidebar template file from
my plugin, which yes can be done by filtering on `template_include` but
that means I have to maintain the full template file, and not just the
sidebar template file, which my plugin replaces when the user enables the
setting.
Because of this, my only solution is to force checking a user is using a
child theme, and then manually copy over a file from my plugin into the
user's child theme just to accomplish this (and not have to maintain and
override the main archive template that calls `get_sidebar`)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/13239#comment:124>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list