function theme_add_style

You are here

4.6 theme.inc theme_add_style($style = '')
4.7 theme.inc theme_add_style($path = '', $media = 'all')

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

2 calls to theme_add_style()
init_theme in includes/theme.inc
Initialize the theme system by loading the theme.
theme_get_styles in includes/theme.inc
Return the HTML for a theme's stylesheets.
1 theme call to theme_add_style()
1 string reference to the theme hook from theme_add_style()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

theme_maintenance_page in includes/theme.inc

File

includes/theme.inc, line 330
The theme system, which controls the output of Drupal.

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;
}