Opened 3 years ago
Closed 3 years ago
#12428 closed defect (bug) (fixed)
Renaming the active theme results in massive failures
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | has-patch |
| 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)
- 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.

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 to get_current_theme() again.