function themekey_match_rules in ThemeKey 7
Same name and namespace in other branches
- 6.4 themekey_base.inc \themekey_match_rules()
- 6.2 themekey_base.inc \themekey_match_rules()
- 6.3 themekey_base.inc \themekey_match_rules()
- 7.3 themekey_base.inc \themekey_match_rules()
- 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_custom_theme in ./
themekey.module - Implements hook_custom_theme().
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;
}