You are here

function themekey_match_rules in ThemeKey 6.4

Same name and namespace in other branches
  1. 6.2 themekey_base.inc \themekey_match_rules()
  2. 6.3 themekey_base.inc \themekey_match_rules()
  3. 7.3 themekey_base.inc \themekey_match_rules()
  4. 7 themekey_base.inc \themekey_match_rules()
  5. 7.2 themekey_base.inc \themekey_match_rules()

This function steps through the rule chain and returns a theme.

Return value

a theme as string or NULL

1 call to themekey_match_rules()
themekey_init in ./themekey.module
Implements hook_init().

File

./themekey_base.inc, line 210
The functions in this file are the back end of ThemeKey.

Code

function themekey_match_rules() {
  $parameters = themekey_get_global_parameters();
  $theme = themekey_match_rule_childs($parameters);
  if (FALSE === $theme || TRUE === $theme) {
    $theme = NULL;
  }
  elseif ('ThemeKeyAdminTheme' === $theme) {
    $theme = variable_get('admin_theme', '0');
  }
  return $theme;
}