You are here

function themekey_match_rules in ThemeKey 7.2

Same name and namespace in other branches
  1. 6.4 themekey_base.inc \themekey_match_rules()
  2. 6.2 themekey_base.inc \themekey_match_rules()
  3. 6.3 themekey_base.inc \themekey_match_rules()
  4. 7.3 themekey_base.inc \themekey_match_rules()
  5. 7 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_custom_theme in ./themekey.module
Implements hook_custom_theme().

File

./themekey_base.inc, line 246
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;
}