You are here

function simplenews_install in Simplenews 6.2

Same name and namespace in other branches
  1. 8.2 simplenews.install \simplenews_install()
  2. 8 simplenews.install \simplenews_install()
  3. 5 simplenews.install \simplenews_install()
  4. 6 simplenews.install \simplenews_install()
  5. 7.2 simplenews.install \simplenews_install()
  6. 7 simplenews.install \simplenews_install()
  7. 3.x simplenews.install \simplenews_install()

Implementation of hook_install().

File

./simplenews.install, line 253
Simplenews installation.

Code

function simplenews_install() {
  if (drupal_install_schema('simplenews')) {
    if (module_exists('help')) {
      drupal_set_message(t('Simplenews installation instructions are available on the <a href="!simplenews_help">Simplenews help page</a>.', array(
        '!simplenews_help' => url('admin/help/simplenews'),
      )));
    }
    else {
      drupal_set_message(t('Simplenews was successfully installed.'));
    }
  }
  else {
    drupal_set_message(t('The installation of Simplenews was not successful.'), 'error');
  }
  _simplenews_install_nodetype();
  variable_set('simplenews_content_types', array(
    'simplenews' => 'simplenews',
  ));
  _simplenews_install_vocabulary();
}