You are here

function simplenews_init in Simplenews 6.2

Same name and namespace in other branches
  1. 5 simplenews.module \simplenews_init()
  2. 6 simplenews.module \simplenews_init()
  3. 7.2 simplenews.module \simplenews_init()
  4. 7 simplenews.module \simplenews_init()

Implementation of hook_init().

File

./simplenews.module, line 87
Simplenews node handling, sent email, newsletter block and general hooks

Code

function simplenews_init() {
  drupal_add_css(drupal_get_path('module', 'simplenews') . '/simplenews.css', 'module', 'all', TRUE);

  // Simplenews can not work without this variable.
  if (variable_get('simplenews_vid', '') == '') {
    drupal_set_message(t('Missing newsletter vocabulary. Please set a vocabulary at <a href="@settings">Simplenews settings</a>.', array(
      '@settings' => url('admin/settings/simplenews/general'),
    )), 'error');
  }
}