Within the context of a module, how can you determine what theme is loaded for the current user?
drupal_get_path
path_to_theme
Neither of these are any good because they seem to only work in the template.php of a theme.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If users are allowed to select a theme for themselves, the theme they selected is saved in
$user->theme, where$useris the user object.The global variable
$custom_themecontains the name of the theme currently set, if a module has set a custom theme.The following snippet saves in
$current_themethe name of the theme currently active: