[wp-trac] [WordPress Trac] #59847: Since WordPress 6.4, the functions.php of a theme moved to a different location using register_theme_directory is no longer called
WordPress Trac
noreply at wordpress.org
Wed Nov 8 19:52:39 UTC 2023
#59847: Since WordPress 6.4, the functions.php of a theme moved to a different
location using register_theme_directory is no longer called
-----------------------------+------------------------------
Reporter: partyfrikadelle | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 6.4
Severity: critical | Resolution:
Keywords: | Focuses: template
-----------------------------+------------------------------
Comment (by coreyw):
All of our sites have or will be broken by this update as well. This has
to do with the new memoization of the `get_stylesheet_directory()` and
`get_template_directory()` functions. They only memoize if there are no
filters applied on `template`, `theme_root`, or `template_directory`, but
the first call to these functions runs even before must-use plugins, thus
they always cache the first result which is the default theme directory
and then causes `register_theme_directory` to be useless. Huge oversight
to release this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59847#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list