[wp-hackers] At what point are a Theme's widgets loaded?
Paul Menard
paul at codehooligans.com
Mon Jul 23 18:25:12 UTC 2012
I have a custom theme switcher plugin I wrote some time ago for use by a few clients. The plugin adds a widget which is just a list of anchors for some special themes. The user clicks on an anchor and the theme would change. The anchor link passed in a query string var to indicate the alternate theme. There was nothing much special on the themes most of these were the same theme with slight color variations.
Since upgrading a few client sites this past weekend to WP 3.4.1 I noticed the theme switcher was broken. Well to be specific the theme still does switch to the alternate theme. But the issue is the alternate theme widgets are not loaded.
The plugin has two main functions that hook into the filters for 'stylesheet' and 'template' where each check for the query string var and if set return that alternate theme. I know WP 3.4 made some changes and introduced the WP_Theme class. But I'm not sure if there are new filters/actions needed to force the loading of the theme's widgets. Since this is just a user theme switcher the real theme is not effected within wp-admin.
Anyone have a thought?
P-
More information about the wp-hackers
mailing list