Opened 5 years ago
Last modified 5 years ago
#46988 new defect (bug)
Theme dir hardcode
Reported by: | studioreforma | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.1.1 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
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 think.
@studioreforma
i created a new Patch for this Problem.
https://core.trac.wordpress.org/ticket/47002
thanks.