You are here

function fivestar_add_css in Fivestar 6.2

Same name and namespace in other branches
  1. 5 fivestar.module \fivestar_add_css()
  2. 6 fivestar.module \fivestar_add_css()

Fetch the necessary CSS files to render the fivestar widget.

1 call to fivestar_add_css()
fivestar_init in ./fivestar.module
Implementation of hook_init().

File

./fivestar.module, line 1174
A simple n-star voting widget, usable in other forms.

Code

function fivestar_add_css($widget_css = NULL) {

  // Add fivestar CSS.
  drupal_add_css(drupal_get_path('module', 'fivestar') . '/css/fivestar.css');

  // Add widget specific CSS.
  if (!isset($widget_css)) {
    $widget_css = variable_get('fivestar_widget', 'default');
  }
  if ($widget_css != 'default') {
    drupal_add_css($widget_css);
  }
}