You are here

function _high_contrast_get_current_css_styles in High contrast 7

Same name and namespace in other branches
  1. 6 high_contrast.module \_high_contrast_get_current_css_styles()

Get default css styles if none exist yet.

2 calls to _high_contrast_get_current_css_styles()
high_contrast_init in ./high_contrast.module
Implements hook_init().
high_contrast_settings_form in ./high_contrast.module
Settings form.

File

./high_contrast.module, line 399
High Contrast main module file.

Code

function _high_contrast_get_current_css_styles() {
  $theme_path = drupal_get_path('theme', variable_get('theme_default', NULL));
  if (_high_contrast_css_exists()) {
    $styles = file_get_contents($theme_path . '/' . HIGH_CONTRAST_CSS_PATH);
  }
  else {
    $styles = _high_contrast_variable_get('high_contrast_css_styles');
    if (empty($styles)) {
      $styles = _high_contrast_get_default_css_styles();
      variable_set('high_contrast_css_styles', $styles);
    }
  }
  return $styles;
}