You are here

function hook_themekey_custom_theme_alter in ThemeKey 7.3

By implementing hook_themekey_custom_theme_alter() you can modify ThemeKey's theme selection after the decision has been taken.

Parameters

string $custom_theme: selected theme

array $rules_matched: array of rules matched

2 functions implement hook_themekey_custom_theme_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

themekey_themekey_custom_theme_alter in ./themekey.module
Implements hook_themekey_custom_theme_alter(). Delegates to pseudo hooks in ThemeKey's module plugins.
themekey_themekey_simpletest_themekey_custom_theme_alter in modules/themekey.themekey_simpletest.inc
Implements hook_themekey_custom_theme_alter().
1 invocation of hook_themekey_custom_theme_alter()
themekey_custom_theme in ./themekey.module
Implements hook_custom_theme().

File

docs/themekey.api.php, line 161
ThemeKey API documentation

Code

function hook_themekey_custom_theme_alter(&$custom_theme, $rules_matched) {
  $rule = reset($rules_matched);
  if ('themekey_simpletest:custom_theme_alter_test' == $rule->property) {
    $custom_theme = 'seven';
  }
}