You are here

function delta_init in Delta 7

Same name and namespace in other branches
  1. 6 delta.module \delta_init()

Implementation of hook_init()

See also

http://api.drupal.org/api/function/hook_init/6

File

./delta.module, line 16
The Delta Theme API is an advanced manipulation of the Theme Settings API to allow for customization/configuration of theme settings based on node types, context, or groups of paths.

Code

function delta_init() {

  // only include delta.css & .js on the administrative section
  // I really get angry when administrative modules include their css & js on the front end.
  if (drupal_substr($_GET['q'], 0, 5) == 'admin') {
    $path = drupal_get_path('module', 'delta');
    drupal_add_css($path . '/delta.css', 'module', 'all');
    drupal_add_js($path . '/delta.js', 'module', 'header');
  }
}