Opened 15 years ago
Closed 15 years ago
#12428 closed defect (bug) (fixed)
Renaming the active theme results in massive failures
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description
Part of this was handled in [13469], but I'm finding that a theme name with an apostrophe produces additional failures relating to storing and retrieving theme data.
I'm ticketing this so I don't forget to follow up on it.
Attachments (1)
Change History (4)
#2
@
15 years ago
- Keywords has-patch added
- Summary changed from Apostrophes in theme names result in massive failures to Renaming the active theme results in massive failures
get_current_theme() returns the current_theme option if it exists, otherwise it calculates it from the stylesheet and template paths. Patch attached removes the current_theme option and calls get_current_theme() again, if the theme isn't found in the result returned by get_themes().
To reproduce: Activate a theme, then rename it. A few different admin pages, including wp-admin/themes.php, should flip out a bit.
To test: Apply patch, activate a theme, then rename it.
Note: See
TracTickets for help on using
tickets.
The remaining issue is actually renaming an active theme. We should add a sanity check to current_theme_info() that if
$theme[$current_theme]
isn't set, when we clear the 'current_theme' option and attempt toget_current_theme()
again.