function themekey_user_themekey_global in ThemeKey 7.3
Same name and namespace in other branches
- 6.4 modules/themekey.user.inc \themekey_user_themekey_global()
- 6 modules/themekey.user.inc \themekey_user_themekey_global()
- 6.2 modules/themekey.user.inc \themekey_user_themekey_global()
- 6.3 modules/themekey.user.inc \themekey_user_themekey_global()
- 7 modules/themekey.user.inc \themekey_user_themekey_global()
- 7.2 modules/themekey.user.inc \themekey_user_themekey_global()
Implements hook_themekey_global().
File
- modules/
themekey.user.inc, line 87 - Provides some user attributes as ThemeKey properties.
Code
function themekey_user_themekey_global() {
global $user;
$parameters = array();
$parameters['user:hostname'] = !empty($user->hostname) ? $user->hostname : NULL;
$parameters['user:language'] = !empty($user->language) ? $user->language : NULL;
$parameters['user:name'] = !empty($user->name) ? $user->name : NULL;
$parameters['user:uid'] = $user->uid;
$parameters['user:role'] = $user->roles;
if ('user' == themekey_get_q() && user_is_logged_in()) {
// required by themekey_ui:author_triggers_theme
$parameters['profile:uid'] = $user->uid;
// a user watches his own profile
}
return $parameters;
}