[wp-hackers] [WP1.5 Idea] Admin Setting for Alternate Path to Themes

Ryan Boren ryan at boren.nu
Sat Feb 12 19:14:58 GMT 2005


On Sat, 2005-02-12 at 10:14 -0800, Doug Daulton wrote:
> I know it may be a little late in the game for a 1.5 feature request, 
> but I think this one could be really simple.
> 
> I love the fact that I can install WP code in another directory and call 
> it from webroot/index.php as described in reference URL #1.  This goes a 
> long way to integrating WP into a larger site sitdesign with other OS 
> apps.  My only quibble is that i should be able to set a base path for 
> themes as well.  When incorporating WP into larger site, often the CSS 
> and immage assets are held in another folder.  I'd like to be able just 
> set a path thes assets and go.  Then, my dir structure could look like this.

I've been meaning to add some plugin hooks for this, so I did.  Here's
the list of filters:

theme_root - The base theme directory. Default:
ABSPATH/wp-content/themes

theme_root_uri - The base theme uri. Default: siteurl/wp-content/themes

stylesheet_directory - The directory containing the active stylesheet.
Default: theme_root/stylesheet-theme-name

stylesheet_directory_uri - The uri of the directory containing the
active stylesheet.  Default: theme_root_uri/stylesheet-theme-name

stylesheet_uri - The uri of the active stylesheet.  Default:
stylesheet_directory_uri/style.css

template_directory - The directory containing the active template.
Default: theme_root/template-theme-name

template_directory_uri - The uri of the directory containing the active
template.  Default: theme_root_uri/template-theme-name

To relocate from wp-contet/themes/ to /themes/,  hook into the
theme_root and theme_root_uri filters.  Changes made to those will be
picked up by the stylesheets and templates.

Ryan




More information about the hackers mailing list