[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 21:49:41 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: joemcgill
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: 6.4
Severity: critical | Resolution:
Keywords: | Focuses: template, performance
-----------------------------+------------------------------------
Comment (by coreyw):
@partyfrikadelle good work. You're right, WP core does not call
`get_stylesheet_directory()` that early by default. In my case, we are
including Advanced Custom Fields as a "must-use" plugin, and it calls that
function first, before our custom theme directory is registered. A
"simple" solution is to make our plugin load first (must-use are loaded in
alphabetical order far as I know). Since there is a workaround I'm not
sure if there needs to be any fix applied, but it should be documented
that calls to `register_theme_directory()` should be prioritized.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59847#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list