[wp-trac] [WordPress Trac] #58576: locate_template does not check to see site has parent theme.
WordPress Trac
noreply at wordpress.org
Thu Jul 20 08:55:30 UTC 2023
#58576: locate_template does not check to see site has parent theme.
--------------------------------------+--------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses: performance
--------------------------------------+--------------------------
Comment (by thekt12):
Patch is tested and it works as expected. However, due to use of
`STYLESHEETPATH` and `TEMPLATEPATH` in `locate_template` we are unable
write testcase around here.
`STYLESHEETPATH` and `TEMPLATEPATH` are set to default theme path well
before `setup()` function in a test file.
We generally use `switch_theme()` inside a testcase to switch to a parent
or child test themes.
Unfortunately, this doesn't effect the constants and so `locate_template`
gives out the initial default value irrespective of active theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58576#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list