[wp-trac] [WordPress Trac] #59279: Unnecessarily check to see site is using a child theme in the theme functions.
WordPress Trac
noreply at wordpress.org
Mon Sep 4 14:50:38 UTC 2023
#59279: Unnecessarily check to see site is using a child theme in the theme
functions.
--------------------------+--------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4
Component: Themes | Version: 4.7
Severity: normal | Keywords:
Focuses: performance |
--------------------------+--------------------
Follow on from #58576 / [56357].
There are a number of functions methods that check to see if file exists
in a child theme before falling back to parent theme. However these
functions do not check to see if current theme. These functions include.
-
[https://developer.wordpress.org/reference/classes/wp_theme/get_file_path/
WP_Theme::get_file_path]
-
[https://developer.wordpress.org/reference/functions/get_theme_file_path/
get_theme_file_path]
- [https://developer.wordpress.org/reference/functions/get_theme_file_uri/
get_theme_file_uri]
The function `is_child_theme` can not be used, as `TEMPLATEPATH` and
`STYLESHEETPATH`, might be different from the result of
`get_stylesheet_directory()` and `get_template_directory()`. These
functions have filters.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59279>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list