function styleswitcher_css in Style Switcher 6.2
Same name and namespace in other branches
- 7.2 styleswitcher.module \styleswitcher_css()
Page callback: Redirects to CSS file of currently active style.
Parameters
string $theme: Name of the theme to find the active style for.
See also
1 string reference to 'styleswitcher_css'
- styleswitcher_menu in ./styleswitcher.module 
- Implements hook_menu().
File
- ./styleswitcher.module, line 301 
- Module's hooks implementations and helper functions.
Code
function styleswitcher_css($theme) {
  // Prevent resource incorrect interpretation.
  drupal_set_header('Content-Type: text/css');
  // Prevent browser caching of the final style and always show the right one.
  // This is D6 only, D7 already sets ETag in core.
  drupal_set_header('ETag: "' . time() . '"');
  $path = styleswitcher_active_style_path($theme);
  if (isset($path)) {
    drupal_goto(_styleswitcher_file_create_url($path));
  }
}