You are here

function role_theme_switcher_custom_theme in Role Theme Switcher 7

Implementation of hook_custom_theme()

File

./role_theme_switcher.module, line 6

Code

function role_theme_switcher_custom_theme() {
  global $user;
  $custom_theme = NULL;
  foreach ($user->roles as $id => $role) {
    $role_theme = variable_get('role_theme_switcher_' . $id . '_theme', '');
    if ($role_theme != 'Default') {
      $custom_theme = $role_theme;
    }
  }
  return array(
    $custom_theme,
  );
}