summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 9024b7d47..4ccbcbf2c 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -102,6 +102,15 @@ function drupal_theme_initialize() {
// Themes can have alter functions, so reset the drupal_alter() cache.
drupal_static_reset('drupal_alter');
+
+ // Provide the page with information about the theme that's used, so that a
+ // later AJAX request can be rendered using the same theme.
+ // @see ajax_base_page_theme()
+ $setting['ajaxPageState'] = array(
+ 'theme' => $theme_key,
+ 'themeToken' => drupal_get_token($theme_key),
+ );
+ drupal_add_js($setting, 'setting');
}
/**