<?phpdefine('CURRENT_PAGE',-1);define('ACTIVE', 0);/**
* Returns the current active theme. Use this instead of the global variable.
*
* @param $get
* When set to CURRENT_PAGE, this will always return the theme used for the
* rendered page. When set to ACTIVE, it will return the internally active
* theme. For example, if the site has a different admin theme, setting this
* to ACTIVE will return the site wide active theme while CURRENT_PAGE will
* return the admin theme used to display the page. When inside the theme
* settings api form, the internal focus will be on the theme specific form
* so ACTIVE will point to the theme associated with that form.
*/functionhex_active_theme($get=ACTIVE) {
switch ($get) {
caseACTIVE : return$GLOBALS['theme_key']; caseCURRENT_PAGE : return$GLOBALS['theme'];
}
}
?>