You are here

function js_reinitialize_theme in JS Callback Handler 7.2

Helper function that re-initializes theme.

File

includes/common.inc, line 133
Common functions used in any JS request.

Code

function js_reinitialize_theme() {
  global $_js;
  if (!empty($_js['theme'])) {
    $custom_theme =& drupal_static('menu_get_custom_theme');
    $custom_theme = $_js['theme'];
    unset($GLOBALS['theme']);
    drupal_static_reset();
    drupal_theme_initialize();
  }
}