You are here

function ed_classified_init in Classified Ads 5.2

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

Implementation of hook_init()

File

./ed_classified.module, line 351
Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights…

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);
  }
}