You are here

function styleswitcher_css in Style Switcher 7.2

Same name and namespace in other branches
  1. 6.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

styleswitcher_menu()

1 string reference to 'styleswitcher_css'
styleswitcher_menu in ./styleswitcher.module
Implements hook_menu().

File

./styleswitcher.module, line 306
Module's hooks implementations and helper functions.

Code

function styleswitcher_css($theme) {

  // Prevent resource incorrect interpretation.
  drupal_add_http_header('Content-Type', 'text/css');
  $path = styleswitcher_active_style_path($theme);
  if (isset($path)) {
    drupal_goto(file_create_url($path));
  }
}