You are here

function themekey_ajax_base_page_theme in ThemeKey 7.3

Wrapper for ajax_base_page_theme() that optionally skips the token check.

1 call to themekey_ajax_base_page_theme()
themekey_custom_theme in ./themekey.module
Implements hook_custom_theme().
3 string references to 'themekey_ajax_base_page_theme'
themekey_ajax_settings_form in ./themekey_admin.inc
Form builder for the ThemeKey ajax settings form.
themekey_custom_theme in ./themekey.module
Implements hook_custom_theme().
themekey_menu_alter in ./themekey.module
Implements hook_menu_alter().

File

./themekey.module, line 510
ThemeKey is designed as a generic theme-switching module.

Code

function themekey_ajax_base_page_theme() {
  if (variable_get('themekey_unsafe_ajax_base_page_theme', 0) && !empty($_POST['ajax_page_state']['theme']) && !empty($_POST['ajax_page_state']['theme_token']) && themekey_check_theme_enabled($_POST['ajax_page_state']['theme']) && themekey_is_ajax_theme_safe($_POST['ajax_page_state']['theme'])) {
    return $_POST['ajax_page_state']['theme'];
  }
  else {
    return ajax_base_page_theme();
  }
}