[wp-trac] [WordPress Trac] #46988: Theme dir hardcode

WordPress Trac noreply at wordpress.org
Fri Apr 19 07:19:35 UTC 2019

#46988: Theme dir hardcode
 Reporter:  studioreforma  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Themes         |    Version:  5.1.1
 Severity:  normal         |   Keywords:
  Focuses:                 |
 This is about the get_raw_theme_root() function in wp-includes/theme.php

 When the $wp_theme_directories global has only one theme directory in it,
 the functions returns a hardcoded path of /themes which will be treated
 later as relative to the content folder. The correct behaviour would be to
 return the actual string from the $wp_theme_directories global.

 This is a problem when a user is using a custom theme directory and has
 deleted the themes directory in the content folder. Then his global
 $wp_theme_directories will contain only one path - the one to his themes
 directory, but WP will be looking in the content/themes directory instead
 in the Themes admin page.

 I had this issue on multisite, but should be the same on single sites I

Ticket URL: <https://core.trac.wordpress.org/ticket/46988>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list