[wp-trac] [WordPress Trac] #31620: get_raw_theme_root does not resolve custom theme folder when is the unique
WordPress Trac
noreply at wordpress.org
Sun Jun 7 07:16:32 UTC 2015
#31620: get_raw_theme_root does not resolve custom theme folder when is the unique
----------------------------------------+------------------------------
Reporter: giuseppe.mazzapica | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+------------------------------
Changes (by McGuive7):
* keywords: needs-patch => has-patch needs-unit-tests
* version: => trunk
Comment:
Here's a patch that includes the code you suggested @giuseppe.mazzapica.
I've modified the variable names to be slightly more semantic (e.g. $path
=> $theme_path) and to match existing code. Update also includes adding
whitespace to match WordPress coding standards.
Tested and appears to be working in all of the following situations:
* No registered theme directories (returns `/themes`)
* Default `/themes` directory as only registered theme directory ( returns
`/themes`)
* Custom `/custom-themes` directory as only registered theme directory
(returns `/custom-themes`)
* Multiple theme registered theme directories (returns correct value
depending on `$stylesheet_or_template` parameter
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31620#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list