WordPress.org

Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#863 closed enhancement (fixed)

Allow theme location to be changed through filters.

Reported by: ryan Owned by: ryan
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Administration Keywords:
Focuses: Cc:

Description

Add filters so that the theme root, template directory, stylesheet directory, and associated URIs can be changed via plugins.

Attachments (1)

theme_root.php (451 bytes) - added by ryan 16 years ago.

Download all attachments as: .zip

Change History (5)

#1 @ryan
16 years ago

  • Patch set to No

#2 @ryan
16 years ago

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.

#3 @ryan
16 years ago

Sample plugin attached.

#4 @ryan
16 years ago

  • fixed_in_version set to 1.5
  • Owner changed from anonymous to rboren
  • Resolution changed from 10 to 20
  • Status changed from new to closed

@ryan
16 years ago

Note: See TracTickets for help on using tickets.