You are here

function coffee_init in Coffee 7

Same name and namespace in other branches
  1. 6 coffee.module \coffee_init()

Implements hook_init().

File

./coffee.module, line 84
Coffee primary module file

Code

function coffee_init() {

  // Only users with the permission access Coffee can use Coffee.
  if (user_access('access coffee')) {

    // Add styling and javascript.
    drupal_add_css(drupal_get_path('module', 'coffee') . '/css/coffee.css', array(
      'type' => 'file',
    ));
    drupal_add_js(drupal_get_path('module', 'coffee') . '/js/coffee.js', array(
      'type' => 'file',
    ));

    // Include the default hooks for Coffee.
    module_load_include('inc', 'coffee', 'coffee.hooks');
  }
}