Make WordPress Core

Opened 20 years ago

Closed 20 years ago

#863 closed enhancement (fixed)

Allow theme location to be changed through filters.

Reported by: ryan's profile ryan Owned by: ryan's profile 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 19 years ago.

Download all attachments as: .zip

Change History (5)

#1 @ryan
20 years ago

  • Patch set to No

#2 @ryan
20 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
20 years ago

Sample plugin attached.

#4 @ryan
20 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
19 years ago

Note: See TracTickets for help on using tickets.