[wp-trac] [WordPress Trac] #17597: register theme directory() not working for themes outside WP_CONTENT_DIR
WordPress Trac
wp-trac at lists.automattic.com
Tue Feb 28 17:59:53 UTC 2012
#17597: register theme directory() not working for themes outside WP_CONTENT_DIR
--------------------------+-----------------------
Reporter: tliebig | Owner: nacin
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.4
Component: Themes | Version: 3.1.3
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------
Comment (by nacin):
[attachment:17597.diff]
* '''get_theme_root()''' considers a theme root returned from
get_raw_theme_root() to be an absolute path if it is a registered theme
directory. This provides a big of wiggle room for a situation where the
current theme is ABSPATH but not WP_CONTENT_DIR, or in WP_PLUGIN_DIR in a
situation where that is not in WP_CONTENT_DIR.
* '''get_theme_root_uri()''' makes the same considerations as
get_theme_root(), taking it a step further and attempts to find the right
URL when we're not in WP_CONTENT_DIR. It is occasionally even successful.
* Cleans up the branching in register_theme_directory().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17597#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list