[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 22:46:24 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):
@joemcgill further digging here. `get_raw_theme_root` seems to be part of
the issue.
{{{#!php
if ( ! is_array( $wp_theme_directories ) || count( $wp_theme_directories )
<= 1 ) {
return '/themes';
}
}}}
If I comment out that `return '/themes';` line, everything works. Before
`after_setup_theme`, `$wp_theme_directories` only contains one entry, the
custom one we registered. After, it contains the default directory and our
custom one. I wonder why that conditional is there in the first place.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59847#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list