function ctools_theme_ctools_access_check in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 plugins/access/theme.inc \ctools_theme_ctools_access_check()
Check for access.
1 string reference to 'ctools_theme_ctools_access_check'
File
- plugins/
access/ theme.inc, line 42 - Plugin to provide access control based on user themeission strings.
Code
function ctools_theme_ctools_access_check($conf, $context) {
if (!empty($GLOBALS['theme'])) {
$theme = $GLOBALS['theme'];
}
else {
if (!empty($GLOBALS['custom_theme'])) {
$theme = $GLOBALS['custom_theme'];
}
else {
if (!empty($GLOBALS['user']->theme)) {
$theme = $GLOBALS['user']->theme;
}
else {
$theme = variable_get('theme_default', 'garland');
}
}
}
return $conf['theme'] == $theme;
}