[wp-trac] [WordPress Trac] #57928: Prevent loading wp-content/themes/functions.php when 'stylesheet' option is empty

WordPress Trac noreply at wordpress.org
Wed Jun 7 19:36:45 UTC 2023


#57928: Prevent loading wp-content/themes/functions.php when 'stylesheet' option is
empty
------------------------------------+------------------------------
 Reporter:  danielbachhuber         |       Owner:  danielbachhuber
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  6.3
Component:  Bootstrap/Load          |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:
------------------------------------+------------------------------

Comment (by danielbachhuber):

 Replying to [comment:14 costdev]:
 > Regarding available usage:

 Thanks for the great research, @costdev. Your work makes me feel a lot
 more confident with https://github.com/WordPress/wordpress-
 develop/pull/4409

 > I'm wondering if this really constitutes a BC break by changing
 behaviour that some people want, or whether it's actually just fixing
 undocumented, buggy behaviour that no one wants. At the moment, I suspect
 it's the latter.
 >
 > Can you think of a scenario/use case for someone expecting `wp-
 content/themes/functions.php` or `wp-content/themes/theme-
 slug/functions.php` to be loaded here, despite passing `__return_false` to
 `wp_using_themes`? Aside from the fact it currently does load it, I can't
 quite think of an example where someone would say "Don't use themes, but
 go ahead and load this file in the themes directory".

 I agree with the "fixing undocumented, buggy behavior" assessment. More
 so, I wanted to identify the behavior change so it was documented. I think
 it's perfectly fine to fix.

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


More information about the wp-trac mailing list