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

WordPress Trac noreply at wordpress.org
Thu May 11 00:20:10 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:  Future Release
Component:  Bootstrap/Load          |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |     Focuses:
------------------------------------+------------------------------

Comment (by bpayton):

 Replying to [comment:3 hellofromTonya]:
 > My question is the same as @SergeyBiryukov's:
 > * Why would a `WP_CONTENT_DIR . '/themes/functions.php'` exist?

 We have encountered automation failures with core-like WordPress.com sites
 where users have created this file. It was not clear whether they were
 backing up a file or doing something else. Attempting to load the file
 caused fatals when using WP-CLI with the `--skip-themes` option, and we
 almost always want to use `--skip-themes` to avoid errors due to user-
 provided software while performing system administration tasks.

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


More information about the wp-trac mailing list