[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 23:13:13 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:  has-patch        |     Focuses:  template, performance
-----------------------------+------------------------------------
Changes (by joemcgill):

 * keywords:   => has-patch


Comment:

 I doubt that conditional is part of the problem. That early return was
 added 12 years ago in [20015] and the conditional hasn't changed in 6
 years [41174]. It's probably coincidental that commenting out that line
 fixes the issue.

 I've put together a [https://github.com/WordPress/wordpress-
 develop/pull/5642 proof of concept PR] that seems to fix the original
 issue, by making sure that those functions only memoize the paths when
 called after plugins have loaded.


 @kdowns I'm curious if this approach would address your issue as well?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59847#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list