[wp-trac] [WordPress Trac] #58905: Ensure locate_template only loads theme files
WordPress Trac
noreply at wordpress.org
Tue Jul 25 20:45:34 UTC 2023
#58905: Ensure locate_template only loads theme files
-----------------------------+---------------------
Reporter: jorbin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-patch early | Focuses:
-----------------------------+---------------------
Comment (by joemcgill):
Thanks @jorbin. The use of `realpath()` in this diff can have a measurable
negative performance impact. Given that this function has assumed that the
template names were being concatenated directly with the various constants
previously, I wonder if we could use `validate_file()` instead here and
avoid the multiple calls to `realpath()`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58905#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list