You are here

function ed_classified_init in Classified Ads 6.2

Same name and namespace in other branches
  1. 5.2 ed_classified.module \ed_classified_init()
  2. 5 ed_classified.module \ed_classified_init()
  3. 7.2 ed_classified.module \ed_classified_init()

Implements hook_init()

File

./ed_classified.module, line 356
Simple text-based classified ads module.

Code

function ed_classified_init() {

  // Code that is executed on page requests for non-cached pages only.
  // inject our css per http://api.drupal.org/api/HEAD/function/hook_init and http://api.drupal.org/api/HEAD/function/hook_menu
  drupal_add_css(EDI_CLASSIFIED_MODULE_PATH . '/ed_classified.css');

  // During bootstrap process the VERSION variable is not available so this
  // way we have our own hint. Update our variable if the Drupal VERSION changes.
  $DRUPAL_VERSION = variable_get('ed_classified_drupal_version', 'UNKNOWN');
  if (defined('VERSION') && ('UNKNOWN' == $DRUPAL_VERSION || VERSION != $DRUPAL_VERSION)) {
    variable_set('ed_classified_drupal_version', VERSION);
  }
}