You are here

function fivestar_init in Fivestar 6

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

Implementation of hook_init().

These includes do not need to be loaded for cached pages.

File

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

Code

function fivestar_init() {
  if (module_exists('content')) {
    module_load_include('inc', 'fivestar', 'fivestar_field');
  }

  // Add necessary CSS and JS.
  // TODO: These shouldn't be loaded on every page, but block caching omits
  // CSS and JS files that would be otherwise added.
  fivestar_add_js();
  fivestar_add_css();
}