Opened 7 months ago

Last modified 7 months ago

#22401 new enhancement

Add information about old theme to 'theme_switched' action

Reported by: evansolomon Owned by:
Priority: normal Milestone: Awaiting Review
Component: Themes Version:
Severity: normal Keywords: needs-patch
Cc:

Description

Currently the 'theme_switch' action passes data about the theme you're switching to, but not the theme you're switching from. Adding it there would make it easier to juggle functionality that needs to know about new and old themes. Right now some of this happens by setting an option ('theme_switched') and checking for it on init, then deleting the option. That could be simplified by just passing the old theme's data in theme_switched.

There's an added benefit that we avoid checking for an option on every single request that usually won't be there.

Attachments (1)

22401.patch (1.7 KB) - added by evansolomon 7 months ago.

Download all attachments as: .zip

Change History (3)

Looking at the patch, it looks like check_theme_switched() needs to be reindented?

Note: See TracTickets for help on using tickets.