theme_add_style

Definition

theme_add_style($path = '', $media = 'all')
drupal/includes/theme.inc, line 330

Description

Add a theme stylesheet to be included later. This is handled separately from drupal_set_html_head() to enforce the correct CSS cascading order.

Code

function theme_add_style($path = '', $media = 'all') {
  static $styles = array();

  if ($path && !isset($styles["$media:$path"])) {
    $style = new stdClass();
    $style->path = base_path() . $path;
    $style->media = $media;
    $styles["$media:$path"] = $style;
  }
  return $styles;
}